I'm trying to get a string using a http call. I am noticing that in large files I am not reading all of the file before it stops and gives me this error and then continues with the rest of the script.
11-29 11:26:18.417: WARN/ActivityManager(59): Launch timeout has expired, giving up wake lock!
11-29 11:26:18.556: WARN/ActivityManager(59): Activity idle timeout for HistoryRecord{45059000 com.MeetingManager/.MeetingManager}
I feel like the getXML function is taking to long and the app just moves right along to the next line of code which uses the incomplete string from the previous function that did not finish. Of course this is making my app crap out.
How do I give my function more time?
Below are the two function calls. If you need more info from these calls just let me know.
String xml = XMLfunctions.getXML(items); Document doc = XMLfunctions.XMLfromString(xml);
It looks like you're calling a long running function inside your application's onCreate or onResume methods which is blocking the main application thread. This isn't a good idea as it means your users won't be able to see information if the app takes a long time to start up - they might think nothing is happening and quit.
Have a look at this and move any long running operations into something like an ASyncTask or a Thread with a Handler. Have a look here for more information.