I'm making an app that contains a feature with an alarm clock. For that purpose I'm testing with AlarmManager setExactAndAllowWhileIdle() with RTC_WAKEUP and a BoadcastReceiver and also with setAlarmClock in order to work in Doze. Everything works fine in Android Pie but when I tested in Marshmallow I got random delays and sometimes doesn't work, I think.
Today during my tests I notice a strange behaviour in marshmallow(ZTE), if I use the word "clock" in package name suddently everthing works. Is that a known behaviour? Someone can reproduce that behaviour? There is another way to use setAlarmClock () without having to use the word "clock" in the package?
I've been looking on the internet and the only thing similar I found was :
Also I remember that some chinese phones would not kill apps that had the word "alarm" in the package name :-).
Edit:
Correction, is not when I use the word "clock" in package but in applicationId, I was considering that both were the same thing.