0
我正試圖讓Visual Studio Cordova項目的應用程序速率插件工作,我無法看到它工作(對於Android設備)。Cordova(Android)。 AppRate插件只是簡單地調出空白屏幕
我基本上有一個按鈕,當點擊時調用我的JavaScript文件中稱爲RateTheApp的方法。
我的代碼如下。我基本上覆制/使用了以下代碼:https://github.com/pushandplay/cordova-plugin-apprate
當我調用我的RateTheApp例程時,設備上的屏幕變爲空白並且什麼也沒有發生。
任何幫助將不勝感激。
謝謝!
特德
AppRate.preferences = {
useLanguage: 'en',
openStoreInApp: true,
displayAppName: 'Here I Am',
usesUntilPrompt: 5,
promptAgainForEachNewVersion: false,
storeAppURL: {
ios: '<my_app_id>',
android: 'market://details?id=com.tedjyoung.hereiam',
windows: 'ms-windows-store://pdp/?ProductId=<the apps Store ID>',
blackberry: 'appworld://content/[App Id]/',
windows8: 'ms-windows-store:Review?name=<the Package Family Name of the application>'
},
customLocale: {
title: "Rate 'Here I Am'",
message: "If you enjoy using 'Here I Am', would you mind taking a moment to rate it? It won’t take more than a minute. Thanks for your support!",
cancelButtonLabel: "No, Thanks",
laterButtonLabel: "Remind Me Later",
rateButtonLabel: "Rate It Now"
}
};
AppRate.preferences = {
useCustomRateDialog: true,
callbacks: {
onRateDialogShow: function (callback) {
callback(1) // cause immediate click on 'Rate Now' button
},
onButtonClicked: function (buttonIndex) {
console.log("onButtonClicked -> " + buttonIndex);
}
}
};
function RateTheApp() {
try {
AppRate.promptForRating(false);
} catch (e) {
alert("Error rating app. Error = " + e.message);
}
}
console中的任何異常?白色的空白屏幕通常意味着你有錯誤 –