britannio / in_app_review

A Flutter plugin for showing the In-App Review/System Rating pop up on Android, IOS, and MacOS. It makes it easy for users to rate your app.
306 stars 78 forks source link

Calling requestReview() not working in android #27

Closed reiko-dev closed 3 years ago

reiko-dev commented 3 years ago

I have a published app on the play store and i'm trying to use this package to make the request review but it doesn't work at all.

I started to try to use it on the internal test and it didn't work

If i change the requestReview by openStoreListing the app works fine and the page of the is app is shown normally...

I've tried on the the emulator and on real devices but in none of then it works. This is the link of the app: https://play.google.com/store/apps/details?id=com.memory_game.by.reiko I'm using the same app bundle of the published version.

The code requesting the review:

if (await _inAppReview.isAvailable() &&
        Theme.of(context).platform == TargetPlatform.android) {
      await _inAppReview.requestReview().onError(
            (error, stackTrace) =>
                print('Error when requesting the rate-my-app. $error'),
          );
    } else
      return Future.delayed(Duration.zero);

Below is the stack that it shows when i call the API.


I/InAppReviewPlugin(11896): onMethodCall: isAvailable
I/InAppReviewPlugin(11896): isAvailable: called
I/InAppReviewPlugin(11896): noContextOrActivity: called
I/InAppReviewPlugin(11896): isAvailable: playStoreInstalled: true
I/InAppReviewPlugin(11896): isAvailable: lollipopOrLater: true
I/InAppReviewPlugin(11896): isAvailable: The Play Store is available and Android 5 or later is being used
I/InAppReviewPlugin(11896): cacheReviewInfo: called
I/InAppReviewPlugin(11896): noContextOrActivity: called
I/PlayCore(11896): UID: [10160]  PID: [11896] ReviewService : requestInAppReview (com.memory_game.by.reiko)
I/InAppReviewPlugin(11896): cacheReviewInfo: Requesting review flow
I/PlayCore(11896): UID: [10160]  PID: [11896] ReviewService : Initiate binding to the service.
I/PlayCore(11896): UID: [10160]  PID: [11896] ReviewService : ServiceConnectionImpl.onServiceConnected(ComponentInfo{com.android.vending/com.google.android.finsky.inappreviewservice.InAppReviewService})
I/PlayCore(11896): UID: [10160]  PID: [11896] ReviewService : linkToDeath
I/PlayCore(11896): UID: [10160]  PID: [11896] OnRequestInstallCallback : onGetLaunchReviewFlowInfo
I/InAppReviewPlugin(11896): onComplete: Successfully requested review flow
I/PlayCore(11896): UID: [10160]  PID: [11896] ReviewService : Unbind from service.
I/InAppReviewPlugin(11896): onMethodCall: requestReview
I/InAppReviewPlugin(11896): requestReview: called
I/InAppReviewPlugin(11896): noContextOrActivity: called
I/InAppReviewPlugin(11896): launchReviewFlow: called
I/InAppReviewPlugin(11896): noContextOrActivity: called
W/JavaBinder(11896): BinderProxy is being destroyed but the application did not call unlinkToDeath to unlink all of its death recipients beforehand.  Releasing leaked death recipient: com.google.android.play.core.internal.ai
I/BpBinder(11896): onLastStrongRef automatically unlinking death recipients: <uncached descriptor>
W/JavaBinder(11896): BinderProxy is being destroyed but the application did not call unlinkToDeath to unlink all of its death recipients beforehand.  Releasing leaked death recipient: com.google.android.play.core.internal.ai
I/BpBinder(11896): onLastStrongRef automatically unlinking death recipients: <uncached descriptor>

I tried using the latest normal version: ^2.0.2 and the null-safety: ^2.0.1-dev. But the result is the same.

Flutter 2.2.0-10.2.pre • channel beta • https://github.com/flutter/flutter.git Framework • revision b5017bf8de (8 days ago) • 2021-04-28 17:09:53 -0700
Engine • revision 91ed51e05c Tools • Dart 2.13.0 (build 2.13.0-211.13.beta)

If i missed some important info just tell me and i bring to you.

reiko-dev commented 3 years ago

I tried once again to download the app directly from the Play Store on 2 new emulators and 2 new Google accounts and RequestReview appeared both times. But on another real device it didn't appear ...

I was thinking that maybe all the testers' google accounts in the internal test have reached the quota limit, even if the requestReview has not been shown to them .. which is not the case with the new accounts.

reiko-dev commented 3 years ago

Well, it's confirmed, the package is working good on the Production App and the accounts i used before on the internal tests are now getting the Review Dialog on the production App too.

Conclusion: I think that only with internal tests the Review Dialog is not being shown. In this way we can reach the quota limit of an account and when switching to the production app it continues for some time not being shown, because the account has reached the quota limit.

britannio commented 3 years ago

@reiko-dev Is further clarification needed here? https://github.com/britannio/in_app_review#testing

reiko-dev commented 3 years ago

@britannio I think it would be nice to add information, like:

  1. Currently, the In App sharing functionality is only available when google play makes the first evaluation of the application, either for production or for open testing.

  2. It is possible to do a Play Console internal test and share the app to your group of testers before the first evaluation of the app is carried out (which was my case) and, in this scenario, the in_app_review API (by Googles side) it's intended to not work or have a bug on it.

By the docs we think that in all the scenarios in_app_review should works good, but in this case it don't. So when this second scenario occurs, the user's account ends up reaching the quota limit and even if the app goes up for a production version or for an open test, the account will continue for a certain time without displaying the in_app_review due to the quota limit exceeded in internal test.

This is just the raw idea, what you think?