アプリに「Rate us」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>
どちらも私にはうまくいきません。上記のコードの問題は何ですか? それを行う方法はありますか?
アプリに「Rate us」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/pushhandplay/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();