0

Is there a way to start an activity in real time? For example I want to start the GPS when the time is 12:25PM? But I want the time to be selected by the user.

For example we have an activity that takes the desired time (11:45AM) from the user and the next activity is started when the time is 11:45?

Raptor
  • 53,206
  • 45
  • 230
  • 366
user3182266
  • 1,270
  • 4
  • 23
  • 49

1 Answers1

0

After the user enters the time, use the AlarmManager to set up an alarm for that time.

Then see here on how to start your activity once the alarm is set.

Community
  • 1
  • 1
zmbq
  • 38,013
  • 14
  • 101
  • 171