react-native-rate icon indicating copy to clipboard operation
react-native-rate copied to clipboard

pop up not visible when preferInApp: true on Android

Open anmolguptachicmic opened this issue 4 years ago • 37 comments

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>

anmolguptachicmic avatar Aug 07 '20 12:08 anmolguptachicmic

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 avatar Aug 07 '20 12:08 KjellConnelly

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?

realabbas avatar Aug 07 '20 19:08 realabbas

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.

KjellConnelly avatar Aug 07 '20 20:08 KjellConnelly

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

sregg avatar Aug 07 '20 20:08 sregg

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

realabbas avatar Aug 07 '20 20:08 realabbas

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.

anmolguptachicmic avatar Aug 08 '20 02:08 anmolguptachicmic

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

medmo7 avatar Aug 10 '20 12:08 medmo7

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? :)

rafauke avatar Aug 18 '20 11:08 rafauke

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.

nluetteken avatar Aug 19 '20 07:08 nluetteken

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?

phatlaunchdeck avatar Aug 19 '20 09:08 phatlaunchdeck

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 ?

sregg avatar Aug 19 '20 13:08 sregg

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.

realabbas avatar Aug 19 '20 13:08 realabbas

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 avatar Aug 21 '20 11:08 rafauke

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.

rafauke avatar Aug 21 '20 15:08 rafauke

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.

nes123 avatar Aug 27 '20 16:08 nes123

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

medmo7 avatar Aug 27 '20 16:08 medmo7

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

rafauke avatar Sep 01 '20 13:09 rafauke

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

Peretz30 avatar Sep 02 '20 10:09 Peretz30

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

egunsoma avatar Sep 03 '20 09:09 egunsoma

@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 :)

rafauke avatar Sep 03 '20 14:09 rafauke

@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 avatar Sep 03 '20 20:09 egunsoma

@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?

egunsoma avatar Sep 03 '20 20:09 egunsoma

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

nes123 avatar Sep 03 '20 20:09 nes123

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

egunsoma avatar Sep 03 '20 20:09 egunsoma

@egunsoma too early to say.

nes123 avatar Sep 03 '20 22:09 nes123

@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

Peretz30 avatar Sep 06 '20 21:09 Peretz30

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.

rafauke avatar Sep 07 '20 14:09 rafauke

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?

Peretz30 avatar Sep 07 '20 15:09 Peretz30

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

nes123 avatar Sep 07 '20 15:09 nes123

@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

egunsoma avatar Sep 07 '20 16:09 egunsoma

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

nes123 avatar Sep 10 '20 09:09 nes123

@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

egunsoma avatar Sep 11 '20 04:09 egunsoma

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

davidsalib avatar Sep 15 '20 15:09 davidsalib

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

sagynbek avatar Sep 21 '20 06:09 sagynbek

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.

davidsalib avatar Sep 21 '20 14:09 davidsalib

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

gusgard avatar Oct 27 '20 18:10 gusgard

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.

CHANDRAMOHANnegi avatar Jan 13 '21 17:01 CHANDRAMOHANnegi