nader al-sleman
nader al-sleman

Reputation: 13

how to activate the activity in android app in the right time that the app should be closed then

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

Answers (1)

SuperStormer
SuperStormer

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

Related Questions