-1

I'm having a strange issue when I run my application from Android Studio on my device. When the HDMI cable of my device (e.g. Odroid) is disconnected (no other video output connected), I found in Logcat this error "The application may be doing too much work on its main thread". When a monitor is plugged the error did not show anymore.

Do you think is something related to the code or just a random error not relevant?

PS I need to use my app without video output.

PPS The error appears only when the monitor is not plugged.

Daniele
  • 668
  • 2
  • 10
  • 25
  • Possible duplicate of [The application may be doing too much work on its main thread](http://stackoverflow.com/questions/14678593/the-application-may-be-doing-too-much-work-on-its-main-thread) –  May 10 '16 at 10:16

1 Answers1

0

It seems that , there is some waiting mechanism in your code , So I suggest you to shift your code into AsyncTask so you will never encounter this error.

http://developer.android.com/reference/android/os/AsyncTask.html

Gaurav
  • 3,615
  • 2
  • 27
  • 50