capacitor-community / in-app-review

Let users rate your app using native review app dialog for both Android and iOS.
MIT License
163 stars 20 forks source link

Android not working on some devices #22

Closed michalsisak closed 3 years ago

michalsisak commented 3 years ago

Hello, after upgrading to version 1.1.0 which supports Capacitor 3 I noticed the plugin not opening the Google Play after calling RateApp.requestReview();.

I tested it on emulator Pixel 3a API 29 but can be reproduced on some phones as well. On my phone I got a new in app prompt without any issue.

I haven't seen any error in logs either but I am attaching them just in case:

2021-07-27 13:18:15.083 11833-11954/com.app.app V/Capacitor/Plugin: To native (Capacitor plugin): callbackId: 32732419, pluginId: RateApp, methodName: requestReview
2021-07-27 13:18:15.083 11833-11954/com.app.app V/Capacitor: callback: 32732419, pluginId: RateApp, methodName: requestReview, methodData: {}
2021-07-27 13:18:15.092 11833-11928/com.app.app I/PlayCore: UID: [10134]  PID: [11833] ReviewService : requestInAppReview (com.app.app)
2021-07-27 13:18:15.099 11833-11995/com.app.app I/PlayCore: UID: [10134]  PID: [11833] ReviewService : Initiate binding to the service.
2021-07-27 13:18:15.111 11833-11833/com.app.app I/PlayCore: UID: [10134]  PID: [11833] ReviewService : ServiceConnectionImpl.onServiceConnected(ComponentInfo{com.android.vending/com.google.android.finsky.inappreviewservice.InAppReviewService})
2021-07-27 13:18:15.112 11833-11995/com.app.app I/PlayCore: UID: [10134]  PID: [11833] ReviewService : linkToDeath
mxlle commented 3 years ago

We are having the same issue. I actually sometimes have it or not on the same device. Not sure if that's related to a timing issue or a difference between a dev and prod build 🤔

Nodonisko commented 3 years ago

@michalsisak Agree with @mxlle that it could be somehow related to prod/dev build like on iOS, did you tried both variants of build on that device? I think that maybe Google started to limit this somehow.

anagstef commented 3 years ago

According to Google, if you are not in a test environment, you have a quota on how many times this can be seen on your Android device/account (maybe it doesn't show if you have already rated etc.).

Here are the docs that mention this: https://developer.android.com/guide/playcore/in-app-review#quotas

Because of this quota, calling the launchReviewFlow method more than once during a short period of time (for example, less than a month) might not always display a dialog.

Here is how to test in app reviews: https://developer.android.com/guide/playcore/in-app-review/test

Nodonisko commented 3 years ago

@anagstef Thanks for explanation I will add this info to docs.