Android Background Alarm Issue on Infinix Zero 40 (Android 15 / XOS)


I'm developing an Islamic Azan (Prayer Time) application and I'm facing a device-specific background execution issue on Infinix Zero 40 (Android 15 / XOS).

The Problem

The app works perfectly on other devices (Samsung, Vivo, Oppo, Xiaomi, Pixel, etc.), but on my Infinix Zero 40 the scheduled Azan does not reliably play when the app is in the background.

Current Architecture

The app uses:

  • AlarmManager

  • Exact Alarms

  • BroadcastReceiver

  • Foreground Service

  • WakeLock

  • BootReceiver

  • Room Database

  • Offline Prayer Time Calculator

  • 365-day offline prayer schedule

Prayer times are generated offline and stored locally. The scheduler reads only from the Room database.

Permissions

The app includes:

  • SCHEDULE_EXACT_ALARM

  • USE_EXACT_ALARM

  • WAKE_LOCK

  • RECEIVE_BOOT_COMPLETED

  • FOREGROUND_SERVICE

  • FOREGROUND_SERVICE_MEDIA_PLAYBACK

Battery optimization is disabled for the app.

Strange Behavior

When the app is opened, everything works correctly.

Sometimes, after minimizing the app, an Alarm Clock icon appears in the status bar and the scheduled Azan works.

However, after some time the Alarm Clock icon disappears automatically, and the scheduled Azan no longer plays.

Very Important Observation

If a WhatsApp message, Gmail notification, or another high-priority notification arrives around the prayer time, the Azan suddenly starts playing immediately.

This makes me believe that:

  • the alarm may already be scheduled,

  • but the application process is somehow frozen or delayed by XOS,

  • and another notification wakes the process, causing the pending Azan to execute.

What I Have Already Tried

  • AlarmManager

  • BroadcastReceiver

  • Foreground Service

  • WakeLock

  • BootReceiver

  • Exact Alarm permissions

  • Foreground notification

  • Battery optimization disabled

  • Auto-start enabled

  • Multiple architecture changes

  • Offline Room Database

  • Different scheduling logic

The behavior on Infinix remains the same.

My Questions

  1. Has anyone experienced similar behavior specifically on Infinix / XOS?

  2. Does XOS aggressively freeze AlarmManager or Foreground Service despite all required permissions?

  3. Is there any recommended architecture for reliable scheduled background audio playback on XOS devices?

  4. Are there any known manufacturer-specific workarounds for Infinix devices?

Any suggestions, experiences, or references would be greatly appreciated.

Thank you!


Note: This issue appears to be device-specific, because the same APK works correctly on multiple other Android devices.

0
Aug 1 at 7:02 PM
User AvatarMuhammad Yar
#android

No answer found for this question yet.