I wanted to add "Rate us" google play store
link for my Ionic
app. I tried as follows
window.open('market://details?id=com.app.id', '_system');
<a href="market://details?id=com.app.id" target="_system">Rate us</a>
Both does not work for me. What is the problem in above code? is there any way to do it?
I found an answer, we need to install InAppBrowser
plugin
cordova plugin add org.apache.cordova.inappbrowser
Then use the following code
window.open('market://details?id=com.app.id', '_system');
Why not use this plugin: https://github.com/pushandplay/cordova-plugin-apprate
I use it with success like this :
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();
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With