The app requirement is to trigger an alarm at any specified time and to perform the specified tasks at that particular time.
To achieve this i have made use of AlarmManager
. But it's not working in Android version 9.
I have used Alarm Manager which is working on Android version 7.0.
I made use of setInexactRepeating()
method of AlarmManager
.
I have tried to do it using below code :
AlarmManager am = (AlarmManager) context.getSystemService(Context.ALARM_SERVICE);
am.setInexactRepeating(AlarmManager.RTC_WAKEUP, calendar.getTimeInMillis(), AlarmManager.INTERVAL_DAY, pendingIntent);
I expect that the AlarmManager
must be triggered at the specified time on Android version 9.