Issue
I am trying to develop an Android application. Every time when application starts, it has to fetch some details from a server. I have used an asynctask
for it and I am calling it in the onCreate
method in android. It works perfectly when the server is running and but when the server is not running I don't want my application to get hang waiting for a time out and finding out that the server is not running. What is a better way to implement ? In my present method the application is stuck till the time out is happening.
Solution
I was using asyncTask.execute().get();
when I changed to asyncTask.execute()
It works fine
Answered By - jgm
0 comments:
Post a Comment
Note: Only a member of this blog may post a comment.