I’m finishing a mobile App using meteor, it will be available for Android and iOS. I’m wondering how can I force some links to be opened outside the App.
I didn’t find any clue on this. I’ve tried with target=" _system" and target=" _blank" but it doesn’t work. What I’m looking for is pretty easy, I just want the following link to open in the external web browser.
I’ve been trying to make it work with this, even when it doesn’t look like the best option, but it doesn’t make anything. The app simply doesn’t open the links…
@aramk Thanks your solution was good except for that I do not have Paths defined. What is Paths? A validation library you added. Can you give info about it? Instead of paths I am using regex to test for url like so:
isUrl = (s) ->
regexp = /(ftp|http|https)://(\w+:{0,1}\w*@)?(\S+)(:[0-9]+)?(/|/([\w#!:.?+=&%@!-/]))?/
regexp.test(s)
When I try to run meteor run android-device with this particular version of InAppBrowser (default appears to be 1.0), I get the following exception:
While running Cordova app for platform Android with options --device:
Error: Command failed:
/dev/hub/.meteor/local/cordova-build/platforms/android/cordova/run
--device
Note: Some input files use or override a deprecated API.
Note: Recompile with -Xlint:deprecation for details.
/devhub/.meteor/local/cordova-build/platforms/android/src/org/apache/cordova/inappbrowser/InAppBrowser.java:120:
error: cannot find symbol
|| Config.isUrlWhiteListed(url)) {
^
symbol: method isUrlWhiteListed(String)
location: class Config
Note: Some input files use or override a deprecated API.
Note: Recompile with -Xlint:deprecation for details.
Note: Some input files use unchecked or unsafe operations.
Note: Recompile with -Xlint:unchecked for details.
1 error
FAILURE: Build failed with an exception.
* What went wrong:
Execution failed for task ':compileDebugJava'.
> Compilation failed; see the compiler error output for details.
* Try:
Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get
more log output.