60

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
  • 1,299
  • 1
  • 9
  • 18
  • 3
    I am also facing the same issue @Petr Nalevka If you find any solution please do share here – Dinjit Aug 06 '20 at 18:52
  • 1
    Many thanks I'm now trying a minimal implementation with my other app and will see.. – Petr Nalevka Aug 06 '20 at 21:22
  • 1
    I see the same issue. The syslog includes this Exception: Class not found when unmarshalling: com.google.android.play.core.review.b (with minifyEnabled = false!). Here is the link to the Google issue tracker: https://issuetracker.google.com/issues/162969017 – mattlaabs Aug 07 '20 at 12:09
  • I successfully implemented the API on Android, it showed only on version released via Internal test track. I can send you code snippet @PetrNalevka. Btw I think it's wrong to trigger it in onResume, you should trigger it after you bring some value to the user, for example after setting an alarm in your case. – David Vávra Aug 10 '20 at 13:13
  • Same issue here! I guess this is still a lot buggy. Will implement it later on my apps. @DavidVávra, post it here. Thanks. – MPaulo Aug 11 '20 at 02:32
  • @MPaulo Posted my code as an answer here. – David Vávra Aug 11 '20 at 11:47
  • it's working if I use a Gmail account. My GSuite account doesn't work as it can't leave a review https://developer.android.com/guide/playcore/in-app-review/test#troubleshooting – Cody Aug 12 '20 at 16:03
  • Your code is fine. Wont show up by design. Check here how to test: https://developer.android.com/guide/playcore/in-app-review/test – MPaulo Aug 17 '20 at 18:41
  • 1
    I decided to not use that api. Why should I risk with so valuable user reviews for no reason – orium Aug 28 '20 at 12:54
  • I think there is some obfuscation: https://stackoverflow.com/a/63650212/10117882 – Phantom Lord Aug 29 '20 at 18:19
  • @orium the thing is if your app works well you also can get more good reviews, see it positive – larsaars Oct 26 '20 at 00:29
  • @Petr Nalevka, There isn't a problem with your code. The docs aren't comprehensive enough in explanation. Your code should work reliably and repeatably. I have given a detailed answer [right here.](https://stackoverflow.com/questions/63286540/play-core-in-app-review-api-not-showing-the-review-activity/65333746#65333746) – Kofi Dec 17 '20 at 10:21

18 Answers18

23

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

Prantik Mondal
  • 440
  • 3
  • 9
16

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!

Kofi
  • 306
  • 3
  • 5
12

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.

Aaron Lake
  • 131
  • 4
  • 2
    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 Oct 29 '20 at 19:27
9

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.

Hong
  • 15,059
  • 14
  • 64
  • 105
  • have you test on signed abb or apk? – user3077416 Sep 18 '20 at 04:06
  • Yes, the internal app sharing in my case requires a singed apk. I am not using abb for this app. – Hong Sep 19 '20 at 12:24
  • 1
    Works fine! I used it on abb in internal app sharing as Hong indicated. I tested using Android 7, 8, 9 – Joe Okatch Sep 20 '20 at 22:57
  • 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? – Eli Leszczynski Oct 22 '20 at 14:01
6

Try uploading your app to Internal App Sharing

I have found that with the exact same apk uploaded to Internal Testing versus Internal App Sharing, the latter is more reliable in displaying the In-App Review Flow every time I try testing it.

You would need to enable Internal app sharing in the Play Store to be able to install your app from the link provided by uploading your apk.

Basically go to the Play Store, go to Settings, scroll down to Play Store version and tap it a bunch of times to "Become a developer", then enable Internal app sharing.

  • Yes yes yes, I tried everything and was about to give up but the Internal App Sharing worked, thanks for the recommendation! – ScottFree Feb 21 '21 at 23:57
6

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@gmail.com. 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

Jorge Martinez
  • 136
  • 1
  • 2
5

For all the users that needs a working JAVA code, please find my code below:

ReviewInfo reviewInfo;
ReviewManager manager;

OnCreate

manager = ReviewManagerFactory.create(this);

private void Review(){
    manager.requestReviewFlow().addOnCompleteListener(new OnCompleteListener<ReviewInfo>() {
        @Override
        public void onComplete(@NonNull Task<ReviewInfo> task) {
            if(task.isSuccessful()){
                reviewInfo = task.getResult();
                manager.launchReviewFlow(MainActivity.this, reviewInfo).addOnFailureListener(new OnFailureListener() {
                    @Override
                    public void onFailure(Exception e) {
                        Toast.makeText(MainActivity.this, "Rating Failed", Toast.LENGTH_SHORT).show();
                    }
                }).addOnCompleteListener(new OnCompleteListener<Void>() {
                    @Override
                    public void onComplete(@NonNull Task<Void> task) {
                        Toast.makeText(MainActivity.this, "Review Completed, Thank You!", Toast.LENGTH_SHORT).show();
                    }
                });
            }

        }
    }).addOnFailureListener(new OnFailureListener() {
        @Override
        public void onFailure(Exception e) {
            Toast.makeText(MainActivity.this, "In-App Request Failed", Toast.LENGTH_SHORT).show();
        }
    });
}

Make sure the below is implemented:

implementation 'com.google.android.play:core:1.8.0'

And please also note, that the dialog will only display if your app is in production, alpha or internal testing on the Google Play Console Account.

GoRo
  • 102
  • 6
  • 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? – Dale Sep 25 '20 at 21:10
  • It worked once in production build, when I deleted and tried again to review it's not working – AllwiN Jan 07 '21 at 10:49
  • You shouldn't use the toast saying "Thank you". As per https://developer.android.com/guide/playcore/in-app-review/kotlin-java 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. – nichtwer Feb 26 '21 at 15:18
2

My working code:

private fun askForReview() {
    val manager = ReviewManagerFactory.create(this)
    manager.requestReviewFlow().addOnCompleteListener { request ->
        if (request.isSuccessful) {
            val reviewInfo = request.result
            manager.launchReviewFlow(this, reviewInfo).addOnFailureListener {
                logWarning("In-app review request failed, reason=$it")
            }.addOnCompleteListener { _ ->
                logInfo("In-app review finished")
            }
        } else {
            logWarning("In-app review request failed, reason=${request.exception}")
        }
    }
}

Tested on an app from Internal Test track (there is no quota there).

David Vávra
  • 16,232
  • 7
  • 43
  • 53
0

Documentation says that it won't be shown every time you request it since it has quota restrictions: https://developer.android.com/guide/playcore/in-app-review#quotas

I just included it in my project and it showed the dialog only one time. It is a little inconvenient since we don't have any controls over it.

Also, I noticed that if you try to show the dialog again and again, navigation bar starts blinking (like it wants to show the dialog but it gets dismissed).

  • 6
    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. – Petr Nalevka Aug 06 '20 at 21:21
  • 1
    @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. – Anirban Bhattacharjee Aug 07 '20 at 11:29
0

The documentation says

To provide a great user experience, Google Play enforces a quota on how often a user can be shown the review dialog. Because of this, calling a launchReviewFlow method might not always display a dialog. For example, you should not have a call-to-action option (such as a button) to trigger a review as a user might have already hit their quota and the flow won’t be shown, presenting a broken experience to the user.

So you don't expect it to show the dialog every time and also there's no way to know if the dialog is shown or not nor the user has reviewed your app or not either

ahmed nader
  • 371
  • 1
  • 8
  • There should be a way to test it reliably – Seagull Sep 15 '20 at 20:10
  • 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 Oct 29 '20 at 19:27
0

My problem was solved by typecasting the context and activity to the required form i.e application context and activity . Although it seems illogical, nothing else worked for me

0

I joined the beta in the store and it showed. But just show once time.

  • 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... – prf Sep 29 '20 at 19:02
0

Just to be clear you are not using com.mypackage right?

2020-08-06 16:01:29.318 29618-29618/? I/PlayCore: UID: [10409]  PID: [29618] ReviewService : requestInAppReview (com.mypackage)

Ensure that the appId used is the one that it's "owned" (aka installed by) by the selected account in the Play Store in the device.

I believe the test guide (https://developer.android.com/guide/playcore/in-app-review/test) is clear in terms of how to test it given the different requirements.

My tips:

  1. Use only one account in the device
  2. Ensure that account has installed the app (appears in the app & games > Library section in Play Store)
  3. The account is a GMAIL one, not a GSuit
  4. You can review with the account if you go to the app play listing page.
  5. The account has not reviewed
  6. If you intend to use the Internal Test Track ensure the account has joined the test track.
  7. When switching between different accounts and testing things out, sometimes might be helpful to "Clear Data" from the Play Store app.
  8. Try all the above with different account

PS: You could test also the Internal App Sharing.

Marcel
  • 1,403
  • 2
  • 19
  • 36
0

I had exactly the same problem, the dialog never appeared to me ...

But even so, I left it implemented in the application and posted it on the Play store.

Then I downloaded and tested the version and everything works perfectly.

Commanche
  • 219
  • 1
  • 3
  • 9
0

Just discovered that the app must be approved from google (i.e. not having the temporary name)

drom1x
  • 1
0

The code is correct no issue we can follow a few steps

  1. app upload following URL https://play.google.com/console/u/0/internal-app-sharing/
  2. setup google play console your project setup->inter app sharing-> anyone can download select the option -> to save
    3 check your mobile internal app sharing to play store app
R M Vivek
  • 36
  • 2
0

Most of the cases are covered in other answers. I want to highlight few more troubleshooting Steps .

  1. Make sure the user account is not protected (like some enterprise accounts) use some personnel G mail ID to test.
  2. Make Sure the version of beta app is greater then the currently Live application if its not then it will not show up the review dialogue.
ADM
  • 16,256
  • 11
  • 37
  • 69
-4

Please test using FakeReviewManager :)

ReviewManager manager = new FakeReviewManager(context);

https://developer.android.com/guide/playcore/in-app-review/test

Samarakande
  • 193
  • 2
  • 3
  • 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. – Badr Oct 05 '20 at 15:32