Member-only story
Understanding AlarmManager, PendingIntent, BroadcastReceiver, and BootReceiver in Android
Android background execution is one of the most misunderstood parts of the platform, especially when alarms, notifications, and device reboot come into play.
Most tutorials show what code to write. Very few explain why that code works, what Android is doing internally, or why certain architectural rules are non-negotiable.
This article fills that gap.
We’ll walk through AlarmManager, PendingIntent, BroadcastReceiver, and BootReceiver using real, production-style code, explaining not just the syntax but the system behavior behind it.
This is not a copy of documentation.
It’s an experience-driven explanation based on how Android actually behaves in real apps.
The Core Problem Android Is Solving
Android applications do not run continuously.
The OS is designed to:
- Preserve battery
- Free memory aggressively
- Kill background processes at any time
Yet apps still need to:
- Show notifications at specific times
- Perform actions when the app is closed









![Day — 13: Offline-First & Sync Room + sync strategies [System Design]](https://webproxy.poorya-velaei-d67.workers.dev/https://miro.medium.com/v2/resize:fit:1358/format:webp/1*fOpCEKQ1zjFF32Yq5Sg-Zg.png)

