-
- Overview
- Pre-Android O, developers used priority levels to decide how to show a notification. Depending on how important the notification was felt to be, it could be set to peek, make a sound, both, or just be placed in the tray for the user to see next time they looked there.
- Android-O introduces notification channels to offer greater control over notifications. Specific channels for notifications can be created with their own specific notification settings, and notifications delivered through these channels.
- This provides the ability to group notifications our application sends into manageable groups
-
- Implications of changes
- Changes needed only if we target Android-O
- If we don’t target Android O, our apps behave the same as they do on Android 7.0 when running on Android O devices.
- Benefits & if we do target Android O
- greater control over notifications
- can create a notification channel for each distinct type of notification we need to send.
- can create notification channels to reflect choices made by users of your app.
- Android O deprecates the ability to set the priority levels of individual notifications.
- Instead, you can now set a recommended importance level when creating a notification channel.
- You can configure a channel with one of five importance levels that configure the amount a channel can interrupt a user, ranging from IMPORTANCE_NONE(0) to IMPORTANCE_HIGH(4)
- default importance level is 3 which displays everywhere, makes noise, but doesn't visually intrude on the user
- decision needed as to default notification level
- Part of a larger initiative to allow users greater control over the notifications their app delivers
- Once set up, we as developers no longer have input into their functionality , however the the user can however manage these channels and their settings
- On older versions of Android (pre-O) these new features will be completely ignored, so we don’t have to worry about current implementations breaking
|
|