npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

cordova-plugin-apprate2

v0.1.7

Published

This plugin provide the rate this app functionality into your Cordova/Phonegap application<br>

Downloads

6

Readme

AppRate Cordova/Phonegap plugin

This plugin provide the rate this app functionality into your Cordova/Phonegap application

Issues list and features requests here

Donate with PayPal

Read before implementation

Read before writing review

Supported platforms

  • iOS
  • Android
  • Blackberry (experimental)
  • Windows8 (experimental)

Requirements

Phonegap / Cordova 3.0.0 or later

Installation

  • From github repository:

    cordova plugins add https://github.com/pushandplay/cordova-plugin-apprate.git
    		
  • From apache cordova plugins registry:

    cordova plugins add org.pushandplay.cordova.apprate
    	
  • From phonegap build add the following to your config.xml:

    <gap:plugin name="org.pushandplay.cordova.apprate" />

Customization and usage

Note

All %@ patterns in customLocale object will be automatically replaced to your application title

Available preferences options

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
openStoreInApp {Boolean} false - leave app or no when application page opened in app store (now supported only for iOS)
useCustomRateDialog {Boolean} false - use custom view for rate dialog
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.blackberry {String} null - application URL in AppWorld
storeAppURL.windows8 {String} null - application URL in WindowsStore
customLocale {Object} null - custom locale object

Examples

Simple setup and call

AppRate.preferences.storeAppURL.ios = '<my_app_id>';
AppRate.preferences.storeAppURL.android = 'market://details?id=<package_name>';
AppRate.preferences.storeAppURL.blackberry = 'appworld://content/[App Id]/';
AppRate.preferences.storeAppURL.windows8 = 'ms-windows-store:Review?name=<the Package Family Name of the application>';
AppRate.promptForRating();

Call rate dialog immediately

AppRate.preferences.storeAppURL.ios = '<my_app_id>';
AppRate.promptForRating(true);

Override dialog button callback

var onButtonClicked = function(buttonIndex) {
	console.log("onButtonClicked -> " + buttonIndex);
};

AppRate.preferences.storeAppURL.ios = '<my_app_id>';
AppRate.preferences.storeAppURL.android = 'market://details?id=<package_name>';
AppRate.preferences.callbacks.onButtonClicked = onButtonClicked;
AppRate.promptForRating();
	

Set custom language

AppRate.preferences.useLanguage = 'ru';
AppRate.preferences.storeAppURL.ios = '<my_app_id>';
AppRate.preferences.storeAppURL.android = 'market://details?id=<package_name>';
AppRate.promptForRating();

Set custom Locale object

var customLocale = {};
customLocale.title = "Rate %@";
customLocale.message = "If you enjoy using %@, would you mind taking a moment to rate it? It won’t take more than a minute. Thanks for your support!";
customLocale.cancelButtonLabel = "No, Thanks";
customLocale.laterButtonLabel = "Remind Me Later";
customLocale.rateButtonLabel = "Rate It Now";

AppRate.preferences.storeAppURL.ios = '<my_app_id>';
AppRate.preferences.storeAppURL.android = 'market://details?id=<package_name>';
AppRate.preferences.customLocale = customLocale;
AppRate.promptForRating();

Full setup

var customLocale = {};
customLocale.title = "Rate %@";
customLocale.message = "If you enjoy using %@, would you mind taking a moment to rate it? It won’t take more than a minute. Thanks for your support!";
customLocale.cancelButtonLabel = "No, Thanks";
customLocale.laterButtonLabel = "Remind Me Later";
customLocale.rateButtonLabel = "Rate It Now";

AppRate.preferences.openStoreInApp = true;
AppRate.preferences.storeAppURL.ios = '<my_app_id>';
AppRate.preferences.storeAppURL.android = 'market://details?id=<package_name>';
AppRate.preferences.customLocale = customLocale;
AppRate.preferences.displayAppName = 'My custom app title';
AppRate.preferences.usesUntilPrompt = 5;
AppRate.preferences.promptAgainForEachNewVersion = false;
AppRate.promptForRating();

Callbacks setup and use custom rate-dialog

var onRateDialogShow = function(callback) {
	console.log("onRateDialogShow");
	//	call this callback when user click on button into your custom rate-dialog
	//	for example: simulate click on "Rate now" button and display store
	callback(3)
};
var onButtonClicked = function(buttonIndex) {
	console.log("onButtonClicked -> " + buttonIndex);
};

AppRate.preferences.storeAppURL.ios = '<my_app_id>';
AppRate.preferences.useCustomRateDialog = true;
AppRate.preferences.callbacks.onRateDialogShow = onRateDialogShow;
AppRate.preferences.callbacks.onButtonClicked = onButtonClicked;

//	True param show rate-dialog immediately and useful for testing or custom logic
AppRate.promptForRating(true);
	

Already included translations

ar, bn, ca, cs, da, de, de-AT, el, en, es, fa, fr, he, hi, id, il, ja, ko, nl, no, pa, pl, pt, ru, sk, sl, sv, th, tr, uk, ur, ur-IN, ur-PK, vi, zh-TW, zh-Hans, zh-Hant

Access to locales

//	Getting list of names for available locales
AppRate.locales.getLocalesNames();

//	Getting locale object by name
AppRate.locales.getLocale('en');

You can add a new translation here: https://crowdin.net/project/apprate-cordovaphonegap-plugin

Licence

The Apache 2.0 License