I have to create an app in which I must set a date and at that specific date at 9 O’clock, I must give a notification. What is the simplest method of doing this? I want the app to work even when the app gets killed anyway. Is AlarmManager a solution?
Share
To schedule an Action you can use the AlarmManager
Try this code it’s work for me:
1 / Declare the BroadcastReceiver CLASS to launch the Action, this class can be inside your activity or outside in an other java file
2/ Inside your Oncreate Method put this code
Launch your App a Toast will be appeared after 3 seconds, So you can change “System.currentTimeMillis()+3000” with your wake up time.