Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

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.

like image 224
GeneralBear Avatar asked Oct 23 '25 09:10

GeneralBear


1 Answers

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

like image 132
Phạm Huy Phát Avatar answered Oct 24 '25 22:10

Phạm Huy Phát



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!