brave / brave-browser

Brave browser for Android, iOS, Linux, macOS, Windows.
https://brave.com
Mozilla Public License 2.0
17k stars 2.21k forks source link

VPN notification not appearing due to `Notification` permission timing (`Android 13+`) #30624

Open kjozwiak opened 1 year ago

kjozwiak commented 1 year ago

Description

Because we delayed the Notification permission modal on Android 13+, it's possible that a new user buys/enables VPN but won't see the VPN Notification that displays the amount of data that's being routed through the VPN including the current location. Once the user receives the modal and accepts Brave notifications, the VPN entry will appear via Androids notification tray.

Maybe we can improve the timing? Or prompt the user for notification permissions if they're enabling VPN and they still haven't received the modal due to being a new install/user.

Some context, permissions modal was moved to appear later via https://github.com/brave/brave-browser/issues/27644.

Steps to Reproduce

  1. download/install Brave (new profile)
  2. purchase/enable VPN and you'll notice that the VPN notification won't appear till the user receives the permissions modal

Actual result:

Expected result:

When a user enabled VPN, we should be displaying the VPN notification. If the user hasn't received the permission modal, maybe display it when VPN is being enabled but a permission decision hasn't been made.

Reproduces how often:

100% reproducible using the STR/Cases outlined above.

Brave version (brave://version info)

Brave | 1.52.113 Chromium: 114.0.5735.53 (Official Build) (64-bit)
--- | ---
Revision | c499d7ea22c8b2dba278465a5df7b86a8efa4e64-refs/branch-heads/5735@{#970}
OS | Android 13; Build/TP1A.220624.014; 33; REL

Version/Channel Information:

Other Additional Information:

Miscellaneous Information:

deeppandya commented 1 year ago

@kjozwiak after this change : https://github.com/brave/brave-core/pull/18641. without notification, VPN feature should work with out notification. would please confirm ?

kjozwiak commented 1 year ago

@kjozwiak after this change : brave/brave-core#18641. without notification, VPN feature should work with out notification. would please confirm ?

It's not related to https://github.com/brave/brave-core/pull/18641. Basically the issue is if a user enables/restores a VPN before they give Brave notification permissions, users won't see the VPN notification until they Allow. So the above issue is to see if we can possibly improve the timing or trigger the Notification modal when a user enables VPN.