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
470
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
62
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
160
Maintaining Software Correctness
dlew
4
1.1k
Grokking Coroutines (MinneBar)
dlew
5
710
ClimateChangeTech.pdf
dlew
0
170
What Tech Can Do About Climate Change
dlew
0
700
Grokking Coroutines
dlew
5
1.4k
Other Decks in Programming
See All in Programming
ルールを書いて終わらせないハーネスエンジニアリング
yug1224
4
1.8k
言葉の格闘技のススメ~紙とペンと言葉から始める、キャリアの描き方~
progresscicada
2
130
型も通る、synthも通る、それでも危ない 〜AIのCDKの権限とコストを機械で検証する〜 / It Passes Type Checks, It Passes Synth Checks, but It’s Still Risky — Automatically Verifying Permissions and Costs in AI’s CDK —
seike460
PRO
1
530
PostgreSQL 18で考えるUUID主キー
kazuhiro1982
0
460
Foundation Models frameworkで画像分析
ryodeveloper
1
570
複数の Claude Code が"放置"されてしまう問題をCLI ダッシュボードを自作して解決した話
sumihiro3
1
660
変わらないものが、変わるものを決める — 意図駆動開発 × イベントソーシング × イミュータブル | What Doesn't Change Decides What Can — IDD × Event Sourcing × Immutability
tomohisa
0
1.3k
Terraform標準の組織で AWS CDKをどう使うか
mu7889yoon
1
480
GDG Korea Android: 2026 I/O Extended ~ What's new in Android development tools
pluu
0
210
Laravelで学ぶ Webアプリケーションチューニング入門/web_application_tuning_101
hanhan1978
4
1.7k
メールのエイリアス機能を履き違えない
isshinfunada
0
220
komatsuna「分散システムにおけるバグ分析手法」
komatsunaqa
0
240
Featured
See All Featured
16th Malabo Montpellier Forum Presentation
akademiya2063
PRO
0
330
AI Search: Where Are We & What Can We Do About It?
aleyda
0
7.8k
The Straight Up "How To Draw Better" Workshop
denniskardys
239
140k
What Being in a Rock Band Can Teach Us About Real World SEO
427marketing
0
1.1k
brightonSEO & MeasureFest 2025 - Christian Goodrich - Winning strategies for Black Friday CRO & PPC
cargoodrich
3
760
The Success of Rails: Ensuring Growth for the Next 100 Years
eileencodes
47
8.3k
Navigating Weather and Climate Data
rabernat
0
450
The agentic SEO stack - context over prompts
schlessera
0
860
Digital Projects Gone Horribly Wrong (And the UX Pros Who Still Save the Day) - Dean Schuster
uxyall
1
2.3k
Unlocking the hidden potential of vector embeddings in international SEO
frankvandijk
0
890
[RailsConf 2023 Opening Keynote] The Magic of Rails
eileencodes
31
10k
The Limits of Empathy - UXLibs8
cassininazir
1
590
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