I use AlarmManager.setAlarmClock() to set an alarm. Alarm is fired on all devices, including Samsung, but the small alarm icon near the clock (top right corner of the screen) is missing on Samsung devices with Android 9. What am I missing here?
I know that the issue has also affected Google Clock application, but it was fixed recently.
My code:
val pendingAlarm = Intent(ACTION_FIRED)
.apply {
setClass(mContext, AlarmsReceiver::class.java)
putExtra(EXTRA_ID, id)
putExtra(EXTRA_TYPE, typeName)
}
.let { PendingIntent.getBroadcast(mContext, pendingAlarmRequestCode, it, PendingIntent.FLAG_UPDATE_CURRENT) }
val pendingShowList = PendingIntent.getActivity(
mContext,
100500,
Intent(mContext, AlarmsListActivity::class.java), PendingIntent.FLAG_UPDATE_CURRENT)
am.setAlarmClock(AlarmManager.AlarmClockInfo(calendar.timeInMillis, pendingShowList), pendingAlarm)