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.
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.
i have a website that works perfectly but I would like to open a specific page on it only if the user is on a PC and more specifically with Chrome or Mozilla browser.
I found that this is possible with the user agent but I didn't know how to use it properly.
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:
i need to redirect the user from chrome to google play to download my android applications. so i run this code in the web page which is opened by chrome :
window.location=https://play.google.com/store/apps/details?id=mypackageName.comf&referrer=utm_source%3DtestSource512%26utm_medium%3DtestMedium512%26anid%3Dadmob
I don't know why the chrome replace the referrer with :com.android.chrome
is it possible to prevent the chrome from replacing the referrer and just use the given referrer.
thanks
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/