简体   繁体   中英

Redirect from in-app-browser to Google Chrome on Android using JavaScript

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/29241132/9814737

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