I was coding a clock for android. For it, i set a function which updates screen 1 time each a second, so my program can consume a lot of resources, and my objective is to add a checkbox preference, consuming the less resources as I can.
Then, my question is: I have seen some ways to update preferences with onSharedPreferenceChangeListener
for example... Which is the way which consumes less system resources? How should I implement it to my code?