Add fallback behaviour to the custom review prompt when an error is returned from
Categories
(Firefox for Android :: Onboarding, task)
Tracking
()
| 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:
- Log error
- 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
}
}
}
Updated•4 months ago
|
Updated•4 months ago
|
https://hg.mozilla.org/mozilla-central/rev/7081baab7491
https://hg.mozilla.org/mozilla-central/rev/f6d84edc57f3
Comment 5•4 months ago
|
||
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!
Updated•4 months ago
|
Comment 6•4 months ago
|
||
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:
-
NO_ERROR = 0
How: This is the 'happy' path, which has been previously validated.
Expected result: The in-app review flow is displayed. -
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. -
INVALID_REQUEST
How: N/A through manual validation. -
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.
Updated•4 months ago
|
Comment 8•4 months ago
|
||
I've retested the 4th scenario using these steps:
- Leave a feedback directly on Play store.
- Trigger the prompt - the updated prompt was displayed.
- Tapped the "It's great!".
- Tapped the "Rate Firefox on Play store".
- 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).
Comment 9•4 months ago
|
||
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.
Description
•