我想为我的应用添加“评价我们”google play store
链接。Ionic
我尝试如下
window.open('market://details?id=com.app.id', '_system');
<a href="market://details?id=com.app.id" target="_system">Rate us</a>
两者都不适合我。上面的代码有什么问题?有什么办法吗?
我想为我的应用添加“评价我们”google play store
链接。Ionic
我尝试如下
window.open('market://details?id=com.app.id', '_system');
<a href="market://details?id=com.app.id" target="_system">Rate us</a>
两者都不适合我。上面的代码有什么问题?有什么办法吗?
我找到了答案,我们需要安装 InAppBrowser
插件
cordova plugin add org.apache.cordova.inappbrowser
然后使用下面的代码
window.open('market://details?id=com.app.id', '_system');
为什么不使用这个插件: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();
这可以通过自定义网址实现!见这里: http: //mcgivery.com/using-custom-url-schemes-ionic-framework-app/
安装:cordova 插件添加https://github.com/EddyVerbruggen/LaunchMyApp-PhoneGap-Plugin.git --variable URL_SCHEME=ionicapp
您可以将其重定向到市场,如上面的链接所示。