PhoneGap - Open external application

amd picture amd · Mar 4, 2014 · Viewed 18.9k times · Source

I am developing a PhoneGap App, All what I need is to open an external application.

e.g. my app namespace is com.demo.app1 and I need to open the com.demo.app2 application, Is this feasible ?

  • I am using PhoneGap 3.3
  • I found that there is many versions of the WebIntent plugin
  • An example may help :)

Thanks

Answer

jcesarmobile picture jcesarmobile · Mar 4, 2014

You can crea a plugin with this java code:

Intent LaunchIntent = this.cordova.getActivity().getPackageManager().getLaunchIntentForPackage("com.demo.app2");
this.cordova.getActivity().startActivity(LaunchIntent);

or try any of this 2 plugins for launching apps

https://github.com/lampaa/org.apache.cordova.startapp

https://github.com/dmedvinsky/cordova-startapp