10

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?

Bolt UIX
  • 5,988
  • 6
  • 31
  • 58
Brutal
  • 798
  • 1
  • 14
  • 37
  • 2
    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 logic – Steyrix Sep 08 '20 at 12:58

1 Answers1

15

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

Ali MS
  • 151
  • 1
  • 3
  • 1
    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. https://developer.android.com/guide/playcore/in-app-review/test – Joshua Wolff Dec 19 '20 at 02:28
  • Thanks for sharing! – Tomas M Oct 27 '21 at 18:44