In app review(FakeReviewManager) dialog not showing in android
Asked Answered
D

1

12

There is a simple app in android studio written in kotlin.This is the following code in onCreate

val manager = FakeReviewManager(baseContext)
    val request = manager.requestReviewFlow()

    request.addOnCompleteListener{ request ->
        if (request.isSuccessful){
            Log.i("message","Rating")
            manager.launchReviewFlow(this, request.result).addOnCompleteListener{
                Log.i("message","Rating1")
            }
        }else{
        }
    }

In Logcat Messages showed successfully. But nothing has showed.How can Fix this this problem?

Dori answered 8/9, 2020 at 7:54 Comment(1)
Play Core's fake managers are not really useful for testing the flow. Consider using internal test track or internal app sharing for checking the actual flow. Fake manager is for testing the info retrieving and triggering logicHelico
C
23

FakeReviewManager is strictly used for unit test and does not show any UI, if a UI is what you are expecting.

Cowart answered 11/11, 2020 at 6:5 Comment(3)
Thank you for the clarification. I now see this on the docs "Note: FakeReviewManager does not simulate the UI. It only fakes the API method result by always providing a fake ReviewInfo object and returning a success status when the in-app review flow is launched. developer.android.com/guide/playcore/in-app-review/testBookman
Thanks for sharing!Silvanasilvano
Wow, seems useless to me.Oldie

© 2022 - 2024 — McMap. All rights reserved.