App Rating Submit button not working

To test this feature it is needed to complete an order and it is in the QA environment, the user should click the button “I’m close”.

Remember to turn on the ENABLE_APP_RATING_ON_ORDER_COMPLETED feature flag and keep the default value as true, or create a rule to allow the flag to your environment

Currently:

Android:

  • Emulator and Physical device:

    • DEV and QA

      • Pickup and Delivery

        • Until this time, the native App Rating Modal shows up, but it's not possible to give a rating because it throws two error messages:

          • Request Review Failed,

          • Request Review Task Failed

        • This error is thrown when there is a failure to the request call, but we don’t know yet which is the reason, due to the lack of documentation and several reasons that could happen.

Review the attached image and library code block:

package com.capacitor.rateApp; import android.util.Log; import androidx.appcompat.app.AppCompatActivity; import com.getcapacitor.PluginCall; import com.google.android.play.core.review.ReviewInfo; import com.google.android.play.core.review.ReviewManager; import com.google.android.play.core.review.ReviewManagerFactory; import com.google.android.gms.tasks.OnCompleteListener; import com.google.android.gms.tasks.OnFailureListener; import com.google.android.gms.tasks.OnSuccessListener; import com.google.android.gms.tasks.Task; public class CapacitorRateApp { public void requestReview(final PluginCall call, final AppCompatActivity activity) { final ReviewManager manager = ReviewManagerFactory.create(activity); Task<ReviewInfo> request = manager.requestReviewFlow(); request.addOnFailureListener( new OnFailureListener() { @Override public void onFailure(Exception e) { e.printStackTrace(); call.reject("Request review failed", e); } } ); request.addOnCompleteListener( new OnCompleteListener<ReviewInfo>() { @Override public void onComplete(Task<ReviewInfo> task) { if (task.isSuccessful()) { // We can get the ReviewInfo object ReviewInfo reviewInfo = task.getResult(); Task<Void> flow = manager.launchReviewFlow(activity, reviewInfo); flow.addOnCompleteListener( new OnCompleteListener<Void>() { @Override public void onComplete(Task<Void> task) { Log.i("RateApp", "Request review flow finished"); // 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. call.resolve(); } } ); flow.addOnSuccessListener( new OnSuccessListener<Void>() { @Override public void onSuccess(Void result) { call.resolve(); } } ); flow.addOnFailureListener( new OnFailureListener() { @Override public void onFailure(Exception e) { e.printStackTrace(); call.reject("Request review flow Failed", e); } } ); } else { // There was some problem, continue regardless of the result. call.reject("Request review task Failed"); } } } ); } }

https://github.com/Nodonisko/capacitor-rate-app/blob/master/android/src/main/java/com/capacitor/rateApp/CapacitorRateApp.java


IOS

  • Emulator and Physical device:

    • DEV/QA/Prod

      • It is possible to show up the native modal, but the submit button isn’t working, it looks like it is disabled. The first approach was to deduce that because the emulator didn’t have an App Store, it couldn’t redirect to it and therefore the submit button couldn’t work, however, it was performed the same test in a physical device and the behavior happened.

      • A new test will be performed in a PROD environment by calling the capacitor-rate-app function on a different page (before the payment) to ensure it isn’t an issue with the environment type.

Review the attached image: