Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

"Rate this app" google play store link in Ionic app

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?

like image 558
Fizer Khan Avatar asked Oct 18 '25 17:10

Fizer Khan


2 Answers

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');
like image 187
Fizer Khan Avatar answered Oct 20 '25 07:10

Fizer Khan


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();
like image 24
jp wizer Avatar answered Oct 20 '25 07:10

jp wizer



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!