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

Request permission before enabling Notify Me #3357

Conversation

mebarbosa
Copy link
Contributor

@mebarbosa mebarbosa commented Dec 12, 2024

Description

  • This is part of Don't show the notification permission request as the first screen #3350 whether we are removing the notification permission request from the first screen in order to request when is actual needed.
  • This PR, requests the notification permission when the user tries to enable the Notify me toggle from Notification screen.
  • Here, I am proposing to disable the Notify Me toggle when the user had this one previous enabled, but removed the notification permission after that because does not make sense to let the user with the Notify me enabled when this one removed the notification permission

Fixes: #3358

Testing Instructions

Android 15 - Notification ON

  1. Have a fresh install
  2. Go to Profile -> Settings -> Notification
  3. Enable Notify me toggle
  4. ✅ Ensure you see the notification request permission
  5. Allow it
  6. ✅ Have Notify me toggle enabled
notification.on.webm

Android 15 - Notification OFF

  1. Have a fresh install
  2. Go to Profile -> Settings -> Notification
  3. Enable Notify me toggle
  4. ✅ Ensure you see the notification request permission
  5. Do not allow it
  6. ✅ Have Notify me toggle disabled
  7. Tap to enable this toggle again
  8. ✅ See the snackbar message about having blocked notifications
notification.off.webm

Android 15 - Notification ON and then remove permission

  1. Have a fresh install
  2. Go to Profile -> Settings -> Notification
  3. Enable Notify me toggle
  4. Go to system notification management and remove Pocket Casts App notification permission
  5. Go back to Notification screen
  6. ✅ Ensure you have Notify me disabled

Android 11

  • Smoke test: You should be able to enable and disable the toggle

Checklist

  • If this is a user-facing change, I have added an entry in CHANGELOG.md
  • Ensure the linter passes (./gradlew spotlessApply to automatically apply formatting/linting)
  • I have considered whether it makes sense to add tests for my changes
  • All strings that need to be localized are in modules/services/localization/src/main/res/values/strings.xml
  • Any jetpack compose components I added or changed are covered by compose previews
  • I have updated (or requested that someone edit) the spreadsheet to reflect any new or changed analytics.

@mebarbosa mebarbosa added [Type] Enhancement Improve an existing feature. [Area] Notification labels Dec 12, 2024
@mebarbosa mebarbosa added this to the 7.80 milestone Dec 12, 2024
@mebarbosa mebarbosa requested a review from a team as a code owner December 12, 2024 12:47
@mebarbosa mebarbosa requested review from MiSikora and removed request for a team December 12, 2024 12:47
@wpmobilebot
Copy link
Collaborator

wpmobilebot commented Dec 12, 2024

📲 You can test the changes from this Pull Request in 📱 Mobile by scanning the QR code below to install the corresponding build.
App Name 📱 Mobile
Build TypedebugProd
Commit51d58f7
Direct Downloadpocketcasts-app-prototype-build-pr3357-51d58f7.apk
📲 You can test the changes from this Pull Request in 🚗 Automotive by scanning the QR code below to install the corresponding build.
App Name 🚗 Automotive
Build TypedebugProd
Commit51d58f7
Direct Downloadpocketcasts-automotive-prototype-build-pr3357-51d58f7.apk
📲 You can test the changes from this Pull Request in ⌚ Wear by scanning the QR code below to install the corresponding build.
App Name ⌚ Wear
Build TypedebugProd
Commit51d58f7
Direct Downloadpocketcasts-wear-prototype-build-pr3357-51d58f7.apk

@mebarbosa mebarbosa merged commit cb605f4 into task/update-notification-permission-request Dec 13, 2024
17 of 19 checks passed
@mebarbosa mebarbosa deleted the task/request-notification-permission-when-toggle-notify-me branch December 13, 2024 12:10
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
[Area] Notification [Type] Enhancement Improve an existing feature.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[Notification Permission Request] Request permission before enabling Notify Me
3 participants