Notify Them Right: Notification Channels, Permissions, Push with Firebase Cloud Messaging, Glance Widgets and App Shortcuts for Android Apps
Notify Them Right is a practical guide to every way an Android app reaches people outside its own screens: notifications, reminders at a set time, push from your own server, foreground service notifications, home-screen widgets and launcher shortcuts. It treats each one as a contract with the user (useful, expected, controllable) and starts from the permission reality since Android 13, where a new install's notifications are off until the user says yes. You create notification channels the user can control, build notifications with NotificationCompat and PendingIntents that are immutable, distinct and trampoline-free, ask for POST_NOTIFICATIONS at the moment it makes sense with rememberLauncherForActivityResult and an honest rationale, and send blocked users to the right settings page. You add BigText, BigPicture, Inbox and Messaging styles, action buttons, direct reply with RemoteInput, progress, groups with summaries and lock-screen versions, and learn why full-screen intents are now for calling and alarm apps only. You schedule reminders with AlarmManager that fire on time with SCHEDULE_EXACT_ALARM, close to on time without it, during Doze and again after a reboot, and keep deferrable work in WorkManager. You set up Firebase Cloud Messaging with the BoM, register with Firebase Installation IDs, send data messages through the HTTP v1 API from a small Python sender on a homelab box with a service account, and keep registrations clean. Then you run foreground work honestly (types, permissions, the Android 15 dataSync limit), build a Jetpack Glance widget with responsive sizes and generated previews, add static, dynamic and pinned app shortcuts, and test it all with adb, a version matrix and a weekly notification budget. Everything is applied to a small notes app, Field Notes, as one notification layer. Every library version, API level and default was checked against the official Android Developers and Firebase documentation and Google's Maven repository and PyPI in November 2026. No prices, anecdotes or unsourced numbers.
What you get
- Before We Start: notifications as a contract (useful, expected, controllable), the permission reality since Android 13, and the four ways Field Notes reaches its users
- Notification basics: anatomy, channels and importance (created once, owned by the user), NotificationCompat.Builder, PendingIntent flags and trampolines, IDs, updates and cancelling, lock-screen visibility
- Asking for permission the right way: POST_NOTIFICATIONS on Android 13+, when to ask, the four permission states, rememberLauncherForActivityResult in Compose, the rationale, channel settings links and areNotificationsEnabled
- Rich notifications: BigText, BigPicture, Inbox and Messaging styles, action buttons, direct reply with RemoteInput, progress, Android 16 progress-centric notifications, groups and summaries, full-screen intent limits
- Scheduling reminders: inexact vs exact alarms, SCHEDULE_EXACT_ALARM vs USE_EXACT_ALARM, canScheduleExactAlarms, rescheduling after reboot and time changes, Doze, and WorkManager for everything that can wait
- Push with Firebase Cloud Messaging: the BoM, FirebaseMessagingService, installation IDs and onRegistered, notification vs data messages, priority, topics, the HTTP v1 API with a service account, a Python sender on a homelab box, registration hygiene
- Foreground services: the bargain, types and permissions since Android 14, a WorkManager foreground worker, a hand-written service, the Android 15 time limit and onTimeout, and what users see when notifications are denied
- Home-screen widgets with Jetpack Glance: GlanceAppWidget and provideGlance, the receiver and metadata, size modes, actions, updateAll, update paths and generated previews
- App shortcuts: static shortcuts.xml, dynamic and pinned shortcuts with ShortcutManagerCompat, deep links, disabling deleted targets and rate limits
- Testing: adb shell cmd notification, permission resets, forcing Doze, testing push without your server, Robolectric tests, an API-level matrix, measuring opt-outs, a weekly budget and a release routine
- Putting it together: the Field Notes :core:notify module, one set of deep links, the event flow and the settings screen, plus a notification checklist and a cheat sheet
75 pages, 24 diagrams plus a chapter-opener graphic for every chapter, a notification checklist and a cheat sheet. PDF and EPUB. Android the Right Way, Book 10.
Not sure yet? Read the free sample first: the cover, the full table of contents and all of Chapter 2, "Asking for Permission the Right Way" (what changed in Android 13, declaring the permission, when to ask, the four permission states and how to detect them, a reusable Compose permission gate with rememberLauncherForActivityResult, writing the rationale, what to do when the answer is no, sending users to app and channel settings, reading the real state on resume, and adb commands for testing each path), at https://payhip.com/b/NnqQE
Also in a bundle: Everything Bundle: every ebook in the store, $89 ยท Android Bundle, $49.