Mobideck / appdeck

AppDeck is a mobile hybrid application engine for iOS and Android.
http://www.appdeck.mobi/
47 stars 22 forks source link

Open link in a different app? #34

Open RoboKopf opened 8 years ago

RoboKopf commented 8 years ago

Is it possible to force a link to open in an external browser? What about forcing a link to open in a different app, such as a file manager?

If so, how?

I'm asking because I need to allow users of my app to download/unzip zip files.

RoboKopf commented 8 years ago

To be more clear: if I tap on a .zip file link in either Safari iOS or Chrome Mobile on Android, I can download the file to my device (although a file manager app is needed for iOS). However, if I tap this same link on a page inside my appdeck app (either platform), nothing happens.

mdekermadec commented 8 years ago

There is an undocumented API that should do that:

app.loadextern(url);

You can try it for now, I will re-check and secure the code by adding test case about it.

The point with this api is to load an URL by letting OS take care of how it should be open.

RoboKopf commented 8 years ago

Great! Thanks! This works as desired in iOS but has no effect in Android (I haven't rebuilt yet, though, so maybe it will work after that).