Upgrade to Pro
— share decks privately, control downloads, hide ads and more …
Speaker Deck
Features
Speaker Deck
PRO
Sign in
Sign up for free
Search
Search
Android Notification Channels: The Complicated ...
Search
Sponsored
·
Your Podcast. Everywhere. Effortlessly.
Share. Educate. Inspire. Entertain. You do you. We'll handle the rest.
→
Daniel Lew
September 05, 2017
Programming
460
1
Share
Embed
Copy iframe code
Copy JS code
Copy link
Start on current slide
Android Notification Channels: The Complicated Parts
Talk given to GDG Twin Cities.
Daniel Lew
September 05, 2017
More Decks by Daniel Lew
See All by Daniel Lew
What the fuck are passkeys and why are they everywhere now?
dlew
1
55
How to Use Computers (Privately!)
dlew
0
110
Finding Meaningful, Mission-Driven Work
dlew
0
210
Things Maybe You Don't Know as a Newer Developer
dlew
1
150
Maintaining Software Correctness
dlew
4
1.1k
Grokking Coroutines (MinneBar)
dlew
5
700
ClimateChangeTech.pdf
dlew
0
170
What Tech Can Do About Climate Change
dlew
0
690
Grokking Coroutines
dlew
5
1.4k
Other Decks in Programming
See All in Programming
AI 輔助遺留系統現代化的經驗分享
jame2408
1
1.2k
吝嗇家のためのAI活用 / AI development for miser - ChatGPT + Issue Driven Development
tooppoo
0
180
Creating Composable Callables in Contemporary C++
rollbear
0
200
1B+ /day規模のログを管理する技術
broadleaf
0
140
광주소프트웨어마이스터고등학교 DevFest 특강 - 바이브 코딩 시대에서 주니어 개발자로 살아남는 방법
utilforever
1
110
はてなアカウント基盤 State of the Union
cockscomb
1
1.3k
鹿野さんに聞く!『TypeScriptコードレシピ集』で磨く実践力
tonkotsuboy_com
4
1.1k
自作OSでスライド発表する
uyuki234
1
3.8k
初めてのKubernetes 本番運用でハマった話
oku053
0
120
AIを活用したE2Eテスト実装効率化のあゆみ / ebisu-mobile-14-kotetu
kotetuco
0
170
act1-costs.pdf
sumedhbala
0
210
Even G2とAWSで推しのエージェントを召喚しよう!
har1101
1
160
Featured
See All Featured
Bioeconomy Workshop: Dr. Julius Ecuru, Opportunities for a Bioeconomy in West Africa
akademiya2063
PRO
1
170
Heart Work Chapter 1 - Part 1
lfama
PRO
8
36k
The Art of Delivering Value - GDevCon NA Keynote
reverentgeek
16
2k
The Myth of the Modular Monolith - Day 2 Keynote - Rails World 2024
eileencodes
28
3.6k
GraphQLの誤解/rethinking-graphql
sonatard
75
12k
Utilizing Notion as your number one productivity tool
mfonobong
4
390
Connecting the Dots Between Site Speed, User Experience & Your Business [WebExpo 2025]
tammyeverts
11
970
DBのスキルで生き残る技術 - AI時代におけるテーブル設計の勘所
soudai
PRO
67
56k
A Modern Web Designer's Workflow
chriscoyier
698
190k
Facilitating Awesome Meetings
lara
57
7k
Mobile First: as difficult as doing things right
swwweet
225
10k
Information Architects: The Missing Link in Design Systems
soysaucechin
0
1k
Transcript
Android Notification Channels: The Complicated Parts Dan Lew
Goal • Inform users • …Without annoying them
Noises • Sound
Noises • Sound • Vibration
Noises • Sound • Vibration • Light
Noises v2 • Metadata • Priority • Categories • People
• Do not Disturb interruptions • Hiding on lock screen
Android Oreo • Notification badges on launcher • Channels
None
Channels give users control
User Control App Control Importance Sound Vibration Light Show on
lock screen Show badges on launcher Bypass "Do Not Disturb” Channel Name Channel Description
targetSdkVersion 26 == Channels
None
Measure Twice, Cut Once
How Many Channels?
Trello Channel Overview Important Minor Temporary Mentions New Cards Attachments
Due Soon Cards Boards Comments Memberships
Notification Groups
Importance IMPORTANCE_HIGH Make sound and pop on screen IMPORTANCE_DEFAULT Make
sound IMPORTANCE_LOW No sound IMPORTANCE_NONE No sound or visual interruption
Custom Noise • Sound • Vibration • Light
Bells and Whistles • Badges on launcher • Bypass “do
not disturb”
Playing Dirty • Can delete & recreate channels • Users
will know • Will annoy users
val channel = NotificationChannel("news", “News", NotificationManager.IMPORTANCE_DEFAULT) channel.description = "News and
weather" channel.setShowBadge(false) val manager = context.getSystemService(NotificationManager::class.java) manager.createNotificationChannel(channel)
val channel = NotificationChannel("news", “News", NotificationManager.IMPORTANCE_DEFAULT) channel.description = "News and
weather" channel.setShowBadge(false) val manager = context.getSystemService(NotificationManager::class.java) manager.createNotificationChannel(channel)
val notification = NotificationCompat.Builder(context, "news") .setThis() .setThat() .etc() .build()
Timing • Create channels at… • Startup • First notification
• Create all channels at once • Channel creation is idempotent
Inform users… ...WITHOUT annoying them
How to annoy users without really trying
Too Many Sounds
Too Many Rows
Notification Bundles 1-3 notifications 4+ notifications
Notification Bundles Pros Cons Easy Works across channels Many noises
Only on Nougat+
Notification Groups 1 notification 2+ notifications
Notification Groups
Notification Groups Pros Cons Few notifications Few noises Extra work
Notification Groups val summaryNotification = NotificationCompat.Builder(context, "news") ... .setGroupSummary(true) .setGroup("myGroup")
.setGroupAlertBehavior(NotificationCompat.GROUP_ALERT_SUMMARY) .build() val childNotification = NotificationCompat.Builder(context, "news") ... .setGroupSummary(false) .setGroup("myGroup") .setGroupAlertBehavior(NotificationCompat.GROUP_ALERT_SUMMARY) .build()
Channels Break Groups • One group fails when channel disabled
• Group-per-channel creates too many rows • Group-per-channel creates too many noises
Channel Dilemma Bundling Groups Fewer rows Many noises Many rows
Fewer noises
Channel Solution • Channel should either… • Have a group
summary • Be IMPORTANCE_LOW or lower
Trello’s Setup Name Importance Summary Launcher Badge? Mentions HIGH Yes
Yes Due Soon DEFAULT Yes Yes Boards LOW No Yes Cards LOW No Yes Comments LOW No Yes Memberships LOW No Yes New Cards LOW No Yes Attachments MIN No No
Odds and Ends
Remove Notification Settings
Remove Notification Settings Intent
Listen to ACTION_LOCALE_CHANGED
Use setAlertOnlyOnce()
Summary • Embrace channels • Choose good defaults • Don’t
annoy users
Thank You! • danlew.net • @danlew42