Play Core In-App Review API not showing the Review Activity

32,136

Solution 1

Okay, I had exactly the same problem as described by the OP and as is listed on the issue tracker here: https://issuetracker.google.com/issues/167352813 and has still not been resolved as yet by GoogleDev.

Same UI manifestation(s), same log entries (incidentally, the log entries are the same when it works though, complete with the entry that says “ReviewService : linkToDeath”, but let’s not worry about that eh?)

The key thing, you'll no-doubt want to know though, to avoid too much suspense, is that IT WORKS. The in-app review API works! No need for me to repeat the block of code for calling the review flow, it is pretty much exactly the same as in the docs, similar to what the OP has listed, and several others have kindly repeated.

Took me a while, but I got to the bottom of it as follows, in a nutshell:

  1. Your device needs to have the latest Google Play system update

  2. Irrespective of whether your app is published on the Play Store YOU ABSOLUTELY NEED TO DO YOUR TESTING VIA INTERNAL APP TESTING or SHARING (I only did “Internal App Testing”, but I expect the same applies)

  3. To debug your code with Android Studio, you need to have installed your Internal App Testing version on your device AND RUN THE DEBUGGER SUCCESSFULLY WITH YOUR IAT VERSION STILL INSTALLED ON THE DEVICE AT LEAST ONCE

  4. Once you are up and running, when the review dialog pops up, you have to note that, if you submit a review, then you have utilised all your quota. When you try and launch the review flow again it looks like the “problem” has returned. You get “successful” launch but nothing shows. If you have submitted a review (and this is why it absolutely needs to be in IAT), then it is only a “private review” (not seen publicly on your app page), and you need to DELETE THE REVIEW TO GET THE POP UP TO SHOW AGAIN.

  5. You can select “Not Now” instead of "Submit" ad infinitum (well, I tried about two-dozen times) and the pop-up dialog will launch each time you (re)call the flow.

So, step-by-step fix:

  1. Prepare your device by uninstalling your app, then ensure you have the latest Google Play Store update. On my Sony Xperia X1 this is Settings->About Phone->Android version->Google Play system update.

  2. Irrespective of whether the above restarted your device, turn your device off and then back on again (don’t restart - off then on i.e. cold boot).

  3. Now go into Settings->Apps & notifications->Google Play->Storage & Cache, then do both CLEAR CACHE and CLEAR STORAGE. (This should not affect any of your installed apps).

  4. Create a signed release for IAT based on your In-App review code base. You have to do this even if you have a release in production.

  5. Now install your IAT RELEASE on your device - the words, "(Internal Beta)" or words to that effect, should be appended to your app name if you are downloading from the right location (i.e. IAT), (do not run it, just install)

  6. In Android studio Clean, Rebuild and Debug, your app on the device with the IAT version installed. If you get a message saying "The device already has an application with the same package but a different signature." DON'T CLICK OK TO UNINSTALL YOUR IAT VERSION Follow the instructions here: Android: Error - App has same packaged different signature. The accepted answer is the correct one. If you have to do this, please note you should do a Clean and Rebuild->Debug again.

Hopefully, now all should be okay. Once you have done the above steps successfully, you can actually "clean" uninstall the app from the device on subsequent debugging sessions, and it will still work.

To test, and to delete a review note the following. When you submit a review, you will be able to see it in Google Play Console (not under "Reviews", incidentally but) under "Testing Feedback". Also you cannot delete your review under "Testing Feedback" it seems. You need to delete it from your IAT download page on the device. On there, under the heading Your private feedback, select the right-angled ellipsis thingy to the right of your review and simply "Delete".

Your pop-up will now show every time until you submit another review. Voila!

Solution 2

I have raised a issue on google issue tracker regarding this. I also have the same issue.

For more info check this my issue tracking url: https://issuetracker.google.com/issues/167352813

Solution 3

I also saw the same problem, my request review flow works, then the launch review flow works, but nothing displays (I do notice the small line at the center of the bottom of the screen appears briefly, and my audio cuts out briefly as the app is paused and then resumed but no review flow appeared).

I was able to get it to work by adding a user to my device that was not in my list of License Testers (Google developer console) and had not reviewed my app previously. I was able to display the rating popup once, I cancelled the operation so that I could test it again, but it would not reappear afterwards. It appears to be a one shot thing and they are aggressively guarding against annoying the user with review popups.

This feature doesn't seem useful for my case, I have a button on the settings screen to rate my app. Since I have no way of knowing what happened, I can't thank the user, I can't disable the button or display an "you already rated this thank you" message, and the button just appears to do nothing so it looks like a bug. I guess the intended use is to ask the user during gameplay, and if they cancel the dialog accidentally then it's just too bad for you.

Ideally Google should allow License Testing users to display this popup more than once for testing purposes.

Solution 4

I just want to share the code that is working reliably today (2020-09-03). It was essentially copied from the official document

ReviewManager manager = ReviewManagerFactory.create(activity);
Task<ReviewInfo> request = manager.requestReviewFlow();
request.addOnCompleteListener(task -> {
    try {
        if (task.isSuccessful()) {
            // We can get the ReviewInfo object
            ReviewInfo reviewInfo = task.getResult();
            Task<Void> flow = manager.launchReviewFlow(activity, reviewInfo);
            flow.addOnCompleteListener(task2 -> {
                // The flow has finished. The API does not indicate whether the user
                // reviewed or not, or even whether the review dialog was shown. Thus, no
                // matter the result, we continue our app flow.
                utility.logMessageAsync(activity, "In-app review returned.");
            });
        } else {
            // There was some problem, continue regardless of the result.
            goToAppPage(activity);
        }
    } catch (Exception ex) {
        utility.logExceptionAsync(activity, "Exception from openReview():", ex);
    }
});

It was tested with internal app sharing on a Android 10. It never failed to show the review dialog.

Solution 5

I had the same problem and I solved with the next steps:

  1. Adding my APK file to internal testing channel
  2. Adding a tester user with a gmail account ex: [email protected]. GSuite mails don't work
  3. With the tester mail, accept the tester privilege
  4. With a physical device signed with the tester user email, go to Play Store and download the app

It works!!

Note: If App is not published yet, you could use Google Console App Sharing

Share:
32,136
Petr Nalevka
Author by

Petr Nalevka

IT consultant, developer, researcher, startup founder but most of all technology geek

Updated on July 05, 2022

Comments

  • Petr Nalevka
    Petr Nalevka almost 2 years

    I'm trying to utilize the Review API (Play Core library 1.8.0) from Google which was just released yesterday. See https://developer.android.com/guide/playcore/in-app-review

    I followed the troubleshooting section carefully, I made sure the app is downloaded from the internal testing track, my account does not have a review on the app, the app is in the library of that user etc.. I even tried with a completely new account, but every time the com.google.android.finsky.inappreviewdialog.InAppReviewActivity is shown only to immediately disappear.

    I'm calling the following code from the onResume() method of my activity:

                    reviewManager = ReviewManagerFactory.create(AlarmClock.this);
                    Logger.logInfo("Rating: requestReviewFlow() ");
                    reviewManager.requestReviewFlow().addOnSuccessListener(new OnSuccessListener<ReviewInfo>() {
                        @Override
                        public void onSuccess(ReviewInfo result) {
                            Logger.logInfo("Rating: launchReviewFlow() ");
                            reviewManager.launchReviewFlow(AlarmClock.this, result).addOnSuccessListener(new OnSuccessListener<Void>() {
                                @Override
                                public void onSuccess(Void result) {
                                    Logger.logInfo("Rating: launchReviewFlow() success ");
                                }
                            });
                        }
                    });
    

    Both listeners return success.

    Here is the log output:

    2020-08-06 16:01:29.317 29618-29618/? I/MyApp: [06Aug 16:01:29.317, main]: Rating: requestReviewFlow()
    2020-08-06 16:01:29.318 29618-29618/? I/PlayCore: UID: [10409]  PID: [29618] ReviewService : requestInAppReview (com.mypackage)
    2020-08-06 16:01:29.320 29618-29774/? I/PlayCore: UID: [10409]  PID: [29618] ReviewService : Initiate binding to the service.
    2020-08-06 16:01:30.081 29618-29618/? I/PlayCore: UID: [10409]  PID: [29618] ReviewService : ServiceConnectionImpl.onServiceConnected(ComponentInfo{com.android.vending/com.google.android.finsky.inappreviewservice.InAppReviewService})
    ***2020-08-06 16:01:30.082 29618-29774/? I/PlayCore: UID: [10409]  PID: [29618] ReviewService : linkToDeath***
    2020-08-06 16:01:30.355 29618-29637/? I/PlayCore: UID: [10409]  PID: [29618] OnRequestInstallCallback : onGetLaunchReviewFlowInfo
    2020-08-06 16:01:30.355 29618-29774/? I/PlayCore: UID: [10409]  PID: [29618] ReviewService : Unbind from service.
    2020-08-06 17:02:21.590 7478-7478/? I/MyApp: [06Aug 17:02:21.590, main]: Rating: launchReviewFlow() 
    2020-08-06 17:02:21.630 1511-4316/? I/ActivityTaskManager: START u0 {cmp=com.android.vending/com.google.android.finsky.inappreviewdialog.InAppReviewActivity (has extras)} from uid 10122
    2020-08-06 17:02:21.750 7478-7478/? I/MyApp: [06Aug 17:02:21.750, main]: Rating: launchReviewFlow() success 
    

    Anyone had success to make this working? Any tips. Big thanks!

  • Petr Nalevka
    Petr Nalevka almost 4 years
    Many thanks for the feedback. I'm aware of the quota restrictions. But for me it did not show even the first time and I used different accounts who never rated the app or downloaded the app for first time. So this made me believe maybe there is some other issue.
  • Anirban Bhattacharjee
    Anirban Bhattacharjee almost 4 years
    @PetrNalevka I am even facing the same issue. I am getting the callback for complete and then success. But no review dialogs are seen. I have made sure to use a release build and also pointing to a versionCode that is currently active in the playStore.
  • RKRK
    RKRK almost 4 years
    This code worked in Live. But it didn't work in Test.
  • Seagull
    Seagull almost 4 years
    There should be a way to test it reliably
  • user3077416
    user3077416 almost 4 years
    have you test on signed abb or apk?
  • Hong
    Hong almost 4 years
    Yes, the internal app sharing in my case requires a singed apk. I am not using abb for this app.
  • Joe Okatch
    Joe Okatch almost 4 years
    Works fine! I used it on abb in internal app sharing as Hong indicated. I tested using Android 7, 8, 9
  • Dale
    Dale almost 4 years
    Thanks for the code, but when I use it, it says "Review Completed, Thank You!" without anything before that. Can you tell me how to determine if the app is in production, alpha or internal testing? When I go to the playstore, it says "You're a beta tester for this app". I'm just testing the app locally on my own device. Do I need to get myself off of the beta in order to test?
  • prf
    prf over 3 years
    The same for me. It showed just one time after downloading apk from internal testing. They say in docs that after that, you can install directly from Anroid Studio and test, but it never appeared again...
  • Badr
    Badr over 3 years
    The FakeReviewManage is only used for unit testing or integration purpose, meaning that it will fake the behavior of the API once the review is completed.
  • Seagull
    Seagull over 3 years
    Had the same issue. It took some time to figure out that GSuite accounts do not work.
  • Eli Leszczynski
    Eli Leszczynski over 3 years
    been using it in the past week and a half and got good results (I show it after making sure that I'll get a good review) but in the last couple of days the numbers dropped sharply, I have no new ratings, I have indications that users are willing to review but no rating in the store, have anyone experienced something similar?
  • Flyview
    Flyview over 3 years
    Wow so it's basically garbage then! It's useless if it can only display once and we get no error info based on if there was already a review left, etc. Why not always show it and if a review has already been left, allow them to edit it?
  • Flyview
    Flyview over 3 years
    Wow so it's basically garbage then! It's useless if it can only display once and we get no error info based on if there was already a review left, etc. Why not always show it and if a review has already been left, allow them to edit it?
  • AllwiN
    AllwiN over 3 years
    It worked once in production build, when I deleted and tried again to review it's not working
  • ScottFree
    ScottFree over 3 years
    Yes yes yes, I tried everything and was about to give up but the Internal App Sharing worked, thanks for the recommendation!
  • nichtwer
    nichtwer over 3 years
    You shouldn't use the toast saying "Thank you". As per developer.android.com/guide/playcore/in-app-review/kotlin-ja‌​va the onComplete gets triggered when the flow has finished. The API does not indicate whether the user reviewed or not, or even whether the review dialog was shown. Thus, no matter the result, we continue our app flow.
  • Niloofar Hakkaki
    Niloofar Hakkaki almost 3 years
    @Flyview you know what? exaclty!
  • LittleChewbacca
    LittleChewbacca almost 3 years
    Does anyone know why this is? The app I'm currently building, or any app for that matter, might have users with a GSuite email address. This seems like something that should be fixed.
  • ptoinson
    ptoinson almost 3 years
    We are having the same issue. However, for us it works with a @gmail.com email address and like a lot of other folks, it does not work with a Gmail Suite email (eg [email protected])
  • Kofi
    Kofi almost 3 years
    I think the Gmail Suite email account problem, which I have seen reported here is a separate issue. I cannot really help with that one because I haven't tested this with a Gmail Suite account.
  • ptoinson
    ptoinson almost 3 years
    Just to follow up, we did get it work with our GSuite accounts using Internal App Sharing. Internal testing was where we were experiencing issues.
  • Kofi
    Kofi almost 3 years
    Interesting! Again, I only did "Internal App Testing" although I still think of the GSuite account business being a separate issue - for which the answer may well be "don't use Internal App Testing for GSuite accounts, use Internal App Sharing instead"! Thanks for the follow-up, could well be the answer for someone with the same problem!
  • LanDenLabs
    LanDenLabs over 2 years
    how long do you have to use the app before the dialog appears (1 day, week, month, year) ? I have the code, but never see the dialog.
  • LanDenLabs
    LanDenLabs over 2 years
    how long do you have to use the app before the dialog appears (1 day, week, month, year) ? I have the code, but never see the dialog.
  • LanDenLabs
    LanDenLabs over 2 years
    how long do you have to use the app before the dialog appears (1 day, week, month, year) ? I have the code, but never see the dialog.
  • Hong
    Hong over 2 years
    @LanDenLabs I am not aware of any time limits.
  • LanDenLabs
    LanDenLabs over 2 years
    So when does the dialog appear, the first time you call the API, which would be silly because the user has no experience using the app to give a usable rating. There must be a period during which the dialog is suppressed, like 1 week, or 1 month. Does anyone who has gotten this to work know how long after installing the app, the dialog appeared ?
  • Nipul Sindwani
    Nipul Sindwani over 2 years
    suppose user has already submitted the review and triggers the in app review flow after a long time again, then will the review will appear to the user ?
  • Kofi
    Kofi over 2 years
    @NipulSindwani. Yes.
  • Kofi
    Kofi over 2 years
    @LanDenLabs - if the dialog is not appearing then your code is incorrect.
  • LanDenLabs
    LanDenLabs over 2 years
    @Kofi - Does the rating dialog appears on first launch and every launch ? that does not sound right. If so - then I definitely have something wrong with the code.
  • Kofi
    Kofi over 2 years
    @LanDenLabs - see the very last sentence in my answer: "Your pop-up will now show every time until you submit another review..."
  • Aman Verma
    Aman Verma over 2 years
    If the user has already rated the app(by going to the app page in the play store) and if i try to show that particular user "in-app" review dialog, will it appear or not?
  • Aman Verma
    Aman Verma over 2 years
    If the user has already rated the app(by going to the app page in the play store) and if i try to show that particular user "in-app" review dialog, will it appear or not?
  • Aman Verma
    Aman Verma over 2 years
    If the user has already rated the app(by going to the app page in the play store) and if i try to show that particular user "in-app" review dialog, will it appear or not?
  • Aman Verma
    Aman Verma over 2 years
    If the user has already rated the app(by going to the app page in the play store) and if i try to show that particular user "in-app" review dialog, will it appear or not?
  • Aman Verma
    Aman Verma over 2 years
    If the user has already rated the app(by going to the app page in the play store) and if i try to show that particular user "in-app" review dialog, will it appear or not?
  • Aman Verma
    Aman Verma over 2 years
    If the user has already rated the app(by going to the app page in the play store) and if i try to show that particular user "in-app" review dialog, will it appear or not?
  • Kofi
    Kofi over 2 years
    There is a limit as to how often you can present a user with the dialog, and you have absolutely no control over that, so in the particular scenario you describe, you can assume not.
  • toto_tata
    toto_tata over 2 years
    What does 'IAT' mean ??
  • Kofi
    Kofi over 2 years
    "Internal App Testing"
  • Yossi
    Yossi about 2 years
    Solved my testing problem, clear the Google Play Store data cause to dialog appear again