Android react-native deep linking and application embedded browser - android

I have a react-native application which use deep linking for Android.
Basically I have a working setup, which means that when im testing on a real device if I go to my website page displaying a link mapped by the AndroidManifest.xml, my app is correctly opening when clicking on the link. Same thing when I'm clicking the mapped link directly from Gmail app or Slack, everything works correctly.
However, when I'm going to my website page (which is displaying the mapped link) from the "embedded" Gmail or Slack browser and clicking on the link, the deep link doesn't work and it redirects on the web directly without asking to open the app first.
It seems a strange behaviour for me and after some research I wasn't able to find an explanation or a solution, so anyone have an idea on how to handle this ?
Thank you for your time.

Related

Deep linking not working in chrome mobile browser

I am facing issue of deeplink. We have created a deep link for mobile application post but at google chrome mobile browser, its not opening the app screen. I saw same issues with amazon app deep links also.
At very first load it did not open app but second time it open app
Also make sure that you are tapping on the link. The chrome developers consider everything entered into the browser as user intention to open it in the browser.
So if you enter your link that you wish to deep link into your app in the chrome browser - it will open in the browser. But if you copy/paste it e.g. in notes app (social media etc.) and then tap on it - it will open your application if you have properly configured deep / app links.
I also got the same issue and I found a really good article regarding chrome browser with a deep link. (https://developer.chrome.com/docs/multidevice/android/intents/)
I first try out it with a fallback URL and the google chrome mobile browser doesn't work
Take a QR code
But when I removed that fallback URL, it was redirected to the google play store as intended
Take a QR code

Firebase Dynamic Link when typed into Android Address Bar

As you can see here, i want to change the behavior of my Firebase Dynamic Link when it is typed into the Android Browser, because right now it redirects me to the PlayStore instead of Deep Linking into the app. How can i achieve such behavior?
While creating dynamic link you need to specify either you want to open any specific URL in browser or you need to open your app.
If you need to open your app when dynamic link gets clicked then at the time of creating new dynamic link you need to choose your app from drop down list instead of giving url.
If the app is installed already it will open it otherwise redirect you towards playstore.
For opening app from deep link you need to write code into your activity that can handle the coming deep link.
Chrome doesn't open the deep links some time due to wontfix bug in Chrome 40+.
Mentioned in link for detail.
Same is the case with Firebox and other browsers.
firefox broswer issue
Related Problem

How to prevent Chrome from opening App Links

I have an android application say Sample App. I want to add App Links according to Android Developer Guide. I was successful in implementing them, but there was an problem with Chrome. When I access the corresponding Sample Web App and there is <a> tag with href="https://www.sample.com/profile" and it's also supported by App, it opens in app instead of continuing in Chrome.
I checked documentation and it is supposed to be default behavior of Chrome. But then I came across Linkedin app. The My Network tab they have when clicked in browser continues in browser but same link if I save to docs or any other application and click it then it opens in native app.
I want to know how this is done?
I believe this is because, as you said, the standard deep linking behavior is to route to the app if it is installed. This behavior is handed-off immediately when the link is clicked because your app overriders that url to be handled by app instead of Chrome.
First, I believe that you should route users to your application because its a better, more engaging experience, presumably.
If you are convinced, then I would change your manifest to strictly handle links that you want to handle. See this post to see how to handle only certain links.

Deep linking doesn't work correctly in Android 7

I've encountered that links like:
intent://#Intent;scheme=somescheme;package=com.some.package;S.browser_fallback_url=market%3A%2F%2Fdetails?id=com.some.package;
do not work correctly in Android 7 (7.1.1) systems, while in previous versions they work as intended. By "do not work correctly" I mean that if we have a required app installed to open this link, then everything goes as it should and this app opens when we click this link. But when we don't have the required app, a correct redirect on the fallback url is not processed: we're getting on a search results page or a blank page with a message about an incorrect redirect in a web browser.
Trying to find out how to solve this problem (maybe just by modifying the deep link), any suggestions will be appreciated.

Deep linking not working in chrome

I am trying to do deep linking such that when someone opens a link from mobile browser, it either opens the app, if it is installed or opens the play store link to download the app.
Here is my URI :
intent://scan/#Intent;scheme=com.example.android;package=com.example.android;end
When I type this in Mozilla Firefox app on Android, it opens my app if it is installed or opens the play store link if it not installed. But, when I type the same thing in Chrome, instead of opening app or play store, it just does a google search. What is wrong with my solution and how do I make it work?
This is a known wontfix bug in Chrome 40+ (see the Chromium project ticket here for the full story).
Essentially, the Chrome team feels that if a user actually types something into the address bar, no redirect should ever happen. As you've discovered, this is counter to behavior in all other browsers.
Fortunately it's unlikely a user would actually type an intent:// URI by hand. If you wrap the URL inside a link on a webpage, or offer a link to another page and then issue a redirect of some kind (so that you can detect the user agent and not show a 'broken' intent:// link to users on other browsers), it should work correctly.
If you don't want to handle all these edge cases, you could also try a free service like Branch.io (full disclosure: I'm on the team).

Categories

Resources