PhoneGap - Deeplink

Working on a application that has native mobile functionality, We create the application via Phonegap build, however we use a deep link to reach our mobile functionality within mendix. However upon debugging we get an error whilst connecting to the application that reads unexpected "<". In the javascript of the bundle I noticed that the deeplink url returns a string containing the page html whereas the regular link contains JSON which the package.js expects. My question, is it possible to setup a mendix mobile app via a deeplink or does it need to be the default url? Thanks. Edit: I'm referring to the mxapp.initialize("applicationurl"); function and using the url of a mendix deeplink created via the deeplink module.
3 answers

You won't be able to pass a deeplink to mxapp.initialize due to the way we load the app. Normally, you surf to a website with an index page, which loads a bunch of js. In a cordova-packaged mendix app, we have the index.html page locally, then load the client javascript dynamically (by inserting script tags). I don't think you'll be able to trigger a deeplink in this way.

If you want a custom MF to be triggered, you could enable anonymous users and then handle this by using a nav microflow.

Alternatively, you could bypass our efforts for the hybrid app altogether and write your own cordova wrapper that simply opens the deeplink. You won't be able to use any cordova plugins, though....


Found out why,


trys to locate the JSON file on the server

however the deeplink returns html for the page I return in this instance,

if (status === 200) {
                } else if (status === 404) {
                    // If config is not found, assume the default config

therefore it hits the 200 response fails to parse rather than resorting back to the default config

gonna mess around more with it.


Hi Simon,

Using URL links in your app will get you into trouble.

Have a look at the phone gap intents plugin, that allow you to pickup URL requests in you app.

Hopefully this information will get you further,

Cheers Andries