Android service makes activity unresponsive

Does anyone know what could be the reason when I start the service from Activity, the emulator displays the message "activity is not responding?"

Inside my service, I run 2 threads to complete some tasks. Could this be the cause of the problem?

thank

+3
source share
1 answer

Does anyone know what could be the reason when I start the service from Activity, the emulator displays the message "activity is not responding?"

Because something in your application is activity, service, etc. - connects the main flow of applications.

Inside my service, I started 2 threads in to complete some tasks. maybe the cause of the problem?

, , AsyncTask ,

sleep() .

+3

Source: https://habr.com/ru/post/1734496/


All Articles