我已经实现了GoogleIn-AppReviewAPI,并从onCreate方法启动
private void inAppReviewDialog(Context context) {
ReviewManager manager = ReviewManagerFactory.create(context);
Task<ReviewInfo> request = manager.requestReviewFlow();
request.addOnCompleteListener(task -> {
if (task.isSuccessful()) {
// We can get the ReviewInfo object
ReviewInfo reviewInfo = task.getResult();
Task<Void> flow = manager.launchReviewFlow((Activity) context, reviewInfo);
flow.addOnCompleteListener(task1 -> {
// The flow has finished. The API does not indicate whether the user
// reviewed or not, or even whether the review dialog was shown. Thus, no
// matter the result, we continue our app flow.
Log.v(this.getClass().getName(),"In Dialog Success");
});
}else {
Log.v(this.getClass().getName(),"In Dialog failed");
}
});
}