"Rate this app" link on Google Play in the Ionic app

I wanted to add a Rate Us link google play store

for my application Ionic

. I have 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 don't work for me. What is the problem in the above code? is there any way to do this?

+3


source to share


3 answers


Why not use this plugin: https://github.com/pushandplay/cordova-plugin-apprate

I use it with success as follows:



        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();

      

+4


source


I found the answer, we need to install the plugin InAppBrowser

cordova plugin add org.apache.cordova.inappbrowser

      



Then use the following code

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

      

+4


source


This is possible with custom URLs! See here: http://mcgivery.com/using-custom-url-schemes-ionic-framework-app/

install: cordova plugin add https://github.com/EddyVerbruggen/LaunchMyApp-PhoneGap-Plugin.git --variable URL_SCHEME = ionicapp

you can redirect it to the market as shown above.

0


source







All Articles