EddyVerbruggen / Custom-URL-scheme

:link: Launch your Cordova/PhoneGap app by a Custom URL scheme like mycoolapp://

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

no intents received so far

adolfokrah opened this issue · comments

hi, i have integrated the plugin in my app, when i click on the link link to app, the app opens fine but i get no intent received so far when window.plugins.launchmyapp.getLastIntent(function(url){},functon(error){});

commented

You can try confirm, if your app is opened in the background the window.plugins.launchmyapp.getLastIntent gets the no intent received so far. Close the app and try the link. and then it works fine based on what I observed. The handleOpenURL JavaScript function (shown below) works when the app is in the background or closed.
Based on your requirements, if handleOpenURL won't work for you in all cases, you can try a little switching where you call both functions and use a boolean to check if one method executed and halt the second call.

function handleOpenURL(url) {
  console.log("received url: " + url);
}