Name: cordova-plugin-apprate
Owner: Poll Everywhere
Description: This plugin provide the "rate this app" functionality into your Cordova/Phonegap application
Created: 2018-02-23 03:52:53.0
Updated: 2018-02-23 03:52:55.0
Pushed: 2018-02-23 03:56:36.0
Size: 380
Language: JavaScript
GitHub Committers
User | Most Recent Commit | # Commits |
---|
Other Committers
User | Most Recent Commit | # Commits |
---|
A plugin to provide rate this app functionality into your cordova application
PR's are greatly appreciated Donate with PayPal
cordova plugin add cordova-plugin-apprate
cordova plugin add https://github.com/pushandplay/cordova-plugin-apprate.git
<gap:plugin name="cordova-plugin-apprate" />
These options are available on the AppRate.preferences
object.
| Option | Type | Default | Description | | :—— | :—- | :——- | :———– | | useLanguage | String | null | custom BCP 47 language tag | | displayAppName | String | '' | custom application title | | promptAgainForEachNewVersion | Boolean | true | show dialog again when application version will be updated | | usesUntilPrompt | Integer | 3 | count of runs of application before dialog will be displayed | | inAppReview | Boolean | true | iOS Only. Write review directly in your application (iOS 10.3+), limit of 3 prompts per year. Fallback to opening the store within the app for other iOS versions. Use false to use in app browser. | | simpleMode | Boolean | false | enabling simplemode would display the rate dialog directly without the negative feedback filtering flow| | callbacks.onButtonClicked | Function | null | call back function. called when user clicked on rate-dialog buttons | | callbacks.onRateDialogShow | Function | null | call back function. called when rate-dialog showing | | storeAppURL.ios | String | null | application id in AppStore | | storeAppURL.android | String | null | application URL in GooglePlay | | storeAppURL.windows | String | null | application URL in Windows Store | | storeAppURL.blackberry | String | null | application URL in AppWorld | | storeAppURL.windows8 | String | null | application URL in WindowsStore | | customLocale | Object | null | custom locale object |
Makes sure all your calls to the plugin happen after the cordova onDeviceReady
event has fired.
ate.preferences.storeAppURL = {
s: '<my_app_id>',
droid: 'market://details?id=<package_name>',
ndows: 'ms-windows-store://pdp/?ProductId=<the apps Store ID>',
ackberry: 'appworld://content/[App Id]/',
ndows8: 'ms-windows-store:Review?name=<the Package Family Name of the application>'
ate.promptForRating();
ate.promptForRating(false);
If false is not present it will ignore usesUntilPrompt, promptAgainForEachNewVersion, and button logic, it will prompt every time.
ate.preferences.callbacks.onButtonClicked = function(buttonIndex) {
nsole.log("onButtonClicked -> " + buttonIndex);
ate.preferences.useLanguage = 'ru';
Note: %@
patterns in title
and message
will be automatically replaced with AppRate.preferences.displayAppName
ate.preferences.customLocale = {
tle: "Would you mind rating %@?",
ssage: "It won?t take more than a minute and helps to promote our app. Thanks for your support!",
ncelButtonLabel: "No, Thanks",
terButtonLabel: "Remind Me Later",
teButtonLabel: "Rate It Now",
sButtonLabel: "Yes!",
ButtonLabel: "Not really",
pRatePromptTitle: 'Do you like using %@',
edbackPromptTitle: 'Mind giving us some feedback?',
ate.preferences = {
splayAppName: 'My custom app title',
esUntilPrompt: 5,
omptAgainForEachNewVersion: false,
AppReview: true,
oreAppURL: {
ios: '<my_app_id>',
android: 'market://details?id=<package_name>',
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>'
stomLocale: {
title: "Would you mind rating %@?",
message: "It won?t take more than a minute and helps to promote our app. Thanks for your support!",
cancelButtonLabel: "No, Thanks",
laterButtonLabel: "Remind Me Later",
rateButtonLabel: "Rate It Now",
yesButtonLabel: "Yes!",
noButtonLabel: "Not really",
appRatePromptTitle: 'Do you like using %@',
feedbackPromptTitle: 'Mind giving us some feedback?',
llbacks: {
handleNegativeFeedback: function(){
window.open('mailto:feedback@example.com','_system');
},
onRateDialogShow: function(callback){
callback(1) // cause immediate click on 'Rate Now' button
},
onButtonClicked: function(buttonIndex){
console.log("onButtonClicked -> " + buttonIndex);
}
ate.promptForRating();
etting list of names for available locales
ate.locales.getLocalesNames();
etting locale object by name
ate.locales.getLocale('en');
https://github.com/pushandplay/cordova-plugin-apprate/blob/master/www/locales.js
Currently maintained by @westonganger
Created by @pushandplay - Donate with PayPal