Flutter教程

App Rate

Contents

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.

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

联系我们?

If you're building a serious project, you can't afford to spend hours troubleshooting. Ionic's experts offer official maintenance, support, and integration help.

Contact Us Today!

Ionic App Rate插件的安装(Installation)

ionic cordova plugin add cordova-plugin-apprate npm install @ionic-native/app-rate
Ionic EE comes with fully supported and maintained plugins from the Ionic Team. Learn More or Contact Us
ionic enterprise register --key=YOURPRODUCTKEY npm install @ionic-enterprise/app-rate

Ionic App Rate插件支持的平台(Supported Platforms)

  • Android
  • BlackBerry 10
  • iOS
  • Windows

Ionic App Rate插件的用法(Usage)

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

constructor(private appRate: AppRate) { }

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

this.appRate.promptForRating(true);

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

this.appRate.promptForRating(false);