-1

im trying to create an alarm clock application which do a spesific actions once the alarm goes off and im running into some troubles:

first, i was playing around with the AlarmClock() class, which has few values i can set-up

Intent i = new Intent(AlarmClock.ACTION_SET_ALARM);
        i.putExtra(AlarmClock.EXTRA_HOUR, tpSetClock.getCurrentHour());
        i.putExtra(AlarmClock.EXTRA_MINUTES, tpSetClock.getCurrentMinute());
        i.putExtra(AlarmClock.EXTRA_SKIP_UI, true);
        startActivity(i);

i would also like to modify the repeat and ringtone of the alarm, can it be set through AlarmClock()?

now after skipping the UI of the alarm clock i want to launch my own Activity once the alarm trigger comes in, how do i do that?

thanks in advance, yotam.

Totem
  • 1,030
  • 7
  • 16

1 Answers1

0

Use an AlarmManager to display your own activity or perform any other action. This question contains a bunch of usage examples.

Community
  • 1
  • 1
Andrey Ermakov
  • 3,298
  • 1
  • 25
  • 46