Ionic App Rate


Ionic App Rate plugin- App Rate plugin provides functionality to prompt the user to rate the App having the options – Now, Later, Never. App Rate functionality requires the Cordova plugin
cordova-plugin-apprate. Here in this tutorial we are going to explain how to install App Rate plugin and use it.


Ionic App Rate | Plugin | Functionality Example

You can install the App rate plugin simply as Below-

Install Plugin

Install Ionic cordova app rate plugin Example:

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

Supported Platforms

This plugin is supported in the following platforms –

  • 1. Android
  • 2. IOS
  • 3. Windows

App Rate Example

Here is simple example of app rate plugin in Ionic-

Install Ionic cordova app rate plugin Example:

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

For Ios app id is required, for Android package name and for windows product Id(Store Id) is required.

Instance Members

App Rate Preferences

td>useLanguage(optional)td>displayAppName(optional)td>promptAgainForEachNewVersion(optional)td>usesUntilPrompt(optional)td>openStoreInApp(optional)td>useCustomRateDialog(optional)td>customLocale(optional)td>callbacks(optional)td>storeAppURL(optional)
Param Type Details
string Custom BCP 47 language tag
string Custom application title
boolean Show dialog again when application version will be updated. Defaults to true
number count of runs of application before dialog will be displayed. Defaults to 3
boolean leave app or no when application page opened in app store (now supported only for iOS). Defaults to false
boolean use custom view for rate dialog. Defaults to false
any Custom locale object
AppRateCallbacks Callbacks for events
AppUrls App Store URLS

App Urls

td>ios(optional)td>android(optional)td>windows(optional)td>blackberry(optional)td>windows8(optional)
Param Type Details
string application id in AppStore
string application url in Google Play Store
string application id in Window Store
string application id in App World
string application id in Window Store

AppRateCallbacks

td>onButtonClickedtd>onRateDialogShow
Param Type Details
Function This function is called when user clicks on the rate button.
Function This function is called when rate dialog is shown.

Advertisements

Add Comment

📖 Read More