This is the list of actions available in the Mobincube protocol:
Section – Allows you to open a native section of the App.
Call – Makes a phone call to a telephone number.
Browser – Opens a URL on the external browser of the phone.
SMS – Sends an SMS to a phone number.
Route – Opens the GPS navigation App of the phone.
Share – Opens the social panel of the phone to share content.
Interstitial – Opens an interstitial type ad.
Play – Plays a local audio file in the background.
Stop – Stops the reproduction of a sound already being played.
Player – Opens the native audio/video player of the phone and allows to play streaming sources.
Track – This action allows to register an event in the analytics tool used in that moment (GoogleAnalytics, CleverTap, Flurry, etc.). By default, if there more than one active tool, it will be registered in all of them.
We will now explain which parameters use each action and how to use it. Remember that it’s mandatory to encode the URLs to prevent communication issues: encodeURIComponent() in Javascript.
Section
Purpose: Allows you to open a native section of the App.
Action’s name: Section
Parameters: Section’s name.
URL schema: mobincube://action/section/contactSection
Call
Purpose: Makes a phone call to a telephone number.
Action’s name: Call
Parameters: Text string that contains the recipient's phone number.
URL schema: mobincube://action/call/00361346734
Browser
Purpose: Opens a URL on the external browser of the phone.
Action’s name: browser
Parameters: Text string that contains the destination URL.
URL schema: mobincube://action/browser/www.mywebpage.com
SMS
Purpose: Sends an SMS to a phone number with a predefined text.
Action’s name: sms
Parameters: A text string containing in first place the destination phone number, followed by a blank space and then the predefined text.
URL schema: mobincube://action/sms/00361346734 Predefined_text
Note: This action fills the destination number and the text but doesn’t actually send the SMS until the end user confirms it.
The parameters of this action must be URL encoded so the App can interpret them: http://www.w3schools.com/tags/ref_urlencode.asp
Route
Purpose: Opens the GPS navigation App of the phone.
Action’s name: route
Parameters: A text string containing the destination GPS location and, separated by a blank space, a label for the point with the following format: “latitude, longitude [label]” as an example “40.449324,-3.692240 London”
URL schema: mobincube://action/route/40.449324,-3.692240 Madrid
The parameters of this action must be URL encoded so the App can interpret them: http://www.w3schools.com/tags/ref_urlencode.asp
Share
Purpose: Opens the social panel of the phone to share content.
Action’s name: share
Parameters: A text string with the content you want to share.
URL schema: mobincube://action/share/text_to_share
Notes: Images, audio, video… will have to be shared using an URL since the App hasn’t access to the web resources.
The parameters of this action must be URL encoded so the App can interpret them: http://www.w3schools.com/tags/ref_urlencode.asp
Interstitial
Purpose: Opens an interstitial type ad.
Action’s name:interstitial
Parameters: None
URL schema: mobincube://action/interstitial
Play
Purpose: Plays a local audio file in the background.
Action’s name: play
Parameters: JSON objects containing “resource” and “options”
Resource is the ID of the resource you want to play.
As options, we have loop, to set if the resource is going to played on a loop (true) or just once (false)
JSON example:
//This will reproduce the resource @audio1234 on a loop.
{
"resource": "@audio1234",
"loop": true
}
Note: You need to know the internal ID of the audio, we still do not provide this info on Mobincube so this functionality is limited at the moment.
URL schema: mobincube://action/play/{ "resource": "@audio1234", "loop": true}
Notes: The audio file that will be reproduced must be inside of the App for the player has access to it.
Stop:
Purpose: Stops the reproduction of an audio file if you indicate which resource you want to stop. If you don’t type any resource, it will stop all the sounds being played at that moment.
Action’s name: stop
Parameters: JSON objects containing the resource ID or null.
{"resource": "@audio1234”} //Stops the @audio1234 resource.
{"resource": null} // Stops all audios been played.
URL schema: mobincube://action/stop/{ "resource": "@audio1234”}
mobincube://action/stop/{ "resource": null}
Player
Purpose: Opens the native audio/video player of the phone and allows to play streaming sources.
Parameters: JSON object that contains the audio resource. It can be a URL to play a streaming, a static audio resource inside the app or a data field inside a data view.
//External Resource URL
http%3A%2F%2Fwww.nasa.gov%2Fmultimedia%2Fnasatv%2FNTV-Public-IPS.m3u8
//Static resource ID
{"resource":"@audio1234"}
//Column field of a database
{"resource":"(Column_name)"}
URL schema:
mobincube://action/player/http%3A%2F%2Fwww.nasa.gov%2Fmultimedia%2Fnasatv%2FNTV-Public-IPS.m3u8
mobincube://action/player/{ "resource":"@audio1234”}
mobincube://action/player/{ "resource":"(Column_Name)"