Reputation: 31
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
Upvotes: 3
Views: 12759
Reputation: 371
It's now working in both Android & IOS when you paste in browsers but laso some times doesn't work even If you tap, For example If you tap from Discord It was not working in my case, What did I do?
I have page in the middle which handles app links (Deep link with https) If the app is not launched, After loading finished I try to automatically redirect the user to app using deep linking with this code :
function redirectToAPP() {
let currentUrl = window.location.href;
console.log("currentUrl "+ currentUrl)
let modifiedUrl = currentUrl.replace(/^https/, "YOUR-DEEP-LINK-SCHEME");
console.log("modifiedUrl "+ modifiedUrl)
setTimeout(function () {
window.location = modifiedUrl;
}, 100);
}
But also I have button which does the same :
<button class="redirect-button" onclick="redirectToApp()">Redirect to App</button>
If the user doesn't have app installed :
<p class="small-text">Don't have the app? <a href="APP-DOWNLOAD-PAGE">click here</a></p>
This is how telegram handles app links links.
Upvotes: 0
Reputation: 51
While I agree with your answer, I wonder how apps like Slack and Zoom (and many others) manage to push you into their app when you open a link in the browser first (e.g. a link to a chat conversation). This happens without user interaction like clicking a button etc.. – Torsten Engelbrecht May 18 at 11:54
@torsten-engelbrecht You can use JavaScript redirects. For example, create test.html file with content:
<html>
<script>
window.location.replace("zoomus://zoom.us/start?browser=chrome&confno=123456789&zc=0&stype=100&sid=0000000000-00000000000&uid=0000000000-00000000000&token=xxxxxx&uname=Test");
</script>
<body>
</body>
</html>
And try to open it on an Android phone with the Chrome Browser and the Zoom App.
Upvotes: 0
Reputation: 2421
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.
Upvotes: 3
Reputation: 2545
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
<a href="intent://scan/#Intent;scheme=zxing;package=com.google.zxing.client.android;S.browser_fallback_url=http%3A%2F%2Fzxing.org;end"> Take a QR code </a>
But when I removed that fallback URL, it was redirected to the google play store as intended
<a href="intent://scan/#Intent;scheme=zxing;package=com.google.zxing.client.android;end"> Take a QR code </a>
Upvotes: 3