Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Android 13] Notifications - user manually disable notifications #25042

Closed
timchilds opened this issue Aug 29, 2022 · 2 comments · Fixed by brave/brave-core#15407
Closed

[Android 13] Notifications - user manually disable notifications #25042

timchilds opened this issue Aug 29, 2022 · 2 comments · Fixed by brave/brave-core#15407

Comments

@timchilds
Copy link

timchilds commented Aug 29, 2022

Problem

Android 13 has introduced a notifications permission request modal similar to iOS. Currently this modal appears randomly during the onboarding flow. We are solving for this by triggering a permissions prompt during rewards / privacy report opt-in (further details in #25041). However users will still able to disable notifications manually which would result in:

  1. Private ads no longer functioning.
  2. Brave unable to send the weekly privacy report notification.

Solution

We should inform users BEFORE AND AFTER they attempt to disable notifications that this action will impact the private ads and privacy report features.

Requirements

IMPORTANT NOTE: All of the following requirements are conditional to private ads and/or privacy report being ON.

Brave Settings Menu

  1. When a user attempts to disable notifications from the Brave settings menu we should:
  • Show a message asking “are you sure you want to do that because…” informing the user that this action will disable private ads and/or the privacy weekly report (depending on which feature is currently enabled).
  • Show the option to ignore the message or cancel action.
  • On tap of cancel option: keep notifications enabled.
  • On tap of ignore: disable notifications.
  1. After a user disables notifications from the Brave settings menu we should:
  • Switch off private ads and add a notice near the private ads toggle informing the user that they need to re-enable notifications for the private ads to function.
  • Add a notice in the privacy report informing the user that they need to re-enable notifications to be able to receive the weekly privacy report.
  • On tap of notices: show notifications permission modal.

Android System Settings

  1. When a user disables notifications from the Android system settings. On next launch of Brave we should:
  • Show a message informing the user that private ads and/or the weekly privacy report (depending on which feature is currently enabled) will no longer function without notifications enabled.
  • Show the option to ignore or enable notifications.
  • On tap of enable notifications option: show notifications permission modal.
  • On tap of ignore: keep notifications disabled. Do not show the launch message again.
Brave Settings: Notifications Android System Settings: Notifications
Main Menu -> Settings -> Notifications Settings App -> Notifications -> Included Apps
Image Image

Designs

Figma: https://www.figma.com/file/sdVBBufbl2A11hAgPNfyqG/Android-13-Notifications

@kjozwiak
Copy link
Member

kjozwiak commented Dec 1, 2022

Verification PASSED on Samsung Galaxy S10+ running Android 13 using the following build(s):

Brave | 1.46.133 Chromium: 108.0.5359.71 (Official Build) (32-bit)
--- | ---
Revision | 1e0e3868ee06e91ad636a874420e3ca3ae3756ac-refs/branch-heads/5359@{#1016}
OS | Android 13; Build/T1B3.221003.008

Reward Test Cases

  • ensure that the user can opt-in into rewards without any issues if they enabled OS notifications during onboarding
  • ensured that the Allow Brave to send you notification OS modal appears if Not now was selected while onboarding
  • ensured that the user receives a Enable notifications from Brave to earn Brave Rewards if OS notifications have been disabled
  • ensured that the user receives a You're not earning Rewards warning if you've disabled OS notifications but have rewards enabled with Settings -> Brave Rewards -> Show Ads when Brave is not in use enabled
  • also ensured that the modals only appear once via Enable notifications message on Android 13 should only be shown once  #26930 (comment)

Example video of the feature working --> https://youtu.be/SqNVWJfbXJA

Also created #27002 as a follow up.

Example Example Example Example Example
Screenshot_20221201-164606 Screenshot_20221201-164609 Screenshot_20221201-163919 Screenshot_20221201-162948 Screenshot_20221201-164655

Privacy Report Test Cases

  • ensured that there's a Turn on notifications button under the Privacy Report modal if the user disabled OS notifications before enabling Privacy Report via onboarding
    • ensured that tapping on Turn on notifications opened the Allow Brave to send you notification OS modal
    • ensured that tapping Allow enables OS notifications
    • ensured that Start browsing to see privacy report text once the OS notifications have been enabled
  • ensured that the user receives a You're not receiving Privacy Reports modal if they've disabled OS notifications but Privacy Report has already been enabled
  • also ensured that the modals only appear once via Enable notifications message on Android 13 should only be shown once  #26930 (comment)
Example Example Example Example Example Example
Screenshot_20221201-164606 Screenshot_20221201-164609 Screenshot_20221201-165614 Screenshot_20221201-165620 Screenshot_20221201-165625 Screenshot_20221201-165651

Example video of the feature working --> https://youtube.com/shorts/niVE7t-iVrw

Privacy Report & Reward Test Cases

Example Example Example
Screenshot_20221201-164606 Screenshot_20221201-164609 Screenshot_20221201-174655

Example video of the feature working --> https://youtu.be/OB_fm_Wcfdw


Verification PASSED on Samsung Galaxy Tab S8 Ultra running Android 13 using the following build(s):

Brave | 1.46.133 Chromium: 108.0.5359.71 (Official Build) (32-bit)
--- | ---
Revision | 1e0e3868ee06e91ad636a874420e3ca3ae3756ac-refs/branch-heads/5359@{#1016}
OS | Android 13; Build/TP1A.220624.014

Reward Test Cases

  • ensure that the user can opt-in into rewards without any issues if they enabled OS notifications during onboarding
  • ensured that the Allow Brave to send you notification OS modal appears if Not now was selected while onboarding
  • ensured that the user receives a Enable notifications from Brave to earn Brave Rewards if OS notifications have been disabled
  • ensured that the user receives a You're not earning Rewards warning if you've disabled OS notifications but have rewards enabled with Settings -> Brave Rewards -> Show Ads when Brave is not in use enabled
  • also ensured that the modals only appear once via Enable notifications message on Android 13 should only be shown once  #26930 (comment)

Example video of the feature working --> https://youtu.be/91lEU77PbKQ

Also created #27002 as a follow up.

Example Example Example Example Example
Screenshot_20221201_180341_Brave Screenshot_20221201_180348_Permission controller Screenshot_20221201_180411_Brave Screenshot_20221201_180628_Permission controller Screenshot_20221201_180701_Brave

Privacy Report Test Cases

  • ensured that there's a Turn on notifications button under the Privacy Report modal if the user disabled OS notifications before enabling Privacy Report via onboarding
    • ensured that tapping on Turn on notifications opened the Allow Brave to send you notification OS modal
    • ensured that tapping Allow enables OS notifications
    • ensured that Start browsing to see privacy report text once the OS notifications have been enabled
  • ensured that the user receives a You're not receiving Privacy Reports modal if they've disabled OS notifications but Privacy Report has already been enabled
  • also ensured that the modals only appear once via Enable notifications message on Android 13 should only be shown once  #26930 (comment)
Example Example Example Example Example Example
Screenshot_20221201_180341_Brave Screenshot_20221201_180348_Permission controller Screenshot_20221201_181546_Brave Screenshot_20221201_181552_Permission controller Screenshot_20221201_181557_Brave Screenshot_20221201_181613_Brave

Example video of the feature working --> https://youtube.com/shorts/aGKhwuvN-FM

Privacy Report & Reward Test Cases

Example Example Example
Screenshot_20221201_180341_Brave Screenshot_20221201_180348_Permission controller Screenshot_20221201_182309_Brave

Example video of the feature working --> https://youtube.com/shorts/3ayMzcbh-Ng


Verification PASSED on Samsung Galaxy S10+ running Android 12 using the following build(s):

Brave | 1.46.133 Chromium: 108.0.5359.71 (Official Build) (32-bit)
--- | ---
Revision | 1e0e3868ee06e91ad636a874420e3ca3ae3756ac-refs/branch-heads/5359@{#1016}
OS | Android 12; Build/SP1A.210812.016

No OS notification onboarding Test Cases

  • ensured that the OS notification onboarding introduced in Android 13 doesn't appear on Android 12 devices
  • ensured that the OS notifications are enabled by default on Android 12

Example video of the feature working --> https://youtube.com/shorts/Xq8DRgYp1XU

Reward Test Cases

  • ensure that the user can opt-in into rewards without any issues (OS notifications should be enabled by default)
  • ensured that the user receives a Enable notifications from Brave to earn Brave Rewards if OS notifications have been disabled
  • ensured that the user receives a You're not earning Rewards warning if you've disabled OS notifications but have rewards enabled with Settings -> Brave Rewards -> Show Ads when Brave is not in use enabled

Example video of the feature working --> https://youtu.be/dCDBY5Vz6_E

Example Example Example
Screenshot_20221201-184354_Brave Screenshot_20221201-184439_Brave Screenshot_20221201-184543_Brave

Privacy Report Test Cases

  • ensured that there's a Turn on notifications button under the Privacy Report modal if the user disabled OS notifications before enabling Privacy Report via onboarding
    • ensured that tapping on Turn on notifications opened Notifications under Settings
    • ensured that Start browsing to see privacy report text once the OS notifications have been enabled
  • ensured that the user receives a You're not receiving Privacy Reports modal if they've disabled OS notifications but Privacy Report has already been enabled
Example Example Example Example Example
Screenshot_20221201-193444_Brave Screenshot_20221201-193450_Settings Screenshot_20221201-193455_Brave Screenshot_20221201-193508_Brave Screenshot_20221201-193513_Brave

Example video of the feature working --> https://youtube.com/shorts/1foDltqouDk

@kjozwiak
Copy link
Member

kjozwiak commented Dec 2, 2022

Ran into #27107 & #27108 while running through the above verification on Android 12.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

6 participants