Open Links outside the App


#21

About Paths - seems to be a small package with various utilities: https://github.com/aramk/meteor-utility/blob/master/src/Paths.coffee

Does a simple check only:

  isUrl: function(path) {
    return Types.isString(path) && path.indexOf('://') >= 0;

#22

As of now, with Meteor 1.3 and cordova-plugin-inappbrowser@1.3.0, the below line seems to be enough to open links on both Android and iOS.

window.open(url, ‘_system’);


#23

its still not working on my side


#24

Did you add the App.accessRule to your mobile-config.js file? Something like:

App.accessRule('http://*', {type: 'intent'});
App.accessRule('https://*', {type: 'intent'});

#25

I added type navigation, then it worked.


#26

What was the final solution of this @julianmwagner? Could you share what you have done to get this working?


#27

App.accessRule(’*’, { type: ‘navigation’ })

try this one


#28

How to pass post params?


#29

Sorry for bumping, but these events never seem to get fired, and the link just opens in the app itself. Does anyone have any idea what I could have done wrong, or maybe the method has changed with Meteor 1.6?

EDIT:
Attaching "click a" on Template.body worked after using the gwendall:body-events package from Atmosphere.


#30

Modify mobile-config.js and add lines

App.accessRule('http://*', {type: 'intent'});
App.accessRule('https://*', {type: 'intent'});
App.accessRule('skype:*', {type: 'intent'})

Setting {type: 'intent'} asks the user which app to use for opening the link while {type: 'navigation'} opens the link in-app


#31

Hi, I’d like to give the choice on the same template between opening the same link http(s) either in app (1 link), or in external browser (2nd link). Is there a simple way to do this ?