且构网

分享程序员开发的那些事...
且构网 - 分享程序员编程开发的那些事

离子本机应用程序速率不适用于Android

更新时间:2022-01-24 14:42:20

您需要添加其他配置设置.我犯了与您无意中犯的错误相同的错误.在构造函数中包含以下代码,

You need to add other configuration settings. I committed the same mistake that you have inadvertently made. Include the following code in the constructor,

appRate.preferences = {
    storeAppURL: {
      ios: '<app_id>',
      android: 'market://details?id=<package_name>',
      windows: 'ms-windows-store://review/?ProductId=<store_id>'
    },
    customLocale: {
      title: 'Do You Enjoy?',
      message: 'Please Rate Us',
      cancelButtonLabel: 'No Thanks',
      laterButtonLabel: 'Remind me later',
      rateButtonLabel: 'Rate It Now',

    },
    callbacks: {
      onRateDialogShow: function (callback) {
        console.log('dfcsd');
      },
      onButtonClicked:function(buttonIndex){
        console.log('Selected Index is '+buttonIndex);
      }
    },
    simpleMode:true
  }

添加完整的配置设置,包括回调和customLocale,如上面的代码所示.最后,在rate()函数中,

Add the full configurations settings including the callbacks and customLocale as evident from the code above. And then finally, in the rate() function,

 this.appRate.promptForRating(true);