Closed IAmSarthakVerma closed 3 years ago
@britannio Can you take a look at this?
@IAmSarthakVerma Hey, unfortunately, there's no way for this plugin to determine that the aforementioned quota has been exceeded. It's a limitation of the underlying API that's present to deter misuse of the API.
@britannio Can we not add a callback for android like this:
manager = ReviewManagerFactory.create(this);
private void Review(){
manager.requestReviewFlow().addOnCompleteListener(new OnCompleteListener<ReviewInfo>() {
@Override
public void onComplete(@NonNull Task<ReviewInfo> task) {
if(task.isSuccessful()){
reviewInfo = task.getResult();
manager.launchReviewFlow(MainActivity.this, reviewInfo).addOnFailureListener(new OnFailureListener() {
@Override
public void onFailure(Exception e) {
Toast.makeText(MainActivity.this, "Rating Failed", Toast.LENGTH_SHORT).show();
}
}).addOnCompleteListener(new OnCompleteListener<Void>() {
@Override
public void onComplete(@NonNull Task<Void> task) {
Toast.makeText(MainActivity.this, "Review Completed, Thank You!", Toast.LENGTH_SHORT).show();
}
});
}
}
}).addOnFailureListener(new OnFailureListener() {
@Override
public void onFailure(Exception e) {
Toast.makeText(MainActivity.this, "In-App Request Failed", Toast.LENGTH_SHORT).show();
}
});
}
Will the addOnFailureListener not work for this use ?
I don't think so according to https://developer.android.com/guide/playcore/in-app-review/kotlin-java#launch-review-flow
Okay, thanks!!! Closing this issue.
but why future timeout doesn't work, isn't supposed to run the given function (open store listing) when the future cross the given duration
but why future timeout doesn't work, isn't supposed to run the given function (open store listing) when the future cross the given duration
The underlying APIs cannot be used to determine if requestReview()
doesn't show the rating dialog so asynchronous Dart solutions like Future
won't help.
There should be a parameter to set the fallback to open store listing if the requestReview function does not work because of the quota enforced by the underlying API.
Or the requestReview function should return a boolean value instead of void so that we can know if the requestReview was a success or not and can call openStoreListing in case the requestReview was unsuccessful.