chemerisuk / cordova-plugin-app-review

Cordova plugin to review app
MIT License
40 stars 28 forks source link

From which Android version should it work? #2

Closed martijnmichel closed 4 years ago

martijnmichel commented 4 years ago

Ive tried this code in my app but it doesnt work. Android version 8.0.0.

cordova.plugins.InAppReview.requestReviewDialog().catch(() => {
   return cordova.plugins.InAppReview.requestReview();
});

If i only run requestReview() it launches the store just fine.

iOS works as expected.

martijnmichel commented 4 years ago

Android version should be good, from google website:

Android devices (phones and tablets) running Android 5.0 (API level 21) or higher that have the Google Play Store installed.

chemerisuk commented 4 years ago

@martijnmichel Every supported Android (5+) version should work because inapp dialog implemented in support libraries. Could depend on play libraries installed on device though. What is your result when calling requestReviewDialog()?

martijnmichel commented 4 years ago

On android i dont get any result 😐

chemerisuk commented 4 years ago

@martijnmichel any logs from logcat?

martijnmichel commented 4 years ago

2020-08-21 09:07:18.947 24713-24786/org.stroopwafel.music.app I/PlayCore: UID: [10074] PID: [24713] ReviewService : requestInAppReview (org.stroopwafel.music.app) 2020-08-21 09:07:18.947 24713-24886/org.stroopwafel.music.app I/PlayCore: UID: [10074] PID: [24713] ReviewService : Initiate binding to the service. 2020-08-21 09:07:18.969 24713-24713/org.stroopwafel.music.app I/PlayCore: UID: [10074] PID: [24713] ReviewService : ServiceConnectionImpl.onServiceConnected(ComponentInfo{com.android.vending/com.google.android.finsky.inappreviewservice.InAppReviewService}) 2020-08-21 09:07:18.969 24713-24886/org.stroopwafel.music.app I/PlayCore: UID: [10074] PID: [24713] ReviewService : linkToDeath 2020-08-21 09:07:18.973 24142-24154/? I/Finsky: [399] ded.(19): org.stroopwafel.music.app is installed but certificate mismatch 2020-08-21 09:07:18.992 24713-24725/org.stroopwafel.music.app I/PlayCore: UID: [10074] PID: [24713] OnRequestInstallCallback : onGetLaunchReviewFlowInfo 2020-08-21 09:07:18.992 24713-24886/org.stroopwafel.music.app I/PlayCore: UID: [10074] PID: [24713] ReviewService : Unbind from service. 2020-08-21 09:07:18.996 796-3078/? I/ActivityManager: START u0 {cmp=org.stroopwafel.music.app/com.google.android.play.core.common.PlayCoreDialogWrapperActivity (has extras)} from uid 10074 on display 0 2020-08-21 09:07:19.006 24713-24713/org.stroopwafel.music.app D/CordovaActivity: Paused the activity. 2020-08-21 09:07:19.021 796-3724/? I/ActivityManager: START u0 {cmp=com.android.vending/com.google.android.finsky.inappreviewdialog.InAppReviewActivity (has extras)} from uid 10042 on display 0 2020-08-21 09:07:19.082 24142-24142/? W/ProxyAndroidLoggerBackend: Too many Flogger logs received before configuration. Dropping old logs. 2020-08-21 09:07:19.194 24713-24713/org.stroopwafel.music.app D/CordovaActivity: Resumed the activity. 2020-08-21 09:07:19.224 24142-24142/? W/ProxyAndroidLoggerBackend: Too many Flogger logs received before configuration. Dropping old logs. 2020-08-21 09:07:21.646 796-1805/? D/WifiStateMachine: updateCapabilities for config:VGV7519BD732Efalse,false 2020-08-21 09:07:21.667 22879-22906/? E/CarrierServices: [834] bqj.a: Failed to get com.google.android.apps.messaging client info: android.content.pm.PackageManager$NameNotFoundException: com.google.android.apps.messaging at android.app.ApplicationPackageManager.getPackageInfoAsUser(ApplicationPackageManager.java:147) at android.app.ApplicationPackageManager.getPackageInfo(ApplicationPackageManager.java:132) at bqj.a(PG:70) at bqj.a(PG:181) at bqj.a(PG:86) at cgg.a(PG:9) at cga.run(Unknown Source) at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1133) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:607) at java.lang.Thread.run(Thread.java:761)

chemerisuk commented 4 years ago

@martijnmichel something wrong with your app certificates:

2020-08-21 09:07:18.969 24713-24886/org.stroopwafel.music.app I/PlayCore: UID: [10074] PID: [24713] ReviewService : linkToDeath 2020-08-21 09:07:18.973 24142-24154/? I/Finsky: [399] ded.(19): org.stroopwafel.music.app is installed but certificate mismatch

martijnmichel commented 4 years ago

what does this mean ? how can i fix it?

chemerisuk commented 4 years ago

Try google, your problem is not related to the plugin.

martijnmichel commented 4 years ago

I dont think that was the problem tbh. New error:

2020-09-16 11:37:58.000 7478-7552/org.stroopwafel.music.app I/PlayCore: UID: [10078]  PID: [7478] ReviewService : requestInAppReview (org.stroopwafel.music.app)
2020-09-16 11:37:58.002 7478-7686/org.stroopwafel.music.app I/PlayCore: UID: [10078]  PID: [7478] ReviewService : Initiate binding to the service.
2020-09-16 11:37:58.009 7478-7478/org.stroopwafel.music.app I/PlayCore: UID: [10078]  PID: [7478] ReviewService : ServiceConnectionImpl.onServiceConnected(ComponentInfo{com.android.vending/com.google.android.finsky.inappreviewservice.InAppReviewService})
2020-09-16 11:37:58.010 7478-7686/org.stroopwafel.music.app I/PlayCore: UID: [10078]  PID: [7478] ReviewService : linkToDeath
2020-09-16 11:37:58.040 7478-7555/org.stroopwafel.music.app I/PlayCore: UID: [10078]  PID: [7478] OnRequestInstallCallback : onGetLaunchReviewFlowInfo
2020-09-16 11:37:58.040 7478-7686/org.stroopwafel.music.app I/PlayCore: UID: [10078]  PID: [7478] ReviewService : Unbind from service.
2020-09-16 11:37:58.060 7478-7478/org.stroopwafel.music.app D/CordovaActivity: Paused the activity.
2020-09-16 11:37:58.205 7478-7478/org.stroopwafel.music.app D/CordovaActivity: Resumed the activity.
chemerisuk commented 4 years ago

@martijnmichel added a note into README about this case

After the account on the device has downloaded the app at least once from the internal test track and is part of the testers list, you can deploy new versions of the app via cordova cli and call requestReview in debug mode

Read https://developer.android.com/guide/playcore/in-app-review/test#test-play-store

martijnmichel commented 4 years ago

Could you implement using the FakeReviewManager from that page to make it easier to test functionality?

chemerisuk commented 4 years ago

@martijnmichel no plans to do that.

martijnmichel commented 4 years ago

Then I have no way of testing it 😕