EddyVerbruggen / Custom-URL-scheme

:link: Launch your Cordova/PhoneGap app by a Custom URL scheme like mycoolapp://
1.03k stars 367 forks source link

Android "hangs weirdly" in executing handleOpenURL(url) #21

Open mobione opened 10 years ago

mobione commented 10 years ago

On my Android LG, if i click on a custom url scheme link with parameters. The App opens fine but the handleOpenURL(url) seems like it is not triggered.

But... If i then lock the screen and open the screen again, the app resumes and executes handleOpenURL(url) fine with all parameters to.

I am using phonegap build I am running SingleTop on android I am testing it with Android LG (Android 4.1.2)

The plugin is working perfect on IOS.

Any ideas? Have you heard about it before?

EDIT: Also testet now on samsung galaxy s4. Same issue. I had to publish the app to the store now with this bug.

So you are welcome to test the issue. Its out there LIVE :(

Recreate problem:

  1. Download app https://play.google.com/store/apps/details?id=me.mobione.coolbox
  2. Click on this invite link from your android device and app opens... but handleOpenURL(url) doesnt fire. coolbox://?name=andreas&time=1401891091637&t=i
  3. Lock the screen and unlock the screen and the handleOpenURL(url) fires and everything is great!!??

I am really stuck here

mobione commented 10 years ago

SOLVED SOLVED SOLVED!!! It really is the perfect plugin ;)

In my document.addEventListener('deviceready'.... function this one was hanging around:

StatusBar.hide();

That one is the hide statusbar plugin for IOS... and of course it will error on android!! So removing it got the thing working perfect. Now there's both android and IOS url schemes with parameters working like a charm :)

harmonius commented 9 years ago

@mobione,

Can you describe in more detail how to get handleOpenURL to work on IOS. In the IOS instruction, all I see is the following:

/* Q: Why an empty file? A: iOS doesn't need plumbing to get the plugin to work, so..

What should I put in here to make this work?