4

i'm having sometimes problems when launching my app. From time to time the screen stays black and i have to wait 10 minutes. I don't get an error message and the logcat says this:

08-10 11:45:39.659: WARN/ActivityManager(104): Launch timeout has expired, giving up wake lock!
08-10 11:45:39.736: WARN/ActivityManager(104): Activity idle timeout for HistoryRecord{467060f0 org.ccast.contextproviders.androiddatacollector/.gui.UserInterfaceNew}

dbrettschneider
  • 3,173
  • 1
  • 29
  • 28
  • You are probably doing too much processing on the UI thread.... if you need more details, you should probably give more information as to what your app is doing and even some code if possible. – Matthieu Nov 30 '12 at 00:45
  • possible duplicate of [Launch timeout has expired, giving up wake lock! Activity idle timeout for HistoryRecord. Is this something to worry about?](http://stackoverflow.com/questions/10031624/launch-timeout-has-expired-giving-up-wake-lock-activity-idle-timeout-for-histo) – Matthieu Nov 30 '12 at 00:45

2 Answers2

4

I think i found out what the problem is. I use services and broadcasts. One service sends a broadcast to another service. The BroadcastReceiver does a long task which includes a http connection. The Broadcast has an idle timeout of 10 secs and my task runs longer than 10 secs somtimes. So the BroadcastReceiver should start a new thread so that it can return immediately.

dbrettschneider
  • 3,173
  • 1
  • 29
  • 28
0

actually your app doing much thing on main thread till 10 secs,maybe your app hava crash in some steps but you have not noticed that in logcat.so please review your code and try to delete some code to make sure your app is normal.Finally you can add your code back to positon the issue.

evan
  • 318
  • 3
  • 14