Pergunta

I want to build an application with a concept that I have to perform an action at a given time which is prespecified. That is it is basically like an alarm.

For that , I want to constantly query the timing so that whenever I find that the present HOUR_OF_DAY and MINUTE matches the input, I perform the given action

In Windows phone, there is the concept if a ticker which I used. How to do it in android? It would be great if I could get the code for it.

Foi útil?

Solução

Complete example to use AlarmManager in Android.

Follow this tutorial, read,understand and implement.


You should not go with a thought to create a self program or service to check the timings each second else it will eat up all the battery the best solution is to use AlarmManager.

Outras dicas

Have a look at AlarmManager. It allows you to schedule your application to run at given times

Licenciado em: CC-BY-SA com atribuição
Não afiliado a StackOverflow
scroll top