Closed Bug 1985507 Opened 4 months ago Closed 4 months ago

Add fallback behaviour to the custom review prompt when an error is returned from

Categories

(Firefox for Android :: Onboarding, task)

All
Android
task

Tracking

()

RESOLVED FIXED
144 Branch
Tracking Status
firefox144 --- fixed

People

(Reporter: towhite, Assigned: towhite)

References

Details

(Whiteboard: [fxdroid][group2])

Attachments

(3 files)

Handle the flow whenrequestReviewFlow task is not successful - see https://developer.android.com/guide/playcore/in-app-review/kotlin-java#request-review-info. Suggest:

  1. Log error
  2. Redirect directly to Play store listing

Pseudocode:

    /** Launch the in-app review flow, unless we've hit the quota. */
    suspend fun tryPromptReview(activity: Activity) {
        val flow = withContext(Dispatchers.IO) { manager.requestReviewFlow() }

        flow.addOnCompleteListener {
            if (it.isSuccessful) {
                manager.launchReviewFlow(activity, it.result)
                recordReviewPromptEvent(
                    it.result.toString(),
                    numberOfAppLaunches(),
                    Date(),
                )
            } else {
                // There was some problem, log or handle the error code.
                @ReviewErrorCode val reviewErrorCode = (it.exception as ReviewException).errorCode
            }
        }
    }
Assignee: nobody → towhite
Status: NEW → ASSIGNED
Pushed by icedicedcoffee@proton.me: https://github.com/mozilla-firefox/firefox/commit/ec622775c9c3 https://hg.mozilla.org/integration/autoland/rev/7081baab7491 Add fallback behaviour to the custom review prompt when an error is returned from r=android-reviewers,gmalekpour https://github.com/mozilla-firefox/firefox/commit/df405bbbec27 https://hg.mozilla.org/integration/autoland/rev/f6d84edc57f3 Refactor `SettingsFragment` to use the tryLaunchPlayStoreReview function r=android-reviewers,gmalekpour
Flags: qe-verify+
Status: ASSIGNED → RESOLVED
Closed: 4 months ago
Resolution: --- → FIXED
Target Milestone: --- → 144 Branch

Hi, Tom!
I tried to verify this task with a debug build containing the fix - trying to check this error "No Play Store app is found on device or an unofficial version is installed."
Unfortunately, the updated review prompt was displayed, as can be seen in the telemetry sent here.
Please guide me on how to trigger at least one of the 4 errors codes mentioned.
Thank you!

Flags: needinfo?(towhite)

Unfortunately, disabling the Play Store, does not trigger the old review prompt.
Tested on 8/29 Nightly 144.0a1 build with a Samsung Galaxy S22 Ultra (Android 14).

Thanks Mira!

There are 4 main states to test:

  1. NO_ERROR = 0
    How: This is the 'happy' path, which has been previously validated.
    Expected result: The in-app review flow is displayed.

  2. PLAY_STORE_NOT_FOUND
    How: Disable the app store
    Expected result: The app attempts to open the Play store, but cannot as it is not available.

  3. INVALID_REQUEST
    How: N/A through manual validation.

  4. INTERNAL_ERROR
    How: Have an existing review added via the Play store, then try to review again through the prompt.
    Expected result: The app opens the Play store listing for the app where the previous review was made.

Flags: needinfo?(towhite)
Flags: qe-verify+

I've retested the 4th scenario using these steps:

  1. Leave a feedback directly on Play store.
  2. Trigger the prompt - the updated prompt was displayed.
  3. Tapped the "It's great!".
  4. Tapped the "Rate Firefox on Play store".
  5. I was not redirected on Play Store to my previous review.

Tested on 8/30 Nightly build, with a Samsung Galaxy S22 Ultra (Android 15).

See Also: → 1986398

Hey Mira! Looks like INTERNAL_ERROR is N/A through manual validation.

We'll try to cover the steps you used for testing it in bug 1986398, so stay tuned for when it's ready to test again.

Regressions: 1992849
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: