Skip to content

Commit

Permalink
Fix crash on PlayStore disabled
Browse files Browse the repository at this point in the history
  • Loading branch information
ogard committed Jan 11, 2021
1 parent 83902e6 commit d064799
Showing 1 changed file with 9 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ public String getName() {

@ReactMethod
public void show() {
if(isPlayStoreInstalled(getReactApplicationContext())) {
if (isPlayStoreInstalled(getReactApplicationContext())) {
ReviewManager manager = ReviewManagerFactory.create(getReactApplicationContext());
Task<ReviewInfo> request = manager.requestReviewFlow();
Log.e("isPlayStoreInstalled",isPlayStoreInstalled(getReactApplicationContext())+"");
Expand All @@ -50,11 +50,17 @@ public void show() {
});

} else {
Log.e("Review Error", task.getResult().toString());
String taskErrorMessage = "";
try {
taskErrorMessage = task.getResult().toString();
} catch (Exception e) {
taskErrorMessage = e.getMessage();
}
Log.e("Review Error", taskErrorMessage);
}

});
}else{
} else {
Log.e("isPlayStoreInstalled",isPlayStoreInstalled(getReactApplicationContext())+"");
}
}
Expand Down

0 comments on commit d064799

Please sign in to comment.