Launchmyapp not opening app

  • 1
  • Question
  • Updated 5 years ago
I am trying to use the launchmyapp plugin to open another app within my app. I want to open mydeals:// but I can't figure out what I am doing wrong. I added this to my config.xml.

gap:plugin name="nl.x-services.plugins.launchmyapp"

param name="URL_SCHEME" value="mydeals" /
/gap:plugin"

Then I am using this: var my_window = window.open('mydeals://', '_system'); to open the app. I am not sure if the param name or value is wrong.
Photo of Sean C

Sean C

  • 8 Posts
  • 0 Reply Likes

Posted 6 years ago

  • 1
Photo of Eddy Verbruggen

Eddy Verbruggen, Champion

  • 375 Posts
  • 86 Reply Likes
Hi, you need to add the plugin to the app you try to launch. Is that what you're doing here?
Photo of Sean C

Sean C

  • 8 Posts
  • 0 Reply Likes
Yes, I successfully added the plugin to the app.
Photo of Sean C

Sean C

  • 8 Posts
  • 0 Reply Likes
The app package I need to open is called com.access.access
Photo of Eddy Verbruggen

Eddy Verbruggen, Champion

  • 375 Posts
  • 86 Reply Likes
So you are devloping 2 apps: 'mydeals' and the other one containing a link to the 'mydeals' app.

- What happens when you click the link which opens the mydeals app?

- Did you add the InAppBrowser plugin so window.open('mydeals://','_system') actually opens the system browser (which in turn should open the mydeals app).
Photo of Sean C

Sean C

  • 8 Posts
  • 0 Reply Likes
When I click the link which opens the mydeals app it doesn't do anything, but doesn't crash.

I added the InAppBrowser also using
gap:plugin name="org.apache.cordova.inappbrowser" /
Photo of Eddy Verbruggen

Eddy Verbruggen, Champion

  • 375 Posts
  • 86 Reply Likes
Two more questions come to mind:

- Does a link to for example http://www.google.com open the system browser from your app, when using window.open(....)?

- I'm not sure if this is needed anyway, but is 'mydeals' whitelisted in the config.xml of the app you're linking from?
Photo of Sean C

Sean C

  • 8 Posts
  • 0 Reply Likes
I will need to get back to you with the link to google because I can't test it right now but I am using access origin="*" subdomains = "true" / in my config.xml
Photo of Sean C

Sean C

  • 8 Posts
  • 0 Reply Likes
Actually I was able to test the google.com link and it opened it in the browser
Photo of Eddy Verbruggen

Eddy Verbruggen, Champion

  • 375 Posts
  • 86 Reply Likes
Can you share the source of your mydeals app with me? A link to github/drive/dropbox perhaps?
Photo of Sean C

Sean C

  • 8 Posts
  • 0 Reply Likes
Actually I am not the owner of the mydeals app so I don't have the source code.... only the code for my app called myclearreports
Photo of Eddy Verbruggen

Eddy Verbruggen, Champion

  • 375 Posts
  • 86 Reply Likes
Then again I need to ask: is the launchmyapp plugin added to the mydeals app?
Photo of Sean C

Sean C

  • 8 Posts
  • 0 Reply Likes
I don't think so. I'm not sure...
Photo of Eddy Verbruggen

Eddy Verbruggen, Champion

  • 375 Posts
  • 86 Reply Likes
That's what I figured. The plugin must be added to the app you try to launch, so the mydeals app in this case. There is no need to add it to the app with the link.

You should ask the creators of the mydeal app if they have an urlscheme you can use to open their app. The window.open(...) link you use is fine, but if the mydeals app doesn't listen to the mydeals:// urlscheme it will not work.
Photo of ismael jimoh

ismael jimoh

  • 4116 Posts
  • 192 Reply Likes
Hi Sean,

Do you still need help with this?

Do let us know. 
Photo of Rahul Yadav

Rahul Yadav

  • 2 Posts
  • 0 Reply Likes
this plugin does't work
Photo of Petra V.

Petra V., Champion

  • 7794 Posts
  • 1391 Reply Likes
...only in your situation, or in general?
Photo of Rahul Yadav

Rahul Yadav

  • 2 Posts
  • 0 Reply Likes
after add this function

var handleOpenURL = function(url) {
alert("RECEIVED URL: " + url);
};

alert not show

but after remove url from parameter
the alert show
alert(RECEIVED URL: undefined);

var handleOpenURL = function() {
alert("RECEIVED URL: " + url);
};