-
Notifications
You must be signed in to change notification settings - Fork 226
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
Don't show the notification permission request as the first screen #3350
Don't show the notification permission request as the first screen #3350
Conversation
📲 You can test the changes from this Pull Request in 📱 Mobile by scanning the QR code below to install the corresponding build.
📲 You can test the changes from this Pull Request in 🚗 Automotive by scanning the QR code below to install the corresponding build.
📲 You can test the changes from this Pull Request in ⌚ Wear by scanning the QR code below to install the corresponding build.
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think this doesn't cover everything. Right now, for example, I can do the following:
1.Follow a podcast.
2. Go to the Profile tab.
3. Go to the Settings.
4. Go to the Notifications.
5. Enable Notify me
.
The app will show as if notifications are enabled but the permission still isn't granted.
onPermissionGranted: () -> Unit = {}, | ||
onPermissionHandlingNotRequired: () -> Unit = {}, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Do you ever anticipate to these two callbacks do different things? I think for a user perspective it doesn't matter whether if they granted the permission or if it was already granted by default.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Originally I put just one callback, the onPermissionGranted one. But I noticed that in MainActivity we were not doing anything for the case we don't need to require permission when call checkForNotificationPermission
, so I decided to do this to avoid any potential issue
@MiSikora I am preparing another PR to handle this other Notification screen scenario |
Before I review, could you clarify the plan here? Are you planning to go screen by screen and then merge everything into one PR to I’m not opposed to this approach, but I’d like to understand the scope and effort involved. There are other scenarios beyond the one I mentioned in this review that might need consideration. For example, navigating to a podcast, accessing its settings, and toggling the Notifications switch should also trigger the notifications permission. There may be additional scenarios as well, so I think it would be helpful to outline them before starting the work. This would allow us to get a rough estimate of the effort involved. Right now there is only a mention of the |
@MiSikora My plan is to split this into different PRs to make testing easier. While working on this, I found the tests a bit annoying because I had to account for different Android versions and scenarios, such as granting or not granting permissions. And that was just one scenario. I imagine that having more scenarios could make it even harder for testing. I followed your suggestion I created subtask for the parent and I updated with a comment: #2698 (comment) |
Description
Warm before using data
notification in another PRFixes #3360
Testing Instructions
Android 15 - Notification ON
Android 15 - Notification OFF
Android 11
Screenshots or Screencast
Android 15 - Notification On
android.15.notification.on.webm
Android 15 - Notification Off
android.15.notification.off.webm
Android 11
android.11.webm
Checklist
./gradlew spotlessApply
to automatically apply formatting/linting)I have considered whether it makes sense to add tests for my changesmodules/services/localization/src/main/res/values/strings.xml
Any jetpack compose components I added or changed are covered by compose previewsI have updated (or requested that someone edit) the spreadsheet to reflect any new or changed analytics.I have tested any UI changes...
with different themeswith a landscape orientationwith the device set to have a large display and font sizefor accessibility with TalkBack