Android Alarm Fired But App Did Nothing — Silent Bug Traced to Broadcast Hop

A developer building an Android app noticed that a scheduled alarm, set using AlarmManager with setExactAndAllowWhileIdle, consistently failed to trigger their agent after the phone sat idle for a while. System diagnostics confirmed the alarm fired correctly, yet the BroadcastReceiver responsible for starting the foreground service never executed — no error, no log, no notification. The root cause was traced to Android 14 with Samsung One UI, where a frozen background process could silently drop incoming broadcasts even after an exact alarm fired. The fix involved removing the BroadcastReceiver middleman entirely and pointing the alarm's PendingIntent directly at the foreground service using PendingIntent.getForegroundService(). This eliminated the silent failure point by making the service start itself the privileged wake action, with no secondary broadcast hop required.
This is an AI-generated summary. ShortSingh links to the original source for the complete article.

Discussion (0)
Log in to join the discussion and vote.
Log in