Giter Site home page Giter Site logo

ravirupareliya / rn-in-app-review Goto Github PK

View Code? Open in Web Editor NEW
79.0 2.0 5.0 517 KB

React native package to add in app review functionality for android and ios applications

Java 35.79% JavaScript 10.30% Starlark 3.75% Ruby 20.83% Objective-C 29.34%
react-native react-native-app react-native-in-app-review hacktoberfest

rn-in-app-review's Introduction

react-native-in-app-review

npm

npm

Now you can integrate this to react native and in-app review dialog can be shown to user. User doesn't need to move to play store or app store to submit their review.

Supports both android and iOS

Android iOS

Getting started

$ npm install rn-in-app-review --save
or
$ yarn add rn-in-app-review

For React Native < 0.60

$ react-native link rn-in-app-review

For React Native >= 0.60

$ cd ios $ pod install

Usage

import RnInAppReview from 'rn-in-app-review';

RNInAppReview.launchReviewFlow((isSuccessful)=>console.log('RNInAppReview ' , isSuccessful))

When to request an in-app review

Follow Guideline to get clear idea about when to launch or use in app review.

rn-in-app-review's People

Contributors

ravirupareliya avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

rn-in-app-review's Issues

Android crash

Hi, This package has worked perfectly for most cases, but I have a cases where the app crashed with the following stack trace. Would recommend wrapping with try / catch.

Fatal Exception: java.lang.NullPointerException: Attempt to invoke virtual method 'java.lang.String android.content.Context.getPackageName()' on a null object reference
at android.content.ComponentName.(ComponentName.java:131)
at android.content.Intent.(Intent.java:7162)
at com.google.android.play.core.review.c.launchReviewFlow(:4)
at com.reactlibrary.RnInAppReviewModule$1.onComplete(RnInAppReviewModule.java:39)
at com.google.android.play.core.tasks.a.run(:23)
at android.os.Handler.handleCallback(Handler.java:883)
at android.os.Handler.dispatchMessage(Handler.java:100)
at android.os.Looper.loop(Looper.java:237)
at android.app.ActivityThread.main(ActivityThread.java:8167)
at java.lang.reflect.Method.invoke(Method.java)
at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:496)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1100)

isSuccessful is true even if user closes the review window

const launchReview = () => {
  RnInAppReview.launchReviewFlow(async (isSuccessful) => {
    if (isSuccessful) {
      ToastAndroid.showWithGravity(
        'Thank You!',
        ToastAndroid.SHORT,
        ToastAndroid.CENTER,
      );
      await setAppData(userActionId, 'given');
    }
  });
};

Please fix it and thanks for the library :)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.