Reputation: 13
I am working on alarm clock android app. my problem is to activate an ringing activity in the app at the right time that the app should be closed then.. how to do that?? I wish my idea is clear. thanks
Upvotes: 0
Views: 44
Reputation: 5397
You can use AlarmManager to set the alarm. You just need to create a PendingIntent for the activity, and then pass in the parameters for either AlarmManager#set or AlarmManager#setExact, depending on your API version. If you are using API 21 or later, another option is AlarmManager#setAlarmClock.
Upvotes: 1