“评价这个应用程序”google play store链接在离子应用程序

问题描述:

我想添加“评价我们”google play store链接为我的Ionic应用程序。我尝试如下“评价这个应用程序”google play store链接在离子应用程序

​​

两者都不适合我。上述代码中的问题是什么?有没有办法做到这一点?

+0

你有没有尝试'target =“_ top”' – Jerome 2014-12-04 16:00:08

+0

抱歉。这是行不通的。 – 2014-12-05 12:53:47

+0

请阅读此页。如果您在android中工作,则需要将市场作为链接。已经坚持了几个小时,以找到如何实现这个事情。 https://developer.android.com/distribute/marketing-tools/linking-to-google-play.html#OpeningPublisher – 2017-10-09 11:17:04

为什么不使用这个插件:https://github.com/pushandplay/cordova-plugin-apprate

我成功使用它像这样:

 AppRate.preferences.useLanguage = cfg.useLanguage; 
     AppRate.preferences.storeAppURL.ios = cfg.appStoreAppURL.ios; 
     AppRate.preferences.storeAppURL.android = cfg.appStoreAppURL.android; 
     AppRate.preferences.customLocale = cfg.customLocale; 
     AppRate.preferences.displayAppName = cfg.displayAppName; 
     AppRate.preferences.usesUntilPrompt = cfg.usesUntilPrompt; 
     AppRate.preferences.promptAgainForEachNewVersion = false; 
     AppRate.promptForRating(); 
+0

谢谢。但我也使用'AppRate.preferences.storeAppURL.android ='market:// details?id = ''为什么它不适合我? – 2014-12-05 12:52:49

+0

我正在使用这个“市场:// details?id = com.app.id”,它正在工作。这在你的浏览器中工作吗? https://play.google.com/store/apps/details?id=com.app.id通过使用“_system”的方式,我认为你需要InAppBrowser插件。 – 2014-12-05 16:06:18

+0

太好了。添加InAppBrowser插件后,它可以工作。谢谢 – 2014-12-06 11:13:07

我找到了答案,我们需要安装InAppBrowser插件

cordova plugin add org.apache.cordova.inappbrowser 

然后使用以下代码

window.open('market://details?id=com.app.id', '_system'); 

这是可能的自定义网址! 在这里看到:​​

安装:科尔多瓦插件添加https://github.com/EddyVerbruggen/LaunchMyApp-PhoneGap-Plugin.git --variable URL_SCHEME = ionicapp

您可以将其重定向到市场如上链接显示。