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
Daniel Lew
September 05, 2017
Programming
480
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
66
How to Use Computers (Privately!)
dlew
0
120
Finding Meaningful, Mission-Driven Work
dlew
0
210
Things Maybe You Don't Know as a Newer Developer
dlew
1
160
Maintaining Software Correctness
dlew
4
1.1k
Grokking Coroutines (MinneBar)
dlew
5
710
ClimateChangeTech.pdf
dlew
0
180
What Tech Can Do About Climate Change
dlew
0
700
Grokking Coroutines
dlew
5
1.4k
Other Decks in Programming
See All in Programming
生成AIで帳票OCRが「簡単に」作れる時代になった?
kon_shou
0
1.2k
源内ハンズオン概要編
hideg
0
230
属人化した知識を、 AIが辿れる地図にする
pkshadeck
PRO
1
220
iOS開発×AI駆動開発 〜最近使って便利だったスキルの話〜
nogu66
0
110
Pythonの実行はどこまで賢くなったのか? CPythonとPyPyから見る最適化のしくみ
curekoshimizu
4
2.3k
Introducing Stack Pull Request in GitHub
kkamegawa
0
110
信頼性の目標を誰も求めてない
shubox
0
400
Japan Community Day at Kubecon + CloudNativeCon Japan 2026: Learning Container Privilege Control by Building My Own Low-Level Container Runtime
ternbusty
1
180
AIに既存システムを理解させる技術 ~レガシーを見捨てないハーネスエンジニアリング入門~
ochtum
0
170
関東Kaggler会_NVIDIA_Nemotron_コンペ_振り返り
rick_ds
0
740
Go を使い始めて 2 ヶ月の学び / My first two months with Go
contour_gara
0
400
Discordを用いたラボオートメーション関連情報収集の自動化
noguhiro2002
0
470
Featured
See All Featured
The Limits of Empathy - UXLibs8
cassininazir
1
620
Lessons Learnt from Crawling 1000+ Websites
charlesmeaden
PRO
1
1.6k
Designing for Timeless Needs
cassininazir
1
460
Digital Ethics as a Driver of Design Innovation
axbom
PRO
1
390
Designing Experiences People Love
moore
143
24k
[Rails World 2023 - Day 1 Closing Keynote] - The Magic of Rails
eileencodes
38
3k
The Anti-SEO Checklist Checklist. Pubcon Cyber Week
ryanjones
0
220
Tips & Tricks on How to Get Your First Job In Tech
honzajavorek
1
710
Evolving SEO for Evolving Search Engines
ryanjones
0
270
Pawsitive SEO: Lessons from My Dog (and Many Mistakes) on Thriving as a Consultant in the Age of AI
davidcarrasco
0
230
Taking LLMs out of the black box: A practical guide to human-in-the-loop distillation
inesmontani
PRO
3
2.4k
Learning to Love Humans: Emotional Interface Design
aarron
275
41k
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