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

229
Vistas
AlarmManager.setAlarmClock() not showing alarm in top right corner on Android Pie

I am having an alarm app that sets alarm using following code for devices on Marshmallow and higher:

val alarmIntent: PendingIntent = Intent(context, AlarmReceiver::class.java).let { intent ->
    intent.putExtra(Const.EXTRA_ALARM_ID, alarm.alarmId)
    PendingIntent.getBroadcast(context, 
                               alarm.calculateBroadcastId(dayOfWeek),
                               intent, 
                               PendingIntent.FLAG_UPDATE_CURRENT)
}

alarmManager.setAlarmClock(
            AlarmManager.AlarmClockInfo(calendar.timeInMillis, alarmIntent),
            preAlarmIntent)

It works as expected and shows alarm icon in top right corner (see attachment) on all devices except those devices running Android Pie.

UPDATE: Not on all devices running Android Pie, just Samsung (S8) so far.

Is there any additional code that I should add into the pending intent or somewhere in order to show this icon?

Photo of the device running Android Oreo (OS 8.1) and showing alarm icon as expected: enter image description here

over 4 years ago · Santiago Trujillo
1 Respuestas
Responde la pregunta

0

In android Pie restrictions are introduced on the apps running in background.
This is due to new features introduced to improve device power management.

These features are explained in android developer documents in detail.
You can check details in this Link.
Hope it helps you !

over 4 years ago · Santiago Trujillo 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