Reference: How do I open any app from my web browser (Chrome) in Android? What do I have to do with the A Href link?
<p>
Take a qr code<br>
</p>
If a user clicks on the link using Android Chrome, then it opens the barcode scanner app. But if I set window.location = "intent url" it doesn't open the barcode scanner app.
intent://scan/#Intent;scheme=zxing;package=com.google.zxing.client.android;end
Does Chrome not allow this? Is there any way to fix this issue?
You can use implicit intent.
A good tutorial can be found here. You can open any custom protocol urls like below, it may be not only chrome, but any mobile browsers.
example://SomeHostPrefix/?UserName=abcdef&SessionId=12345
However, you cannot open arbitrary Apps, the app must have declared something in its manifest file:
Related
I have a pwa1 which will open in in-app browser of pwa2. I have install button for pwa1. But in in-app browser beforeinstallpromt is not getting fired. Any workaround for this?
Open in Chrome this link will open in chrome app from any other browser in Android except in-app browser of PWA. Any way to make it work for in-app browser?
Web share api shows lots of app when clicking share button except chrome app. Any way to add chrome app in sharing suggestions?
No, this only works in top-level browsing contexts according to the spec, but not in nested contexts.
Not that I know of, probably due to a similar limitation as above.
Chrome is not a share target, but you can copy the URL and open the URL on the clipboard with Chrome.
We've a web page that needs to be open in Chrome/Firefox on Android to fully display the content. But when we post the link on Facebook, it always opens the links with its own web browser.
So we're checking if there is a way to force opening the link in Chrome browser from a Facebook post.
Here are some approaches that we tried:
Use Chrome URL Scheme (googlechrome://navigate?url=example.com)
Use window.location.href, window.open (url,"_system"), etc
And even using the intent to launch chrome from the web browser:
What is the intent to launch any website link in Google Chrome
If you have any idea or confirmation that there is no way to force users from Facebook Browser to Chrome (Android OS), please let us know.
Up until recently the googlechrome://navigate?url=example.com approach worked on both Android/iOS Facebook links when using an href with target="_blank". Recently this stopped working on Android Facebook. The only workaround I have found that works is to use an intent: link that does not specify a package path for Chrome. It will open the link using the default browser, so is not guaranteed to be Chrome. The specific link format that worked was:
window.location = 'intent:https://example.com#Intent;end';
IT appears that the intent is matching a generic URL to use the default selected browser when no package is specified.
I'm trying to redirect users from the SnapChat browser to Google Chrome when using an Android Phone.
I have followed the instructions recommending I use this:
Phonegap - How to open external link inside the app
<a href="#" onclick="window.open('https://www.google.com', '_system')">
This follows the link, but keeps me in the in-app-browser.
Further research, however, shows me that '_sytem is relegated just to Cordova etc.
Any suggestions as to how to exit to Google Chrome?
I followed JS - Mobile - Open Safari from any browser and was able to do this successfully on iOS to Safari.
For android only, you can do this:
googlechrome://navigate?url=https://intaface.me/rcv/764e184b-4a43-466e-ae24-12dc14f8684b
For general approach of opening default browser while on in-app browser, you can follow this: https://stackoverflow.com/a/70066226/9814737
I wonder if there is any chance, either javascript or some code, to know if the user is visiting the page on the mobile device directly from the navigator or from a shortcut from the home screen? I need to know this so show a message to invite the user to create a shortcut and then use the web page in the app like mode.
This page notes how you can tell for iOS; you have to set a meta tag to turn on standalone mode and then check window.navigator.standalone.
However, as far as I can tell, there is no equivalent for Android's built-in browser or for Chrome on Android. See the documentation for mobile Chrome: "How can I detect if the app is running as an installed app?
You can’t, directly." And also: "Do not prompt the user to add your app to the homescreen. There is no way to detect if the app is running installed or not."
I just want to ask is there a chance to open url in safari instead of facebook in-app browser with javascript or HTML?
The problem is that I need to open it from either Facebook time line or by clicking link inside in-app browser. I have found some solutions here over stackoverflow, but none of them worked. Maybe you have any suggestions how to do that?
Because I saw that there was some changes over iOS 8, so maybe there is a new way to work around
Unfortunately iOS Safari app doesn't have a URL scheme that you could use to open your links from different app like FB.
You can make it work for a different browser app though, like Chrome. See
http://www.labnol.org/internet/open-in-chrome-bookmarklet/21526/