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.
314 stars 82 forks source link

InAppReview.isAvailable() is always true #99

Closed Lightgaming closed 1 year ago

Lightgaming commented 1 year ago

Hey

I was trying to implement this logic:

final inAppReview = InAppReview.instance;
final isAvaliable = await inAppReview.isAvailable();
if (isAvaliable) {
  await inAppReview.requestReview();
} else {
  await inAppReview.openStoreListing();
}

But it kept doing nothing. I figured out with the debugger that the await inAppReview.isAvailable() is always true which shouldn't be the case because the await inAppReview.requestReview() is doing/showing nothing which means my Quota is full. I want to implement the InAppReview to trigger on a Push Notification but it would be pretty bad if the user opens the Notification with a prompt to rate the App but nothing happens. It should at least redirect to the PlayStore if InAppReviews aren't available.

Here are the Logs:

I/InAppReviewPlugin( 9666): onMethodCall: isAvailable
I/InAppReviewPlugin( 9666): isAvailable: called
I/InAppReviewPlugin( 9666): noContextOrActivity: called
I/InAppReviewPlugin( 9666): isAvailable: playStoreInstalled: true
I/InAppReviewPlugin( 9666): isAvailable: lollipopOrLater: true
I/InAppReviewPlugin( 9666): isAvailable: The Play Store is available and Android 5 or later is being used
I/InAppReviewPlugin( 9666): cacheReviewInfo: called
I/InAppReviewPlugin( 9666): noContextOrActivity: called
I/PlayCore( 9666): UID: [10502]  PID: [9666] ReviewService : requestInAppReview (**.*********.app)
I/InAppReviewPlugin( 9666): cacheReviewInfo: Requesting review flow
I/PlayCore( 9666): UID: [10502]  PID: [9666] ReviewService : Initiate binding to the service.
I/PlayCore( 9666): UID: [10502]  PID: [9666] ReviewService : ServiceConnectionImpl.onServiceConnected(ComponentInfo{com.android.vending/com.google.android.finsky.inappreviewservice.InAppReviewService})
I/PlayCore( 9666): UID: [10502]  PID: [9666] ReviewService : linkToDeath
I/PlayCore( 9666): UID: [10502]  PID: [9666] OnRequestInstallCallback : onGetLaunchReviewFlowInfo
I/PlayCore( 9666): UID: [10502]  PID: [9666] ReviewService : Unbind from service.
I/InAppReviewPlugin( 9666): onComplete: Successfully requested review flow
britannio commented 1 year ago

Hey, unfortunately, the underlying API does not reveal whether the quota has been exceeded or not so using the package in this fashion is not recommended.