简体   繁体   中英

Trigger.io: Open url with web browser on Android

I have created a button "Share on Twitter" which opens up the url to share on twitter in mobile web browser this works fine on iOS but does nothing on Android.

Is there something I am missing or don't know about?

    var send = 'http://twitter.com/share';
    var url =  'http://example.com/';
    var text = "Example Text";
    var openURL = send + "?url=" + url + "&text=" + text;
    window.open(openURL, '_blank'); // opens url

Nothing happens on Android but works fine on iOS.

In Trigger apps external pages will by default open in the devices browser, this means you can simply run

window.location = 'http://google.com'

to open an external url in the browser.

If you want a link the user can click then

<a href="http://google.com>Click here</a>

Will also open in the devices browser.

If you want the user to browse an external website within your app you can use the tabs module to open a modal browser window the user can close and return to your app. See https://trigger.io/docs/current/api/modules/tabs.html

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