Empresas
Empleos
  • Sobre nosotros
  • Soluciones
    • Publicación de vacantes
      Publica tu vacante y recibe candidatos calificados en 48h.
    • Evaluación de candidatos
      500+ pruebas técnicas y psicológicas, más anti-fraude.
    • Headhunting
      Búsqueda ejecutiva a la medida de principio a fin.
    • Nómina + EOR
      Dispersión de nómina y EOR en más de 15 países de LATAM.
  • Precios
  • Empleos

0

74
Vistas
SCHEDULE_EXACT_ALARM warning despite not programming it

I see the following warning in PlayStore:

 Your use of exact alarms is causing your app to crash for some Android users
Your app schedules exact alarms without checking whether the SCHEDULE_EXACT_ALARM permission has been granted. This is causing your app to crash for users on Android 14 because the permission is no longer granted by default.

In most cases, alternative methods of scheduling work or inexact alarms are more appropriate. If your use of exact alarms is justified, update your app so that it checks this permission is granted before scheduling.

Although, very specifically I only trigger an INACCURATE alarm as follows:

 val alarmManager = context.getSystemService(Context.ALARM_SERVICE) as AlarmManager
 val alarmIntent =
 Intent(context, MediaDownloadAlarmReceiver::class.java).let { intent ->
 PendingIntent.getBroadcast(
 context,
 0,
 intent,
 PendingIntent.FLAG_IMMUTABLE or PendingIntent.FLAG_UPDATE_CURRENT)
 }

 val calendar =
 Calendar.getInstance().apply {
 timeInMillis = System.currentTimeMillis()
 set(Calendar.HOUR_OF_DAY, 5)
 set(Calendar.MINUTE, 0)
 }

 // Set the alarm to start at approximately 5:00 am
 alarmManager.setInexactRepeating(
 AlarmManager.RTC_WAKEUP,
 calendar.timeInMillis,
 AlarmManager.INTERVAL_DAY,
 alarmIntent)

Once the alarm goes off, I schedule a one-time worker request:

 override fun onReceive(context: Context?, intent: Intent?) {
 if (context != null) {
 MediaDownloadWorker.scheduleOneTimeRequest(
 context = context,
 source = "background_process")
 }
 }

Any idea what I'm missing?

over 2 years ago · Carlos Garzón Colorado
1 Respuestas
Responde la pregunta

0

At first glance, setInexactRepeating() shouldn't require the SCHEDULE_EXACT_ALARM permission. If the Play Console is displaying that warning, it's possible that a dependency, third-party library, or even an older version of your app is internally using methods like setExact() , setExactAndAllowWhileIdle() , or setAlarmClock() .

It's also worth checking if WorkManager, Firebase, or another library related to background tasks is scheduling specific alarms on certain devices or Android versions. I would recommend searching your entire project for references to these methods and reviewing the crash report in Android Vitals to pinpoint the exact trace where the exception occurs. Without that trace, it's difficult to confirm that the displayed code is the source of the warning.

3 months ago · Ruben Alexander Serrano Porras Denunciar
Responde la pregunta
Encuentra empleos remotos

¡Descubre la nueva forma de encontrar empleo!

Top de empleos
Top categorías de empleo
Empresas
Publicar vacante Precios Comercial
Legal
Términos y condiciones Política de privacidad
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomiéndame algunas ofertas
Necesito ayuda