At the moment I have a CountdownTimer which is running on the UI thread and is updating the interface according to onTick.
It's not always working as expected because I saw that the app can get stuck if I put it in background(press the home button) and start other CPU needy apps. I guess the best solution would be to move the CountDownTimer to a background thread. Am I wrong?
What is the best way to update the UI thread according to the CountDownTimer's tick? Using AsyncTask is probably not a good idea since it's recommended for short tasks but I found some recommendations for IntentService and LocalBroadcastManager.
What is the best solution for achieving this? Examples would be great. Thanks!