App Rate

Improve this doc

$ ionic plugin add cordova-plugin-apprate
$ npm install --save @ionic-native/app-rate

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

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.

Supported platforms

Usage

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

constructor(private appRate: AppRate) { }

...

 this.appRate.preferences.storeAppURL = {
   ios: '<my_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.

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)

API

Native

General