![Oracle Drags Its Feet in the JavaScript Trademark Dispute](https://cdn.sanity.io/images/cgdhsj6q/production/919c3b22c24f93884c548d60cbb338e819ff2435-1024x1024.webp?w=400&fit=max&auto=format)
Security News
Oracle Drags Its Feet in the JavaScript Trademark Dispute
Oracle seeks to dismiss fraud claims in the JavaScript trademark dispute, delaying the case and avoiding questions about its right to the name.
cordova-launch-review
Advanced tools
Cordova/Phonegap plugin for iOS and Android to assist in leaving user reviews/ratings in the App Stores.
Table of Contents
Cordova/Phonegap plugin for iOS and Android to assist in leaving user reviews/ratings in the App Stores.
The plugin published to npm as cordova-launch-review
I dedicate a considerable amount of my free time to developing and maintaining this Cordova plugin, along with my other Open Source software. To help ensure this plugin is kept updated, new features are added and bugfixes are implemented quickly, please donate a couple of dollars (or a little more if you can stretch) as this will help me to afford to dedicate time to its maintenance. Please consider donating if you're using this plugin in an app that makes you money, if you're being paid to make the app, if you're asking for new features or priority bug fixes.
$ cordova plugin add cordova-launch-review
The plugin is exposed via the LaunchReview
global namespace.
Platforms: Android and iOS
Launches the App Store page for the current app in order for the user to leave a review.
On Android, opens the app's in the Play Store where the user can leave a review by pressing the stars to give a rating.
On iOS, opens the app's page in the App Store and automatically opens the dialog for the user to leave a rating or review.
LaunchReview.launch(success, error, appId);
com.google.android.apps.maps
585027354
LaunchReview.launch();
var appId, platform = device.platform.toLowerCase();
switch(platform){
case "ios":
appId = "585027354";
break;
case "android":
appId = "com.google.android.apps.maps";
break;
}
LaunchReview.launch(function(){
console.log("Successfully launched store app");
},function(err){
console.log("Error launching store app: " + err);
}, appId);
Platforms: Android and iOS
On iOS 10.3 and above, invokes the native in-app rating dialog which allows a user to rate your app without needing to open the App Store.
On Android, invokes the native in-app review dialog which allows a user to rate/review your app without needing to open the Play Store.
LaunchReview.rating(success, error);
iOS notes
LaunchReview.rating()
is called - iOS limits the frequency with which it can be called (see here).LaunchReview.rating()
is called and the request to show the dialog is successful. Will be passed the value requested
.shown
.dismissed
.Android notes
success
or error
will not be called if dialog was not shown due to rate limiting, etc.
requested
, shown
or dismissed
.LaunchReview.rating()
is called and the request to show the dialog is successful with value requested
.shown
.dismissed
.requested
LaunchReview.rating();
//max time to wait for rating dialog to display on iOS
var MAX_DIALOG_WAIT_TIME_IOS = 5*1000;
//max time to wait for rating dialog to display on Android and be submitted by user
var MAX_DIALOG_WAIT_TIME_ANDROID = 60*1000;
var ratingTimerId;
function ratingDialogNotShown(){
var msg;
if(cordova.platformId === "android"){
msg = "Rating dialog outcome not received (after " + MAX_DIALOG_WAIT_TIME_ANDROID + "ms)";
}else if(cordova.platformId === "ios"){
msg = "Rating dialog was not shown (after " + MAX_DIALOG_WAIT_TIME_IOS + "ms)";
}
console.warn(msg);
}
function rating(){
if(cordova.platformId === "android"){
ratingTimerId = setTimeout(ratingDialogNotShown, MAX_DIALOG_WAIT_TIME_ANDROID);
}
LaunchReview.rating(function(status){
if(status === "requested"){
if(cordova.platformId === "android"){
console.log("Displayed rating dialog");
clearTimeout(ratingTimerId);
}else if(cordova.platformId === "ios"){
console.log("Requested rating dialog");
ratingTimerId = setTimeout(ratingDialogNotShown, MAX_DIALOG_WAIT_TIME_IOS);
}
}else if(status === "shown"){
console.log("Rating dialog displayed");
clearTimeout(ratingTimerId);
}else if(status === "dismissed"){
console.log("Rating dialog dismissed");
clearTimeout(ratingTimerId);
}
}, function (err){
console.error("Error launching rating dialog: " + err);
clearTimeout(ratingTimerId);
});
}
rating(); // app invokes eg. via UI action
Platforms: Android and iOS
Indicates if the current platform/version supports in-app ratings dialog, i.e. calling LaunchReview.rating()
.
Will return true
if current platform is Android or iOS 10.3+.
var isSupported = LaunchReview.isRatingSupported();
if(LaunchReview.isRatingSupported()){
LaunchReview.rating();
}else{
LaunchReview.launch();
}
An example project illustrating use of this plugin can be found here: https://github.com/dpa99c/cordova-launch-review-example
================
The MIT License
Copyright (c) 2015-2020 Working Edge Ltd.
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
FAQs
Cordova/Phonegap plugin for iOS and Android to assist in leaving user reviews/ratings in the App Stores.
We found that cordova-launch-review demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 0 open source maintainers collaborating on the project.
Did you know?
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.
Security News
Oracle seeks to dismiss fraud claims in the JavaScript trademark dispute, delaying the case and avoiding questions about its right to the name.
Security News
The Linux Foundation is warning open source developers that compliance with global sanctions is mandatory, highlighting legal risks and restrictions on contributions.
Security News
Maven Central now validates Sigstore signatures, making it easier for developers to verify the provenance of Java packages.