EddyVerbruggen / Custom-URL-scheme

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

Two app instances when using deep linking (Android) #160

Closed rafaellop closed 8 years ago

rafaellop commented 8 years ago

Hi,

I'm testing the plugin on my release build and I noticed that even though the app is launched and working in background calling it with a deeplink from a webpage opens another instance which seems to be working in the browser namespace. I'm not sure if I call this correctly, but I've got two instances in the background. The one started in the standard way from Android launcher is visible in task manager with its original icon while the other instance launched from custom-url in browser is available from the browser icon. This is very strange. I think only one instance should be started and not as browser instance. I'm on Android 5.0.1.

Cordova 6.0.0 Cordova Android Platform 5.1.1 Android device OS 5.0.1

Should I be worried or is this the correct behaviour?

Cheers, Rafal

rafaellop commented 8 years ago

The #24 suggestion to use the <preference name="AndroidLaunchMode" value="singleTask" /> helped to prevent the double instance issue. It's not mentioned in the readme.

EddyVerbruggen commented 8 years ago

If you search for singleTask in the readme you will find it, but if you think you can make it more clear please send a PR.