HOW TO USE AUDIO IN THE APPS
In the Mobincube apps it is possible to use AUDIO FILES.
The audio format supported is: MP3
To create an app with audio we can use the ACTION PLAY & STOP
These actions allows us to open a local or a streaming audio inside the App.
To use audio files in the App we have 2 ways:
IN A DETAIL, ACTION IMAGE OR OPTION LIST SCREENS
In any of those screens of the App we can create 2 buttons and will assign the action: PLAY to the first one, and the action STOP to the second one, in order to stop the audio.
Then we must insert the mp3 file into the destination of the action.
We can upload the file from the Resource Manager in 2 ways:
- Local / Offline (if we want to select a local audio or a playlist from our PC)
- Remote (if we want to upload an audio from the external server Cloud) or if we want to use an online resource, in an MP3 format.
In this case we will have to allow Mobincube to validate it, by opening the Resource Manager and uploading the audio streaming resource in there.
In case we have a playlist file with a different format, for example type txt. , we will have to use a trick to make it work. We can open this file in the Text editor and look for the mp3 file url, compatible with the resource manager. We can copy and paste this content in the Resource Manager as Online resource and upload the file to the play and stop destinations.
REACTION ON MINIMIZING OR CHANGING SCREEN
It is really important to know the reaction of the App when using the action: Play.
When we use the PLAY action, it will allow us to listen the audio in background, even if we minimize or change screen of the app.
To stop the audio we will have to use a STOP button or completely exit the App.
IN A DATA VIEW SCREEN
Another way to use audio is through the Data View:
- We can create a database with an Audio field, where we can upload mp3 files.
2. At the moment, the Data View doesn’t allow us to drag the audio field into the view. (As you can see it is not visible among the pink elements which represent the different registries of the database).
3. But we can use the audio field in another way:
We can open a list or detail view and create 2 buttons by using a text or image element and assigning them the action PLAY and STOP, and following this we only have to put the name of the audio field in brackets: for example: (Audio).
This way, when we click the button, the audios of the database will be reproduced.
See the related article: “How to create a Radio App”
In youtube: Audio and Video with Mobincube