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

@mastergui/in-app-review

v1.1.0

Published

In App Reviews for NativeScript

Downloads

103

Readme

@mastergui/in-app-review

ns plugin add @mastergui/in-app-review

Usage

Android

The Google Play In-App Review API lets you prompt users to submit Play Store ratings and reviews without the inconvenience of leaving your app or game.

In-app review flow for an Android user

You must run this at the start of your app or at least before requesting to show the Review dialog. With the new In App Review API, it's Google who's in charge of deciding to show or not the dialog. Calling the init() method will initialize an instance of the ReviewManager and pre-cache a ReviewInfo object with the information needed for them to show it or not.

import { InAppReview } from "@mastergui/in-app-review"

InAppReview.init()

To show the dialog, run the following method, and, depending on the ReviewInfo object previously obtained, the dialog will pop up or not.

import { InAppReview } from "@mastergui/in-app-review"

InAppReview.showReviewDialog()

It's important to note that the dialog will only show if the app is on the Google Play Store. For development purposes, I added some toasts to understand if everything is going correctly.

For more information on the In-App-Review API, check the official documentation

iOS

Presenting your users with a request for an App Store review using SKStoreReviewController is a good way to get feedback on your app.

In-app review flow for a iOS user

On iOS there's no need to pre-cache the SKStoreReviewController object, but calling the init()method will not result in an error either way; so just calling this should work.

import { InAppReview } from "@mastergui/in-app-review"

InAppReview.showReviewDialog()

As in Android's case, it's now Apple who decide whether to show the review dialog or not. Depending on the iOS version, the dialog shown could be different (iOS<13). Apple prevents the dialog from showing more than 3 times a year.

Apple provides some best practices on when and where to show the review dialog:

  • Try to make the request at a time that doesn’t interrupt what the user is trying to achieve in your app. For example, at the end of a sequence of events that the user successfully completes.

  • Avoid showing a request for a review immediately when a user launches your app, even if it isn’t the first time that it launches.

  • Avoid requesting a review as the result of a user action.

For more information on the Requesting App Store reviews, check the official documentation

Acknowledgments

Thanks to @triniwiz the plugin master and the NativeScript team for building such good tutorials on their blog

License

Apache License Version 2.0