EddyVerbruggen / Custom-URL-scheme

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

links not clickable on android devices #234

Open CoderingIO opened 7 years ago

CoderingIO commented 7 years ago

I'm setting up deeplinks on a cordova project building out to android and iOS. My link myAwesomeApp:// is clickable from all my iOS devices, but not working on any android devices. Is there something like capabilities or something I'm supposed to turn on to make it work on android?

brunomilicevic-croatia commented 7 years ago

It seems that custom url schemas are not supported by gmail. https://stackoverflow.com/questions/26186235/hyperlinks-with-non-http-schema-in-gmail

erperejildo commented 7 years ago

I'm facing the same problem with Whatsapp. It needs to be either https or http

erperejildo commented 7 years ago

On this repo they recommend another solution which is the use of this other library as well: https://dashboard.branch.io So you can use https://recipic.app.link (that's mine) and it's perfectly clickable through Android devices.

BUT (there is always one)

I can't use another internal link to post, options, profile, etc. So...

Custom-URL-scheme: PRO: Using THIS URL I can get the link that the user has clicked so I can redirect the user to that post CON: this url (myapp://) is not clickable on Android phones as you said (not all of them)

Branch library PRO: Using THIS URL it can be opened through every single device CON: If I need to redirect the user to other place, not just open the app, it doesn't work, I always get this: recipic://open!link_click_id=Android but not the real url

How I get the url? Well, this is explained on the README:

handleOpenURL = function handleOpenURL(url) {
    if (url) {
        window.localStorage.setItem('recipic-deep_link', url);
    }
};

I'm a bit confused with this and I can't get this working properly. Do you guys have a better approach?