Upgrade to Pro
— share decks privately, control downloads, hide ads and more …
Speaker Deck
Sign up for free
Menu
Search
Features
All features
Private URLs
Password Protection
Custom URLS
Scheduled publishing
Remove Branding
Restrict embedding
Deck Collections
Notes
Features
All features
Private URLs
Password Protection
Custom URLS
Scheduled publishing
Remove Branding
Restrict embedding
Deck Collections
Notes
Explore
Featured decks
Featured speakers
Programming
Technology
Storyboards
Explore
Featured decks
Featured speakers
Programming
Technology
Storyboards
Pricing
Search
Sign in
Sign up for free
Android Notification Channels: The Complicated ...
Search
Sponsored
·
Ship Features Fearlessly
Turn features on and off without deploys. Used by thousands of Ruby developers.
→
Daniel Lew
September 05, 2017
Programming
520
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
Transcript
45 slides
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
More Decks by Daniel Lew
See All by Daniel Lew
What the fuck are passkeys and why are they everywhere now?
dlew
1
87
How to Use Computers (Privately!)
dlew
0
130
Finding Meaningful, Mission-Driven Work
dlew
0
230
Things Maybe You Don't Know as a Newer Developer
dlew
1
180
Maintaining Software Correctness
dlew
4
1.1k
Grokking Coroutines (MinneBar)
dlew
5
740
ClimateChangeTech.pdf
dlew
0
190
What Tech Can Do About Climate Change
dlew
0
730
Grokking Coroutines
dlew
5
1.4k
Other Decks in Programming
See All in Programming
Beyond Chatbots: Agentic UI with Open Standards @W-JAX 2026, München
manfredsteyer
PRO
0
120
[Kotlin Fest 2026] eBPF Tracing for Kotlin
takehaya
1
390
まずはコードより業務と向き合う:テーブル解体のためにPdMを呼んだ話
sakawe_ee
0
260
LLM 101
dalinaum
0
520
flutter_test のその先へ — Flutter アプリの LLM 機能に「評価」という品質保証を
kosukesaigusa
0
210
手の動かし方がわからなかった私が個人開発者になるまで
usagi0920_pochi
0
320
Vue.jsで作る空間解析アプリとCapacitorプラグインのData Bridge
hal_spidernight
1
180
DroidKnights 2026 Android A2UI Jetpack Compose 기반의 안전한 AI UI 렌더링 - 박제창
itsmedreamwalker
1
260
私なりのハーネスエンジニアリング ~独自の言語処理系の開発を通して~
seosoft
0
230
Claude Codeのおかげでやりたいことがやれるようになったんだよォー!
sms_tech
0
170
Python Lambdaにおけるテストしやすい設計とAI支援の活用 / Designing Testable Python Lambda Functions with AI
kitano_yuichi
1
340
動画プレイヤーはなぜカクつくのか 〜Flutterのレンダリングとネイティブの境界を解剖する〜
naruogram
0
340
Featured
See All Featured
Chrome DevTools: State of the Union 2024 - Debugging React & Beyond
addyosmani
10
1.4k
We Have a Design System, Now What?
morganepeng
55
8.4k
Statistics for Hackers
jakevdp
799
230k
実際に使うSQLの書き方 徹底解説 / pgcon21j-tutorial
soudai
PRO
203
77k
The #1 spot is gone: here's how to win anyway
tamaranovitovic
4
1.2k
Introduction to Domain-Driven Design and Collaborative software design
baasie
1
1.1k
Impact Scores and Hybrid Strategies: The future of link building
tamaranovitovic
0
490
jQuery: Nuts, Bolts and Bling
dougneiner
66
8.7k
AI Search: Implications for SEO and How to Move Forward - #ShenzhenSEOConference
aleyda
1
1.4k
How to Build an AI Search Optimization Roadmap - Criteria and Steps to Take #SEOIRL
aleyda
1
2.3k
Performance Is Good for Brains [We Love Speed 2024]
tammyeverts
12
2k
Intergalactic Javascript Robots from Outer Space
tanoku
273
28k