0

I am working on some project and i want to do some method that Every day in specific time do something. I was made the method and it's run perfectly, the only problem is start the method every day in specific hour.

I am really confused between

*AlaramManger *Serives and etc

How do you suggest to do it?

sharon2469
  • 89
  • 1
  • 11

1 Answers1

1

You could use an AlarmManager to accomplish it. Have a look at this answer.

Natan
  • 1,867
  • 13
  • 24
  • Ok, so this work, but i can't start my method i get : on a null object reference. mean that it's not determined. How can i start method from AlaramReciver? For example: MainActivity a1 = new MainActivity; a1.startMethod(); – sharon2469 Apr 27 '18 at 19:50