Software Archive
Read-only legacy content
17061 Discussions

Open url in external browser (android)

Sam_K_1
Beginner
542 Views
  • I want to open a web page, in the user's default web browser (not inside my app).
  • built using intel xdk (3088) on windows 8
  • It does not seem to generate and error, it just does nothing.
  • I do have the device plugin added.
  • It seems to work on the emulate tab

my code:

function openLink (url) {
    intel.xdk.device.launchExternal(url);
}

openLink('https://twitter.com/');

Also tried:

  • window.open(url, '_blank');
  • window.open(url, '_system', 'location=yes');
  • window.open(url, '_blank', 'location=no');
  • adding http://* to build settings>android>whitelist>intent(allow-intent)
  • changing http://*/* to http://* in build settings>android>whitelist>intent(allow-intent)
  • adding * to build settings>android>whitelist>intent(allow-intent)
  • adding http://twitter.com/ to build settings>android>whitelist>intent(allow-intent)
  • crosswalk version 14
  • crosswalk version 15
  • unchecking 'optimize with crosswalk'
  • building an apk and installing rather than using the app preview
0 Kudos
1 Solution
Rakshith_K_Intel
Employee
542 Views
  • window.open(url, '_system', 'location=yes');

is the correct option.

you also have to add the "InAppBrowser" plugin from IntelXDK -> Project settings -> plugin management -> core plugins

View solution in original post

0 Kudos
2 Replies
Rakshith_K_Intel
Employee
543 Views
  • window.open(url, '_system', 'location=yes');

is the correct option.

you also have to add the "InAppBrowser" plugin from IntelXDK -> Project settings -> plugin management -> core plugins

0 Kudos
Sam_K_1
Beginner
542 Views

Thank you very much, both of those work.

I guess I assumed that InAppBrowser was only for opening pages inside your app. Should have read the description!

0 Kudos
Reply