Open link in system browser from OutsystemsNow application

Open link in system browser from OutsystemsNow application

  
Is it possible and how to put a external link in application that is run via OutsystemsNow  so it will open in system browser (safari or chrome) instead of load inside current webView off OSNow ?

Thank you.
Solution
Hi Mykola,

Yes. You need a cordova plugin named InAppBrowser, that enables you to control where a given http request is open (webview, browser in webview, or system browser).
We've already created a wrapper to this plugin - Now Plugin InAppBrowser.

Cheers,
RG
Solution
Hi Rúben,
I've seen this wrapper but got confused with its description:
 "...The InAppBrowser is not subject to the whitelist, nor is opening links in the system browser."

Thanks for clearing it out - will implement this plugin to our project :)

Best,
Nick

 


Cool!
Just removed the bold part since it was indeed confusing... (it was copied from the plugin documentation on github).

Thanks for the feedback! :)

Cheers,
RG

Hi Rúben,

I was trying to add InAppBrowser plugin  (https://github.com/apache/cordova-plugin-inappbrowser) to OSNow to use it in project but have troubles installing plugin. I've put clean Android OSNow project  (latest from github)under git and after instaling plugin using "cordova plugin add" commited only files and changes related to new plugin and revert changes that installation made to other plugin files and setting (like colors.xml). I've created a new app in ServiceStudio and add OsNow and InAppBrowser dependensies, add link to "google.com" and set it up to open in SystemBrowser.
When i run project on emulator i have this error in console:
04-22 12:55:42.650 2563-2614/? W/System.err:
Caused by: java.lang.NoClassDefFoundError: Class not found using the boot class loader; no stack trace available
04-22 12:55:42.650 2563-2614/? I/System.out: Error adding plugin org.apache.cordova.inappbrowser.InAppBrowser.

In attached screenshot are files that was added to project. Am I missing something?

PS: This seems like it is similar problem to one is discussed here (http://www.outsystems.com/forums/discussion/17901/outsystems-now-install-additional-plugins-error-libsqlc-native-driver-so-not-fo/). Only difference is that we thought it might be a plugin itself problem but as InAppBrowser has official wrapper I assume it is well tested and it is definately me missing something on configurations.

Thank you.

Cheers,
Nick


Hi again Rúben,

I've tried again with InAppBrowser plugin and this time it worked perfectly)) So probably was missing some file when "cleaning" files after plugin installation.

It would be good to have a documentation regarding this like the video instructions on iOS.

Anyway thanks for ise to use version control for discovering changed files :)

Cheers,
Nick

Hi Mykola, 

Looking for the error, I believe that it is an issue on the instalition of plugin. I tried my side install the plugin and it installed without problems. 
 
Wthat's the version of Cordova that you have installed? 
 
Cheers,
Vitor
Awesome! Glad to hear! 

Can you just specify how you solved it, so that the next person with the same issue finds an answer, would be great!

Regarding your documentation suggestion, it is true... not enough indeed... :/
You're most welcome to help however or whenever you can!

Cheers,
RG





Hi Vitor,
My cordova is 6.1.1 (I've tried with 4 and 5 also)
From your reply it looks like you have installed plugin really simple and I'm missing something obvious and overcomplicating things but each time I run Cordova CLI commands project is not build anymore in Android Studio and have different kind of errors (http://www.outsystems.com/forums/discussion/17901/outsystems-now-install-additional-plugins-error-libsqlc-native-driver-so-not-fo/) due to changes that installation made on project and other plugins files.

As I mentioned problem is solved. That's what I did:
  •  load clean OSNow android 
  •  create new local git repository (I'm using SourceTree) in that folder
  •  commit all files as "clean version"
  •  in terminal navigate to /outsystems-app-android/Outsystems folder and run "cordova plugin add https://github.com/apache/cordova-plugin-inappbrowser.git"
  •  check what files where added and changed on SourceTree and commit only files and line related to inAppBrowser plugin and revoke  and remove all other changes.

Cheers, 
Nick




Hi Mykola,

Have you tried using "external:" as a prefix for your URL, e.g. "external:http://www.google.com" should open the link in the device's browser.

Cheers