New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

cordova-launch-review

Package Overview
Dependencies
Maintainers
1
Versions
14
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

cordova-launch-review

Cordova/Phonegap plugin to launch the native store app on Android (Google Play) and iOS (App Store) on the review page for a given app.

  • 2.0.0
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
2.2K
decreased by-4.37%
Maintainers
1
Weekly downloads
 
Created
Source

Cordova Launch Review plugin Latest Stable Version Total Downloads

Table of Contents

Overview

This Cordova/Phonegap plugin for iOS and Android launches the native store app in order for the user to leave a review.

On Android, the plugin opens the the app's storepage in the Play Store where the user can leave a review by pressing the stars to give a rating.

On iOS, the plugin opens the app's storepage in the App Store, focuses the Review tab, and automatically opens the dialog for the user to leave a rating or review. On iOS 10.3 and above, there is also support for the in-app ratings dialog which allows a user to rate your app without needing to open the App Store.

The plugin is registered on npm (requires Cordova CLI 5.0.0+) as cordova-launch-review

Installation

Using the Cordova/Phonegap CLI

$ cordova plugin add cordova-launch-review
$ phonegap plugin add cordova-launch-review

PhoneGap Build

Add the following xml to your config.xml to use the latest version from npm:

<gap:plugin name="cordova-launch-review" source="npm" />

Usage

The plugin is exposed via the LaunchReview global namespace.

launch()

Launches the store app using the given app ID. Supports both Android and iOS.

LaunchReview.launch(appId, success, error);

Parameters

  • {string} appID - the platform-specific app ID to use to open the page in the store app
    • On Android this is the full package name of the app. For example, for Google Maps: com.google.android.apps.maps
    • On iOS this is the Apple ID of the app. For example, for Google Maps: 585027354
  • {function} success - Function to execute on successfully launching store app.
  • {function} error - Function to execute on failure to launch store app. Will be passed a single argument which is the error message string.

Example usage

var appId, platform = device.platform.toLowerCase();

switch(platform){
    case "ios":
        appId = "585027354";
        break;
    case "android":
        appId = "com.google.android.apps.maps";
        break;
}

LaunchReview.launch(appId, function(){
    console.log("Successfully launched store app");
},function(err){
    console.log("Error launching store app: " + err);
});

rating()

Opens the in-app ratings dialogs introduced by iOS 10.3. iOS only. Calling this on any platform other than iOS 10.3 or above will result in the error function being called.

LaunchReview.rating(success, error);

Parameters

  • {function} success - Function to execute on successfully launching rating dialog.
  • {function} error - Function to execute on failure to launch rating dialog. Will be passed a single argument which is the error message string.

Example usage

LaunchReview.rating(function(){
    console.log("Successfully opened rating dialog");
},function(err){
    console.log("Error opening rating dialog: " + err);
});

isRatingSupported()

Indicates if the current platform supports in-app ratings dialog, i.e. calling LaunchReview.rating(). Will return true if current platform is iOS 10.3 or above.

LaunchReview.isRatingSupported();

Example usage

if(LaunchReview.isRatingSupported()){
    LaunchReview.rating();
}else{
    LaunchReview.launch(myAppId);
}

Example project

An example project illustrating use of this plugin can be found here: https://github.com/dpa99c/cordova-launch-review-example

Keywords

FAQs

Package last updated on 19 Mar 2017

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc