Answer the question
In order to leave comments, you need to log in
How to handle events in the background in android?
I’m just starting to understand Android, and I don’t understand how to properly do some functions in the background, such as by pressing a button, but constantly.
For example, change color once per second.
Now I did it through the stream, but there is probably a simpler way?
Answer the question
In order to leave comments, you need to log in
For the case as in the example, IMHO, it is best suited from the whole variety of tools
https://developer.android.com/reference/java/util/Timer
example
www.cyberforum.ru/post7226218.html
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question