To be able to ask for information or send actions from our web page to our native App, we need to send that information in a certain way. This way is the Mobincube protocol.
To do this we will send the request with the next format:
mobincube://action/[action_name]/[action_parameters]
or
mobincube://javascript/[javascript_function_to_do]
For the App to get the request, it's necessary for our web to try to open a URL with the aforementioned Mobincube protocol. When the Apps recognise that the URL uses the Mobincube protocol, it will intercept the call and it will use the parameters on the URL to make the action.
As a simple example of this interaction, we can see here how to open a native section from a web page in HTML:
<a href=”mobincube://action/section/infosection1”></a>
As a note, it's mandatory to encrypt the characters on the URL to prevent communication issues. You can do this in javascript using the encodeURIComponen() function.
Now you can see a list of the actions available on the protocol or how to obtain system variables from the phone.