EddyVerbruggen / Custom-URL-scheme

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

The protocol isn't supported. (apreceiver://) #4

Closed Mooga closed 10 years ago

Mooga commented 10 years ago

Hello

First I would like to say that your app works, I created a webpage added to and soon as I click it via Chrome, Firefox, Native on Android it works.

So then I tried to do this. I have 2 apps. One is called AppLauncher and other is called AppReceiver. Basicalhy I want that when I click the button on AppLauncher that has a <.a href="apreceiver://">Open App<./a> but it gives me "The protocol isn't supported. (apreceiver://)."

I tried to add to the config but no luck, I'm more an artist than programmer. Is there anyway I could achieve this with your plugin or did I forgot to add something?

Please let me know. Using Android Tablet with 4.1 on it.

Cheers Mooga

EddyVerbruggen commented 10 years ago

Hi, could it be so simple that it's a typo? apreceiver vs appreceiver?

Otherwise, is there a possibility for me to see your code?

Mooga commented 10 years ago

sure I will load both in sec

Mooga commented 10 years ago

https://github.com/Mooga/ApptoApp

I intencionalhy took the one p. :D

I used Phonegap Build works fine except the protocol also tryed locally/manually using your guide, some reason it installs but then crashes, but it does load up via the browser still.

Anyway on PhoneGap I realhy cant use the manifest I can only use config.xml and thats where I manifested the link but still not working. :X

https://build.phonegap.com/apps/723914/share https://build.phonegap.com/apps/723915/share

jernejc commented 10 years ago

I get the same error if I try to start the app from another phonegap app. If I try the same link in the browser it works fine. Any ideas?

Was this even ment to work in another phonegap app? I don't see why it wouldn't, since it runs in webview?

EDIT: This seems to work: onclick="window.open('yourscheme://', '_system');"

EddyVerbruggen commented 10 years ago

He @jernejc nicely found! Yes, you're edit is correct, you are using the InAppBrowser plugin to invoke the system browser, which in turn opens the other app. I will add this to the README of this repo.

@Mooga please try this great suggestion.

Mooga commented 10 years ago

Thanks. I did it native Java on android, but i will try this easier for both iOS and Android.