Open Mendix mobile app specific screen from another mobile app using deep link.

3
Hi All, I am trying to use deep link module in mobile, but I cannot get it to work. I have integrated deep link module and it working fine when I try the mobile view in browser, the deeplink  http://localhost:8888/link/warranty/sasa?unit=000xx4&order=40xx956  is successfully redirecting to my required page. However when I modify the http link to custom url schema referring https://community.mendix.com/link/questions/87255    so that mobile app will get opened when I use below URL: mycoolapp://<yourdeeplink.(mycoolapp://localhost:8888/link/warranty/sasa?unit=000xx4&order=40xx956 ) it is not reaching the deeplink microflow but opening home page of app. Anyone got an idea what could be going wrong, how can I make the custom url shcema call my deep link microflow, why http is working same time custom url schema not?   Further explanation: What we want to achieve: We have one Mendix hybrid app(MappB) which is used for purchasing warranty,  we want user to navigate from mobile appA to a landing page in  MappB  by bypassing some initial search pages, we would be passing the required search fields from appA in the deep link url. What we have done so far:   I know that this can be done using creating a deeplink in MappB and exposing this to appA .   I have referred following suggestions: Used the existing deep link widget from mendix app store, configured one deep link which is accepting two get parameters and landing on a result page. For this as suggested in app store did following in MappB Imported the deep link module Created after start up microflow and calling StartDeeplink microflow, also I am creating the deep link here itself by calling CreateDeeplinkConfig and passing required fileds. my deep link url looks like http://localhost:8888/link/warranty/sasa?unit=000xx4&order=40xx956 Created the corresponding microflow for handling this particular deeplink. Changed the default homepage in navigation to custom microflow which decide whether deeplink flow or home page. Now when I test this in web browser the deep link is successfully landed on correct page with the http deep link url.  By referring https://community.mendix.com/link/questions/87255 I could see that we need to add  Custom URL scheme phonegap plugin and add fucntion in index.html so that cordova can execute the deeplink: config.xml <gap:plugin name="cordova-plugin-customurlscheme" source="npm" version="4.2.0"> <param name="URL_SCHEME" value="YOURGREATAPP" /></gap:plugin>  index.html  function handleOpenURL(url) { setTimeout( function(){ if (!url.match(("^(http:\/\/|https:\/\/)+.*$"))) { url = window.mx.remoteUrl + url.replace('^((.+)\:\/\/)?', ''); } var oReq = new XMLHttpRequest(); // false = acync -> should be called AFTER setting deeplink oReq.open("get", url, false); oReq.send(); //detect if iOS for handle deeplink if (device.platform === 'iOS') { window.location.reload(false); } } ,1); } 7. Now my deeplink will looks like YOURGREATAPP://localhost:8888/link/warranty/sasa?unit=000xx4&order=40xxx56 I had created IPA and installed my app. Now for the time being I am putting this link in phone browser, and it is successfully prompting to open in the app however its landing to the login page or to the home page depending on logged in or not. But the deep link flow is not triggered, I have verified this by adding logs in deep link flow.  
asked
1 answers
0

Hi Hari, have you seen this forum post? It has a detailed writeup and example code.

answered