Skip to content Skip to sidebar Skip to footer

Android - Function Is Not Completing

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

Solution 1:

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.

Post a Comment for "Android - Function Is Not Completing"