Question

I have an app that has quite a large number of handlers in it and some of them seem to be stopping randomly, and as luck would have it, its the more important ones. Is there a maximum number of handlers than can be running at one time or is it more than likely a problem with the code that some of them are not being reset?

Please do not ask for code, the project is huge, >20,000 lines of code so posting every instance of a handler is not feasible, I just want to know if there is a limit to the number of handlers you can have running at any one time.

Was it helpful?

Solution

I think there is no a limit but If there is too much work to do in one time Android kills threads/handlers.

Instead create too much handlers try do it like this: Multiple threads

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top