FakeReviewManager

public class FakeReviewManager
extends Object implements ReviewManager

java.lang.Object
   ↳ com.google.android.play.core.review.testing.FakeReviewManager


A fake implementation of the ReviewManager.

This implementation is completely self-contained in the library and does not interact with the Play Store. For this reason, no UI is shown and no review is performed.

Keep in mind, you should use this API for only unit-tests and early development iterations. It is not intended for full stack integration tests.

Summary

Public constructors

FakeReviewManager(Context context)

Public methods

Task<Void> launchReviewFlow(Activity activity, ReviewInfo reviewInfo)

Launches and displays the review flow to the user.

Task<ReviewInfo> requestReviewFlow()

Retrieves all the needed information to launch the review flow.

Inherited methods

Public constructors

FakeReviewManager

public FakeReviewManager (Context context)

Parameters
context Context

Public methods

launchReviewFlow

public Task<Void> launchReviewFlow (Activity activity, 
                ReviewInfo reviewInfo)

Launches and displays the review flow to the user.

Note: In some circumstances the review flow will not be shown to the user, e.g. they have already seen it recently, so do not assume that calling this method will always display the review dialog.

App should resume when the returned task is completed.

Parameters
activity Activity

reviewInfo ReviewInfo

Returns
Task<Void>

requestReviewFlow

public Task<ReviewInfo> requestReviewFlow ()

Retrieves all the needed information to launch the review flow.

Needs to be called before launchReviewFlow(Activity, ReviewInfo) to obtain an ReviewInfo object which is used to launch the review flow.

Returns
Task<ReviewInfo>