
host.activity is my package and host.framework.ServicePromemoria is an android service.
What does this error mean?
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
This means that your service is doing a rather long operation (most ANRs are from operations greater than 5 seconds) and is doing it on the UI thread. This could be a network task, or a database task, or some other long operation.
You can fix this by running the task in a service off the main UI thread, by using a Thread or an AsyncTask.
Infact, you can directly start your service into a new thread as follows:
Also, cache the value returned by bindservice, if any, if you require it for later use.