简体   繁体   中英

The best way of redirecting to Chrome from in-app browser on Android?

I'm making a website which only works on the latest Chrome (above 40) and not on in-app browser such as Facebook's.

I'd like to redirect or show a kind of deeplink to Chrome if people access to the website from Facebook app or other possible apps.

What the best way to redirect people from in-app browser to Chrome?

I checked useragents
On Chrome:

Mozilla/5.0 (Linux; Android 4.4.3; Nexus 5 Build/KTU84M) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/40.0.2214.109 Mobile Safari/537.36

On Facebook in-app browser:

Mozilla/5.0 (Linux; Android 4.4.3; Nexus 5 Build/KTU84M) AppleWebKit/537.36 (KHTML, like Gecko) Version/4.0 Chrome/33.0.0.0 Mobile Safari/537.36 [FB_IAB/FB4A;FBAV/27.0.0.25.15;]

Facebook has some "FB**" inside useragents, is it possible to show a link to open the URL in Chrome?

Thanks in advance.

When your user clicks your URL he will be presented with the relevant browsers to perform the action. That means that the default browser will be presented as a choice alongside Chrome (if installed). You cannot force the user to use chrome let along launch it by yourself (mainly for security reasons.) You must prompt the user to select it by herself.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM