Вопрос

In Android, how to turn on and turn off my alarm clock, using Android SDK ?

Thanks.

Это было полезно?

Решение

Go to Clock in the Menu of SDK...
Then,
on the left bottom,..there is a Alarm Symbol...click it..
It will display all the alarms already fixed and a link to fix a new alarm..
Select the Alarm that you want to reset...there is option very first to on/off your alarm...this is how it works...

Другие советы

I'm not sure you can directly turn it off and on, but it sounds like you can cancel an alarm using an Intent. You can also set one. I assume it would just pop up the alarm dialog, which would allow the user to cancel it.

See AlarmManager for relevant cancel and set methods.

Also, here is an example that walks through an alarm service, using the AlarmManager.

Лицензировано под: CC-BY-SA с атрибуция
Не связан с StackOverflow
scroll top