0

I have an array of specified hours for each day, when brightness should by changed for application which is awake 24/7. It happens twice a day.

What I want to achieve is to find the most economical way of implementation that problem.

Should I use AlarmManager or maybe there is a better sollution?

Activity is always awake...

pawegio
  • 1,722
  • 3
  • 17
  • 29

2 Answers2

1

If your app doesn't show any UI while it's awake, use the AlarmManager.

Felix
  • 88,392
  • 43
  • 149
  • 167
0

Finally, I decided to use an AlarmManager with BroadcastReceiver setting value in SharedPreferences and then in Activity I have a Handler which checks that value.

pawegio
  • 1,722
  • 3
  • 17
  • 29