Closed Bug 1811795 Opened 2 years ago Closed 2 years ago

Target Android 13 (SDK 33) - Fenix

Categories

(Fenix :: General, task, P1)

All
Android
task

Tracking

(firefox113 fixed)

RESOLVED FIXED
113 Branch
Tracking Status
firefox113 --- fixed

People

(Reporter: mcarare, Assigned: mcarare)

References

Details

(Whiteboard: [fxdroid] [geckoview:m112][geckoview:m113])

Attachments

(1 file)

From github: https://github.com/mozilla-mobile/fenix/issues/27407.

The latest SDK apps can target is 33: https://developer.android.com/about/versions/13

See also related Android 13 issues.

Currently blocked on https://github.com/mozilla-mobile/fenix/issues/25808.

┆Issue is synchronized with this Jira Task

Change performed by the Move to Bugzilla add-on.

Assignee: nobody → mcarare
Type: defect → task
Priority: -- → P1
Severity: -- → N/A
Rank: 111
Whiteboard: [fxdroid]

I synced this bug to the FXDROID Jira project because Joe wrote:

Marking this as blocked, for now, until we at least come up with a documented plan of how to handle notification permission requests for the various different notification channels & use cases.

in duplicate Jira ticket https://mozilla-hub.atlassian.net/browse/FNXV2-21799?focusedCommentId=633848.

Do we have separate bugs for Fenix and Focus targeting Android 13?

Depends on: Android_13

https://bugzilla.mozilla.org/show_bug.cgi?id=1802577 was for targeting 13 in Focus, it has already been resolved.

Summary: Target Android 13 (SDK 33) → Target Android 13 (SDK 33) - Fenix
Whiteboard: [fxdroid] → [fxdroid] [geckoview:m112]
Depends on: 1818422

Just added the ticket for doing the notification permissions investigation as a blocker to this ticket, but it's a "light" blocker - essentially, all I'm looking for is documented confirmations about various aspects of the app's behavior once we land this change.

E.g.,:

  • What's will be the notification permission prompt behavior on Android 13 and up, versus Android 12 and below once we're targeting SDK 33?
  • What does the user experience if they reject that permission?
  • Do we have a list of all the features this could impact?
  • Do we have estimates of permissions acceptance rates from Focus? Can we estimate what percentage of Fenix users will reject notifications, thus being impacted by this?

We don't need to solve all of that right now, but I'd like to have an outline of our predictions so we can monitor results more intelligently as we roll this out.

Here's what will change after targeting 13 versus the current situation:

  • The notification permission prompt will be the same as the current one. The difference is that we would choose the moment we request the permission, rather than the request coming from OS when a notification channel is created.

  • After rejection, the user has the same experience as before. The difference is that after targeting we would have access to the result of the request and properly act on that.

  • The features this permission impacts are already handled in the PR for targeting, by using a new component, the NotificationsDelegate. The identification was not manual, but automatical, due to the core library update (that added RequiresPermission to APIs that require granting the POST_NOTIFICATIONS permission on SDK 33 and above) and the lint check added in the PR that prevents calling the notify method directly from the code without using the delegate.

  • The patch does not have any impact on permissions acceptance rates. It does not request something that is not already requested in the current version. As previously stated, without targeting 13 we do not even have access to knowing the result of the request. The only probes implemented in Fenix and Focus track the state of the permission, not the result of the request. The rejection could have happened from the OS settings or a notification itself, not the request we currently make.

So, to emphasize this, targeting 13 does not change the fact that we already need to request the notification permission on Android 13 devices and that the request is made by the OS; targeting 13 will allow us to choose the moment we make the request and handle the result of the request.

These answers are based on the official documentation and recommendations found here

Whiteboard: [fxdroid] [geckoview:m112] → [fxdroid] [geckoview:m112][geckoview:m113]
Status: NEW → ASSIGNED

I had previously believed that updating to target SDK 13 would result in users on Android 12 and below receiving the notification permission prompt (which wouldn't be ideal), but that I was mistaken about that. In light of that, this change doesn't need to be blocked by the permissions audit in bug 1818422; that can be an independent initiative.

No longer depends on: 1818422

From meeting today with :rsainani, :mcarare, :csadilek, :royang, :brclark

Based on the discussion today, it was concluded that there are no additional risks for targeting SDK33 on Fenix.
OVERALL RECOMMENDATION: Land the patches targeting SDK 33 on v113 ideally early next week. Giving it ~2 weeks on v113 nightly.

NI's for Roger and Rahul who will log and link the follow-up tickets for handling Crash Reporting and Context related notifications/permissions

Flags: needinfo?(rsainani)
Flags: needinfo?(royang)

Thanks :amoya logged the notification permission Bug 1824168

Flags: needinfo?(rsainani)

Crash reporting follow up issue Bug 1824175

Flags: needinfo?(royang)
Authored by https://github.com/mcarare
https://github.com/mozilla-mobile/firefox-android/commit/3d50013a76d4759ab00fa76c04d7756ac738a23b
[main] Bug 1811795 - Target Android 13 in Fenix.

Authored by https://github.com/mcarare
https://github.com/mozilla-mobile/firefox-android/commit/eae7559ed4d7e249762480663f9a1c931703522f
[main] Bug 1811795 - Use a notification delegate in notification workers.

Authored by https://github.com/mcarare
https://github.com/mozilla-mobile/firefox-android/commit/57abf0096fa24a0224cf56d557b90c4614816961
[main] Bug 1811795 - Add permission request in HomeNotificationPermissionDialogFragment.

Authored by https://github.com/mcarare
https://github.com/mozilla-mobile/firefox-android/commit/267f1864e09fba4aa955ff2045d13e42987440e8
[main] Bug 1811795 - Allow showing an explanation prompt before requesting permission.
Status: ASSIGNED → RESOLVED
Closed: 2 years ago
Flags: qe-verify+
Resolution: --- → FIXED
Target Milestone: --- → 113 Branch

Opened https://mozilla-hub.atlassian.net/browse/QA-1840 QA PI request to test this change in depth, similar to the already performed testing for Focus at the moment it started targetting Android 13.

Flags: qe-verify+
Depends on: 1850933
Regressions: 1876328
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: