Development mode — payments are simulated and emails go to the Dev Mailbox · Payment simulator
DDSP
Cover Android Background Work and System Integration — page spread 1 Android Background Work and System Integration — page spread 2 Android Background Work and System Integration — page spread 3 Android Background Work and System Integration — page spread 4 Android Background Work and System Integration — page spread 5 Android Background Work and System Integration — page spread 6 Android Background Work and System Integration — page spread 7 Android Background Work and System Integration — sample page Android Background Work and System Integration — sample page Android Background Work and System Integration — sample page

Build Android features that keep working when your app is not on screen: how Android ranks and kills processes, background execution limits from Android 8 to Android 16, Doze and App Standby Buckets, WorkManager (constraints, retries, unique, periodic, chained, expedited, and long-running work)…

WorkManager, Foreground Services, Notifications, Location, Alarms, and Working with the Platform's Rules

Read before you buy: the PDF here is a free sample — the first 20 pages of the 418-page book (payments, sales and reviews on this demo site are sample data). Get the full e-book at thenexbooks on Gumroad.

Stop fighting the platform. Build background features that survive Doze, process death, reboots, and every Android version you support.

Every Android developer eventually ships something that works on their own phone and fails quietly in the field: uploads that never finish, reminders that arrive late, location tracking that stops when the screen turns off, notifications that never appear. The code is rarely "wrong" — it ignores the rules Android enforces on work that happens when the user is not looking. Those rules protect battery life and privacy, and they change with almost every release.

This book teaches you to work with those rules. You start with how Android decides what lives and what dies, learn the limits version by version, and then build a complete background layer for one realistic app — with tests that run on your computer, no emulator required.

What's inside

  • Processes, priorities, and lifecycles: why threads and GlobalScope are not background work, and what process death really means
  • Background execution limits from Android 8 to Android 16, explained with "what changes for my app" tables
  • Doze, App Standby Buckets, Battery Saver, and background restrictions — and how to design so they don't matter
  • A decision guide for choosing between coroutines, WorkManager, foreground services, alarms, receivers, or doing nothing
  • WorkManager in depth: workers and results, constraints, backoff and retries, unique and periodic work, chains, expedited work, progress, and setForeground
  • Offline-first sync with Room and Hilt-injected workers that retry safely and give up gracefully
  • Foreground services today: service types, type permissions, the Android 14+ requirements, and starting only when the platform allows it
  • Location done right: precise vs. approximate, one-time grants, why most apps never need background location, and the Fused Location Provider
  • A complete trip-recording foreground service with live distance, pause and stop actions, a safety alert, battery-aware settings, and recovery after process death
  • Notifications users keep enabled: channels, the Android 13 permission, actions, progress, groups, and deep links from a tap
  • Alarms and the exact-alarm rules, plus broadcast receivers that reschedule everything after a reboot
  • System integration: intents and activity results, the share sheet and FileProvider, deep links and Android App Links, static, dynamic, and pinned shortcuts, and Glance widgets
  • Testing and debugging: work-testing, Robolectric, Hilt testing, adb and dumpsys, Doze and standby simulation, and the Background Task Inspector
  • Google Play policies and platform changes: what to check before you raise targetSdk

One running example, start to finish. You build the background layer of Waypoint, a fictional hiking trip planner and tracker from the small product studio Northbeam Labs. Waypoint records hikes in a location foreground service, syncs trips and GPS tracks with WorkManager when the hiker is back in coverage, reminds the party the evening before a trip, checks in after three hours of moving, shares finished hikes, opens from links, shortcuts, and a home-screen widget — and every piece is covered by tests. The sample data is small enough to verify by hand, down to the 570-meter sample track.

Current and honest. Examples use Kotlin 2.4, Jetpack Compose, WorkManager 2.12, Hilt, Room, Google Play services location, and Glance, compiling against API level 37 and targeting Android 16, with minSdk 26. Version-specific behavior is labeled with the Android version and target level it applies to, and anything that can only be observed on a device is clearly marked as sample output. The book contains no invented benchmarks or battery statistics. Every chapter includes complete Kotlin code, Tips, Notes, Warnings, "Try It Yourself" exercises, and Key Takeaways, and the appendices give you a cheat sheet, templates and reference code, a production checklist, and a glossary.

Format: PDF, 418 pages (A4), linked table of contents and bookmarks. English. First Edition, 2026. Published by thenexbooks. Includes the Waypoint starter project (Gradle, Kotlin) used throughout the book. Requires JDK 21 and the Android SDK (Android Studio recommended) to build the code. This book is independent and is not affiliated with, sponsored by, or endorsed by Google LLC or JetBrains. Android is a trademark of Google LLC.

Table of Contents

Part I — How Android Runs Your App

  • Ch 1 · Meet Waypoint: The Background Problems a Hiking App Must Solve
  • Ch 2 · Processes, Priorities, and Lifecycles: How Android Decides What Lives
  • Ch 3 · Background Execution Limits from Android 8 to Android 16
  • Ch 4 · Doze, App Standby Buckets, and Battery Restrictions
  • Ch 5 · Choosing the Right Tool: WorkManager, Foreground Services, Alarms, or Nothing

Part II — WorkManager

  • Ch 6 · WorkManager Fundamentals: Workers, Requests, and Results
  • Ch 7 · Constraints, Backoff, and Retries
  • Ch 8 · Unique Work, Periodic Work, and Chains
  • Ch 9 · Expedited and Long-Running Work: Progress and setForeground
  • Ch 10 · Offline-First Sync with Hilt Workers

Part III — Foreground Services and Location

  • Ch 11 · Foreground Services Today: Types, Permissions, and the Android 14+ Rules
  • Ch 12 · Location Permissions: Precise, Approximate, and Background
  • Ch 13 · The Fused Location Provider: Requests, Accuracy, and Updates
  • Ch 14 · Building TripRecordingService: Recording a Hike End to End
  • Ch 15 · Battery-Aware Recording and Surviving Process Death

Part IV — Notifications and Alarms

  • Ch 16 · Notification Channels and the Android 13 Permission
  • Ch 17 · Rich Notifications: Actions, Progress, Groups, and Tapping Through
  • Ch 18 · Alarms: Inexact, Exact, and the Exact Alarm Restrictions
  • Ch 19 · Broadcast Receivers: Boot, System Events, and Your Own

Part V — Integrating with the System

  • Ch 20 · Intents and Activity Results: Talking to Other Apps
  • Ch 21 · Sharing: The Share Sheet, FileProvider, and Receiving Shares
  • Ch 22 · Deep Links and Android App Links
  • Ch 23 · App Shortcuts: Static, Dynamic, and Pinned
  • Ch 24 · Home-Screen Widgets with Glance

Part VI — Testing, Debugging, and Shipping

  • Ch 25 · Testing Background Work: Workers, Services, Receivers, and Notifications
  • Ch 26 · Debugging Background Work: adb, dumpsys, and the Background Task Inspector
  • Ch 27 · Play Policies, Permissions, and Keeping Up with Platform Changes
  • Ch 28 · Case Study: Waypoint's Background Layer from Plan to Upload

Appendices
A · Background Work Cheat Sheet
B · Templates and Reference
C · Production Checklist
D · Glossary

Book details

Detail
Pages418
FormatPDF (A4) + Waypoint starter project (Gradle)
LanguageEnglish
LevelIntermediate
Edition1st Edition (2026)
Download on this siteFree sample, first 20 pages (PDF)
Publisherthenexbooks

Files you get

PDF
Android-Background-Work-and-System-Integration-Free-Sample.pdf
614.1 KB · version 1 · updated 7 Oct 2026

No reviews yet. Only buyers can review.

More from thenexbooks

Visit store
$9.00