Apache cordova - 如何为Google Play或Itunes打开原生应用程序?

red*_*rom 2 android itunes ios google-play cordova

我想在我的Cordova应用程序中实现以下功能:

如果我点击应用程序应用程序中的按钮打开本地应用程序与谷歌播放或iTunes预定义的URL到我的所有应用程序.

我不想使用inApp浏览器,我想在给定平台上为市场打开本机应用程序.

有插件吗?或者我怎么做到这一点?

我正在使用:

  • 科尔多瓦
  • 离子的

谢谢你的建议.

red*_*rom 11

是否可以使用带有_system参数的inapp浏览器插件:

window.open("market:// details?id = com.your.app","_ system");

$scope.rateApplication = function () {
            var platform = device.platform;
            switch(platform.toLowerCase()) {
                case "android":
                    window.open("market://details?id=com.your.app", "_system");
                    break;
                case "ios":
                    window.open("itunes_url", "_system");
                    break;
            }
        },
Run Code Online (Sandbox Code Playgroud)