PhoneGap - Open external application

前端 未结 4 994
温柔的废话
温柔的废话 2020-12-31 13:15

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 <

4条回答
  •  生来不讨喜
    2020-12-31 13:54

    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

提交回复
热议问题