Skip to main content

Posts

Showing posts with the label Firebase

Fixing Firebase Push Notifications (FCM) Not Showing on MIUI Devices

  Engineering a reliable push notification architecture becomes complicated when Android OEMs implement aggressive, non-standard battery optimizations. If your Firebase Cloud Messaging (FCM) implementation works flawlessly on Pixel and Samsung devices but fails consistently on Xiaomi, Redmi, or POCO devices, you are encountering the MIUI background execution limit. This issue specifically manifests when an app is removed from the recent apps tray. FCM messages fail to wake the application, and system notifications do not display unless the user manually discovers and enables a hidden "Autostart" permission. Resolving this requires a hybrid approach: optimizing the backend payload structure to leverage Google Play Services, and implementing a robust programmatic routing mechanism in the Android client to guide users to the correct system settings. Understanding the Root Cause: MIUI vs. Standard Android To understand the MIUI notification fix, we must look at how FCM push notif...

Fixing FCM Push Notifications Not Delivering on OPPO & ColorOS Devices

  Developers frequently encounter a critical failure point when implementing push notifications on Android: messages deliver perfectly on Google Pixel and Samsung devices but fail silently on OPPO devices running ColorOS. This occurs specifically when the user swipes the application away from the recent apps list. For platforms relying on real-time alerts, this silent failure breaks user retention and invalidates metrics tracked by mobile engagement platforms. Resolving this requires moving beyond the standard Firebase documentation and addressing the specific aggressive power-management protocols engineered into ColorOS. The Root Cause: ColorOS Aggressive Battery Management To understand the Firebase Cloud Messaging fix, we must first look at how ColorOS handles background processes. Standard Android utilizes Doze mode and App Standby Buckets to manage battery life. When an FCM message with  priority="high"  arrives, Google Play Services temporarily wakes the app's proce...