The Silent Killer: OEM Aggressive Battery Optimizers

On stock Android, Firebase Cloud Messaging (FCM) delivers notifications within milliseconds. However, custom skins (MIUI, ColorOS, FunTouch OS) aggressively kill background processes to conserve battery, causing critical notifications to arrive hours late.

Ensuring 99% Notification Delivery

  • High Priority Payload Headers: Always set priority: "high" in FCM message data to instruct the OS to wake the radio processor immediately.
  • Data-Only Notifications vs Display Messages: Use data payloads so your app's background isolate intercepts and constructs the notification locally using local notification channels.
  • Auto-Start Permissions Guidance: Present a friendly onboarding screen prompting users to whitelist your app in their phone's "Auto-Start" and "Battery Optimization" settings.