Building apps at a large company? Check out Ionic Enterprise

App Rate

Improve this doc

The AppRate plugin makes it easy to prompt the user to rate your app, either now, later, or never.

Requires Cordova plugin: cordova-plugin-apprate. For more info, please see the AppRate plugin docs.

Repo: https://github.com/pushandplay/cordova-plugin-apprate

Installation

  1. Install the Cordova and Ionic Native plugins:
    $ ionic cordova plugin add cordova-plugin-apprate
    $ npm install --save @ionic-native/app-rate
    
  2. Add this plugin to your app's module

Supported platforms

Usage

import { AppRate } from '@ionic-native/app-rate';

constructor(private appRate: AppRate) { }

...
// set certain preferences
this.appRate.preferences.storeAppURL = {
  ios: '<app_id>',
  android: 'market://details?id=<package_name>',
  windows: 'ms-windows-store://review/?ProductId=<store_id>'
};

this.appRate.promptForRating(true);

// or, override the whole preferences object
this.appRate.preferences = {
  usesUntilPrompt: 3,
  storeAppURL: {
   ios: '<app_id>',
   android: 'market://details?id=<package_name>',
   windows: 'ms-windows-store://review/?ProductId=<store_id>'
  }
};

this.appRate.promptForRating(false);

Instance Members

preferences

Configure various settings for the Rating View. See table below for options

promptForRating(immediately)

Prompts the user for rating

Param Type Details
immediately boolean

Show the rating prompt immediately.

navigateToAppStore()

Immediately send the user to the app store rating page

AppRatePreferences

Param Type Details
useLanguage string

Custom BCP 47 language tag

(optional)
displayAppName string

Custom application title

(optional)
promptAgainForEachNewVersion boolean

Show dialog again when application version will be updated. Defaults to true

(optional)
usesUntilPrompt number

count of runs of application before dialog will be displayed. Defaults to 3

(optional)
openStoreInApp boolean

leave app or no when application page opened in app store (now supported only for iOS). Defaults to false

(optional)
useCustomRateDialog boolean

use custom view for rate dialog. Defaults to false

(optional)
customLocale any

Custom locale object

(optional)
callbacks AppRateCallbacks

Callbacks for events

(optional)
storeAppURL AppUrls

App Store URLS

(optional)

AppUrls

Param Type Details
ios string

application id in AppStore

(optional)
android string

application URL in GooglePlay

(optional)
windows string

application URL in Windows Store

(optional)
blackberry string

application URL in AppWorld

(optional)
windows8 string

application URL in WindowsStore

(optional)

AppRateCallbacks

Param Type Details
onButtonClicked Function

call back function. called when user clicked on rate-dialog buttons

(optional)
onRateDialogShow Function

call back function. called when rate-dialog showing

(optional)
handleNegativeFeedback Function

call back function. called when user clicked on negative feedback

(optional)

API

Native

General