Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

await inAppReview.requestReview() doesn't work in Android. Dialog doesn't appear #97

Open
norutplz opened this issue Aug 4, 2023 · 18 comments

Comments

@norutplz
Copy link

norutplz commented Aug 4, 2023

iOS works fine but in Android requestReview dialog doesn't appear.

Code:

final InAppReview inAppReview = InAppReview.instance;
final bool isAvailable = await inAppReview.isAvailable();
print(isAvailable);
 if (isAvailable) {
 await inAppReview.requestReview();                          
 }

I don't know why it is not working because await inAppReview.isAvailable() returns true and console prints are fine too:

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

@KayesAshfaQ
Copy link

I'm also facing the same issue.

@grizzly
Copy link

grizzly commented Aug 17, 2023

Same here

@DaxeshV
Copy link

DaxeshV commented Sep 6, 2023

Same issue for me also.

@farhan-ibrahim
Copy link

does your app available in Play Store? Based on documentation you need to upload your app to Play Store before you can test this function

@mathrocco
Copy link

I guess I found the reason for the Android issues. On Android setup guidelines says to add the Gradle dependency to integrate the Play In-App Review Library. This is missing in the package install documentation.

// In-App-Review dependecies. More info https://developer.android.com/guide/playcore/in-app-review/kotlin-java#java
implementation 'com.google.android.play:review:2.0.1'
implementation 'com.google.android.play:review-ktx:2.0.1'

The lack of this dependencies is the reason why this only works for some devices, where probably vendors ships these dependencies by default.

In my case, these are the main devices that probably ship these gradle dependency by default:
rating-device

After those changes the in-app-review start to appear properly

Testing this was very tricky. What worked to me was not to use the company email (it is restricted to review banner display) and upload the app using internal testing track.

Hope it helps you 🤞🏼

@mathrocco
Copy link

Just opened the PR with the Android setup instructions: #100

@grizzly
Copy link

grizzly commented Sep 15, 2023

This really works! Thanks for that!

@NecJoy
Copy link

NecJoy commented Oct 5, 2023

await inAppReview.requestReview() doesn't work in Android. Dialog doesn't appear

@classycircle
Copy link

It is still not working for me using the internal test.
Anyone has any updates on this?

@jimmy0251
Copy link

The dependency is already added in android module's build.gradle

implementation 'com.google.android.play:review:2.0.1'

Not sure if adding it again would make any difference.

@wepashka
Copy link

wepashka commented Feb 6, 2024

It didn't work for me too. Any solution?

@Fintasys
Copy link

I have the same issue, adding the dependencies directly also didn't solve it for me. It showed up one and then never again.

@britannio
Copy link
Owner

I have the same issue, adding the dependencies directly also didn't solve it for me. It showed up one and then never again.

If it shows up once then there isn't an issue with the dependencies and the plugin is likely working as expected. See the mention of quotas in the README.

@wepashka
Copy link

wepashka commented Apr 1, 2024

Yes; It's right

@Fintasys
Copy link

Fintasys commented Apr 1, 2024

Play store gave me a warning that my app couldn't be released because the button with the app review wasn't working. I don't think the issue relates to quotas. I saw some caching mechanism in your code but since testing on Android is so troublesome I couldn't check if that's the problem, yet.

@britannio
Copy link
Owner

Play store gave me a warning that my app couldn't be released because the button with the app review wasn't working. I don't think the issue relates to quotas. I saw some caching mechanism in your code but since testing on Android is so troublesome I couldn't check if that's the problem, yet.

Based on the quota documentation:

you should not have a call-to-action option (such as a button) to trigger the API, as a user might have already hit their quota and the flow won’t be shown, presenting a broken experience to the user. For this use case, redirect the user to the Play Store instead.

So if you have a review button in your app, it should use openStoreListing() to reliably let users leave a review.

@Fintasys
Copy link

Fintasys commented Apr 2, 2024

So if you have a review button in your app, it should use openStoreListing() to reliably let users leave a review.

So... if that's the case, I'm missing the point of this package 🤔

@britannio
Copy link
Owner

So if you have a review button in your app, it should use openStoreListing() to reliably let users leave a review.

So... if that's the case, I'm missing the point of this package 🤔

Sorry but it's Apple's and Google's decision to nerf the main feature.

Assuming that the rating pop-up always trigger once and only once is good enough to boost your app ratings though.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests