KjellConnelly / react-native-rate

Send your app users to Apple App Store, Google Play, Amazon, or other using the newest APIs
635 stars 100 forks source link

pop up not visible when preferInApp: true on Android #65

Open anmolguptachicmic opened 3 years ago

anmolguptachicmic commented 3 years ago

Issue Description When we set preferInApp: true the app is not showing the popup to rate the app but getting the call in success.

Expected Results Popup to rate the app should appear

Additional Information react-native-rate version: ^1.2.4, React Native version:0.61.4 Platform(s) (iOS, Android, or both?): Android Operating System (macOS, Linux, or Windows?): macOS

Steps to Reproduce / Code Snippets <View> <Button title="Rate App" onPress={() => { const options = { GooglePackageName: "com.instagram.android", preferredAndroidMarket: AndroidMarket.Google, preferInApp: true } Rate.rate(options, success => { if (success) { console.log(success); } }) }} /> </View>

KjellConnelly commented 3 years ago

Just wondering if you tried on a physical device, and an app that is already live? I believe these are two requirements for this in-app Android popup to work.

realabbas commented 3 years ago

Just wondering if you tried on a physical device, and an app that is already live? I believe these are two requirements for this in-app Android popup to work.

Does the app need to be live?

KjellConnelly commented 3 years ago

According to @sregg who wrote and tested this part of this module, it does, as indicated in the README. There just also a link to the official documentation which may have a more thorough explanation.

sregg commented 3 years ago

@realabbas your app needs to be published on the Play Store at least once, at least in the internal testers channel. see the official troubleshooting page: https://developer.android.com/guide/playcore/in-app-review/test#troubleshooting It also doesn't seem to be working well in a simulator so you should test with a real Android device.

realabbas commented 3 years ago

@realabbas your app needs to be published on the Play Store at least once, at least in the internal testers channel. see the official troubleshooting page: https://developer.android.com/guide/playcore/in-app-review/test#troubleshooting It also doesn't seem to be working well in a simulator so you should test with a real Android device.

Okay I'll push it to Internal Testers Channel first and then test it again.

anmolguptachicmic commented 3 years ago

Just wondering if you tried on a physical device, and an app that is already live? I believe these are two requirements for this in-app Android popup to work.

@KjellConnelly @sregg yes the app is live and I tested it on physical device as well. The issue is still there in case of Android, seems to work fine with iOS.

medmo7 commented 3 years ago

tested it on android using internal app sharing, and its working. https://developer.android.com/guide/playcore/in-app-review/test#internal-app-sharing.

rafauke commented 3 years ago

First things first - thank you for this package :)

The issue is also present in my app. I have implemented it the way it is explained in the docs and I am distributing the app through internal testing as well as through beta track. Unfortunately, the popup does not appear, even though success is returned.

Some logs from logcat seem to be interesting though:

2020-08-18 13:36:52.482 16756-16858/? I/PlayCore: UID: [10482]  PID: [16756] ReviewService : requestInAppReview (com.mysupperapp)
2020-08-18 13:36:52.483 16756-17305/? I/PlayCore: UID: [10482]  PID: [16756] ReviewService : Initiate binding to the service.
2020-08-18 13:36:52.499 16756-16756/? I/PlayCore: UID: [10482]  PID: [16756] ReviewService : ServiceConnectionImpl.onServiceConnected(ComponentInfo{com.android.vending/com.google.android.finsky.inappreviewservice.InAppReviewService})
2020-08-18 13:36:52.499 16756-17305/? I/PlayCore: UID: [10482]  PID: [16756] ReviewService : linkToDeath
2020-08-18 13:36:52.528 16756-17123/? I/PlayCore: UID: [10482]  PID: [16756] OnRequestInstallCallback : onGetLaunchReviewFlowInfo
2020-08-18 13:36:52.528 16756-17305/? I/PlayCore: UID: [10482]  PID: [16756] ReviewService : Unbind from service.
2020-08-18 13:36:52.530 4671-5850/? I/ActivityTaskManager: START u0 {cmp=com.mysupperapp/com.google.android.play.core.common.PlayCoreDialogWrapperActivity (has extras)} from uid 10482
2020-08-18 13:36:52.640 4671-4699/? I/WindowManager: Window drawn AppWindowToken{91bad72 token=Token{ffcba7d ActivityRecord{4b2f8d4 u0 com.mysupperapp/com.google.android.play.core.common.PlayCoreDialogWrapperActivity t1622}}}
2020-08-18 13:36:52.758 4671-10621/? V/WindowManager: Changing focus from null to Window{f2f78ca u0 com.mysupperapp/com.google.android.play.core.common.PlayCoreDialogWrapperActivity} displayId=0
2020-08-18 13:36:52.772 4671-10621/? I/WindowManager:   SURFACE show Surface(name=com.mysupperapp/com.google.android.play.core.common.PlayCoreDialogWrapperActivity)/@0x3a0ea0f on display:0: com.mysupperapp/com.google.android.play.core.common.PlayCoreDialogWrapperActivity
2020-08-18 13:36:52.786 4671-7123/? V/WindowManager: Changing focus from Window{f2f78ca u0 com.mysupperapp/com.google.android.play.core.common.PlayCoreDialogWrapperActivity} to Window{1510385 u0 com.mysupperapp/com.exampleapp.MainActivity} displayId=0
2020-08-18 13:36:52.862 4109-4177/? E/BufferQueueProducer: [com.mysupperapp/com.google.android.play.core.common.PlayCoreDialogWrapperActivity#0] disconnect: not connected (req=1)
2020-08-18 13:36:53.055 4671-4699/? I/WindowManager: Window drawn AppWindowToken{91bad72 token=Token{ffcba7d ActivityRecord{4b2f8d4 u0 com.mysupperapp/com.google.android.play.core.common.PlayCoreDialogWrapperActivity t1622}}}

the error:

2020-08-18 13:36:52.862 4109-4177/? E/BufferQueueProducer: [com.mysupperapp/com.google.android.play.core.common.PlayCoreDialogWrapperActivity#0] disconnect: not connected (req=1)

Tested on a real device with the app that has already been published to the store. The app was downloaded through internal testing track.

Also, as @anmolguptachicmic said, it works fine on iOS.

Any ideas? :)

nluetteken commented 3 years ago

Same issue here unfortunately. Tested with different Google Play accounts for downloading and different phones, installed via Alpha Test track, production app is also published.

Works nicely on iOS, but on Android the dialog is not showing up in the app.

phatlaunchdeck commented 3 years ago

I'm having the same issue as well and my app has been live on the store for 2 years now, tested on 2 different real Android devices but nothing worked. Does it not work in debug mode and I need to test my app via one of the Play Store's tracks?

sregg commented 3 years ago

If sorry you all are having issues showing the review dialog. Have you read this: https://developer.android.com/guide/playcore/in-app-review/test#troubleshooting ?

realabbas commented 3 years ago

If sorry you all are having issues showing the review dialog. Have you read this: https://developer.android.com/guide/playcore/in-app-review/test#troubleshooting ?

To be honest, I didnt look for the third point where THE USER HAS ALREADY GIVEN A REVIEW. I'll remove my review on Playstore and then try it again.

rafauke commented 3 years ago

Hello @sregg I'm back after some testing.

First, the good news - it works :+1:

In my case the issue is/was the fact the I have more than one google play account on my phone (private, company). I have originally downloaded the app for account no. 1. When I have switched from Account no. 2 to no. 1 in Google Play Store and added my account no.1 to the group of internal testers, everything works fine :+1:

I am curious if it is possible to handle this scenario in any way.

Update:

Sometimes it works, sometimes it doesn't. I still cannot say what is the determining factor here.

rafauke commented 3 years ago

Ok, so I think I have finally got it running.

Maybe it will be useful for anybody else :)

So in my case the main issue was that I was using Internal test track in Google Play Console, but what I should have done was using the Internal App Sharing in the "Developer Tools" tab. The other one actually works for me. I went through enabling internal app sharing option in Google Play's Settings (which is hidden by default, you have to unlock by pressing google play store version multiple times).

If this was obvious to anybody, that's great :) I had quite a ride to figure this out to be honest - I should have gone through the docs more thoroughly.

nes123 commented 3 years ago

Did you have an enabled submit button in the internal testing? for some reason it is always disabled in my case, even after rating and writing the required review.

medmo7 commented 3 years ago

@nes123 : https://developer.android.com/guide/playcore/in-app-review/test#internal-app-sharing Screen Shot 2020-08-27 at 17 49 27

rafauke commented 3 years ago

Just FYI, I have released an app to production, the rating for Android does not appear. It does appear on internal app sharing though.

Peretz30 commented 3 years ago

Popup not showed up on Android dev build. Joining beta program for app solved issue for me

egunsoma commented 3 years ago

@rafauke We have the same issue with our app as well. We can see the popup coming up when using internal app sharing, however it doesn't work when released to the Play Store.

Have you managed to solve this issue? Maybe it's a different issue from this one.

rafauke commented 3 years ago

@egunsoma as much as I appreciate the work that has been put into this solution, I have implemented simple redirects to stores; I need a predictable solution for live app. This is not about this package though - I have gone through reimplementing the bridge myself using the official Android documentation and had the same results (i.e. sometimes it works, sometimes it doesn't). There might be some Android-specific nuances that I may not be aware of, maybe a native Android dev could have a look and share their opinion :)

egunsoma commented 3 years ago

@rafauke Alright thanks for your response. In our case sometimes it works, sometimes it doesn't is not accurate, since nobody could use it production (we have about 5k daily active users). Anyway thx again. :)

egunsoma commented 3 years ago

@Peretz30

Joining beta program for app solved issue for me

What do you mean by this? ☝️

Is there some kind of beta program which I should enable on the Play Store console?

nes123 commented 3 years ago

Is it correct that if we get success in the response the popup opened? if so in our case we see 100% success.

egunsoma commented 3 years ago

@nes123 In my experience the success response is fired regardless of the popup. Do you see an increase in your reviews?

nes123 commented 3 years ago

@egunsoma too early to say.

Peretz30 commented 3 years ago

@Peretz30

Joining beta program for app solved issue for me

What do you mean by this? ☝️

Is there some kind of beta program which I should enable on the Play Store console?

Yes, I had enabled a beta program in my Google Console. After that I joined beta program by my self and was able to rate app in dev build

rafauke commented 3 years ago

Yes, I had enabled a beta program in my Google Console. After that I joined beta program by my self and was able to rate app in dev build

I can confirm that dev testing (on Internal App Sharing in my case) was reliable. The rating didn't work in production though.

Peretz30 commented 3 years ago

Yes, I had enabled a beta program in my Google Console. After that I joined beta program by my self and was able to rate app in dev build

I can confirm that dev testing (on Internal App Sharing in my case) was reliable. The rating didn't work in production though.

Thats bad. I didn't release my app with app-rate yet. Did rating working in production for someone?

nes123 commented 3 years ago

It does not work, we tested it on a large scale production product.

egunsoma commented 3 years ago

@nes123 Same here, I've opened #70 to address this issue. Also, you can see that others have this issue as well, there is already a ticket in Google's issue tracker: https://issuetracker.google.com/issues/166940713#comment9

nes123 commented 3 years ago

My impression is that it was fixed yesterday (server-side if it makes sense?!)

egunsoma commented 3 years ago

@nes123 I started getting significantly more reviews from the 6th of September, as you can see in the picture. Also our release with the In App Review API was around the 1st of September. I also beleive that this is an issue on Google's end.

image
davidsalib commented 3 years ago

Having the same issue - if I use preferInApp it doesn't work (tested on a device with a release build). Removing preferInApp at least lets me get to the Play Store vs. nothing happening at all.

I did a little hack so that in production people could try tapping the button twice (suboptimal, but interested to see if maybe in production the issue will be gone). With this hack, on Android, users would press the rate button once, if the dialog doesn't come up, the hope is that they would press it again (assuming they just need to try again), and then it would go to the play store.

image

sagynbek commented 3 years ago

Same issue, production app works on iOS, but is not working on Android devices

davidsalib commented 3 years ago

Update: I published my app to the store (https://listenr-app.com) and the rating now works. Seems like maybe it has to be fully published to work?

The hack I shared above also works as a fallback.

gusgard commented 3 years ago

FYI: I tested with internal app sharing and worked well, thanks!

CHANDRAMOHANnegi commented 3 years ago

This is working in debug mode , I am using developer option of my phone ,

my app was in open testing , and I was one of the internal tester

1 delete your previous Review 2 login with the tester account (if you are internal tester) in google playstore.