This plugin provide the rate this app functionality into your Cordova/Phonegap application
- Begging For App Ratings
- Choices And Consequences
- The importance of App Store reviews
- The Rate Friday Initiative
- Prompting for App Reviews
- iOS
- Android
- Windows (experimental)
- Blackberry (experimental)
- Windows8 (experimental)
Phonegap / Cordova 3.0.0 or later
- From apache cordova plugins registry: cordova plugins add cordova-plugin-apprate
- From github repository:	cordova plugins add https://github.com/pushandplay/cordova-plugin-apprate.git
- From phonegap build add the following to your config.xml: <gap:plugin name="cordova-plugin-apprate" />
All %@ patterns in customLocale object will be automatically replaced to your application title
| Option | Type | Default | Description | 
|---|---|---|---|
| useLanguage | {String} | null | custom BCP 47 language tag | 
| displayAppName | {String} | '' | custom application title | 
| promptAgainForEachNewVersion | {Boolean} | true | show dialog again when application version will be updated | 
| usesUntilPrompt | {Integer} | 3 | count of runs of application before dialog will be displayed | 
| openStoreInApp | {Boolean} | false | leave app or no when application page opened in app store (now supported only for iOS) | 
| useCustomRateDialog | {Boolean} | false | use custom view for rate dialog | 
| callbacks.onButtonClicked | {Function} | null | call back function. called when user clicked on rate-dialog buttons | 
| callbacks.onRateDialogShow | {Function} | null | call back function. called when rate-dialog showing | 
| storeAppURL.ios | {String} | null | application id in AppStore | 
| storeAppURL.android | {String} | null | application URL in GooglePlay | 
| storeAppURL.windows | {String} | null | application URL in Windows Store | 
| storeAppURL.blackberry | {String} | null | application URL in AppWorld | 
| storeAppURL.windows8 | {String} | null | application URL in WindowsStore | 
| customLocale | {Object} | null | custom locale object | 
AppRate.preferences.storeAppURL = {
  ios: '<my_app_id>',
  android: 'market://details?id=<package_name>',
  windows: 'ms-windows-store://pdp/?ProductId=<the apps Store ID>',
  blackberry: 'appworld://content/[App Id]/',
  windows8: 'ms-windows-store:Review?name=<the Package Family Name of the application>'
};
AppRate.promptForRating();AppRate.promptForRating(false);If false is not present it will ignore usesUntilPrompt, promptAgainForEachNewVersion, and button logic, it will prompt every time.
AppRate.preferences.callbacks.onButtonClicked = function(buttonIndex) {
  console.log("onButtonClicked -> " + buttonIndex);
};AppRate.preferences.useLanguage = 'ru';AppRate.preferences.customLocale = {
  title: "Rate %@";
  message: "If you enjoy using %@, would you mind taking a moment to rate it? It won’t take more than a minute. Thanks for your support!";
  cancelButtonLabel: "No, Thanks";
  laterButtonLabel: "Remind Me Later";
  rateButtonLabel: "Rate It Now";
};AppRate.preferences = {
  openStoreInApp: true,
  displayAppName: 'My custom app title',
  usesUntilPrompt: 5,
  promptAgainForEachNewVersion: false,
  storeAppURL: {
    ios: '<my_app_id>',
    android: 'market://details?id=<package_name>',
    windows: 'ms-windows-store://pdp/?ProductId=<the apps Store ID>',
    blackberry: 'appworld://content/[App Id]/',
    windows8: 'ms-windows-store:Review?name=<the Package Family Name of the application>'
  },
  customLocale: {
    title: "Rate %@",
    message: "If you enjoy using %@, would you mind taking a moment to rate it? It won’t take more than a minute. Thanks for your support!",
    cancelButtonLabel: "No, Thanks",
    laterButtonLabel: "Remind Me Later",
    rateButtonLabel: "Rate It Now"
  }
};
AppRate.promptForRating();AppRate.preferences = {
  useCustomRateDialog: true,
  callbacks: {
    onRateDialogShow: function(callback){
      callback(1) // cause immediate click on 'Rate Now' button
    },
    onButtonClicked: function(buttonIndex){
      console.log("onButtonClicked -> " + buttonIndex);
    }
  }
};https://github.com/pushandplay/cordova-plugin-apprate/blob/master/www/locales.js
// Getting list of names for available locales
AppRate.locales.getLocalesNames();
// Getting locale object by name
AppRate.locales.getLocale('en');