【问题标题】:Launch external app android启动外部应用程序 android
【发布时间】:2016-07-20 14:45:38
【问题描述】:

我正在使用 ionic 和 cordova 构建应用程序。我正在尝试打开一个我无权访问其源代码的外部应用程序。我只知道包名。我正在尝试做的事情真的可能吗?

CDV.WEBINTENT.startActivity({
     action: CDV.WEBINTENT.ACTION_VIEW,
     url: "content://com.test.123.GameActivity"
},
function() {},
function() {
     alert('Failed to open URL via Android Intent')
});

【问题讨论】:

    标签: android cordova ionic-framework webintents


    【解决方案1】:

    你看过这个教程吗?

    how-to-launch-external-application-with-ionic-framework

    如果这有帮助,这就是你在 Java 中的做法:

    Intent launchIntent = getPackageManager().getLaunchIntentForPackage("package name here");
    
    startActivity(launchIntent);
    

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 2011-08-03
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多