离子原生app率不起作用

时间:2017-12-05 06:53:29

标签: angular typescript ionic3 ionic-native

我试图在离子版的Android平台上显示应用评级屏幕。不工作的Ionic Native插件。

import { ViewController, Platform } from 'ionic-angular';
import { AppRate } from '@ionic-native/app-rate';        

export class Popover {

    constructor(
        private appRate: AppRate,
        public platform: Platform) { }

        rate() {
            this.platform.ready().then(() => {
            this.appRate.preferences = {
                usesUntilPrompt: 2,
                storeAppURL: {
                    ios: 'id12233',
                    android: 'market://details?id=<com.sample.activity>',
                }
            };
            this.appRate.promptForRating(true);
        });
    }    
}

1 个答案:

答案 0 :(得分:1)

检查您的安装应用率是否插件并尝试以下链接 enter link description here

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