Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

UI Thread Blocking #3

Open
jab416171 opened this issue Aug 15, 2011 · 3 comments
Open

UI Thread Blocking #3

jab416171 opened this issue Aug 15, 2011 · 3 comments

Comments

@jab416171
Copy link
Owner

Due to the way we abstracted away the actual HTTP handling, unless we do some major refactoring, it will be difficult to put the HTTP handling into an AsyncTask.

An AsyncTask is a helper class that will do a background process for you (and allow you to update the UI) so you don't block the main UI thread, making the user think the app is stalled or hanging.
http://developer.android.com/reference/android/os/AsyncTask.html

See https://github.com/jab416171/Android-Battleship-Client/blob/master/src/edu/neumont/battleship/http/RefreshTask.java and https://github.com/jab416171/Android-Battleship-Client/blob/master/src/edu/neumont/battleship/BattleshipActivity.java#L48-54 to see how I used AsyncTask for the refresh button.

@BrentLee
@glenwatson

@glenwatson
Copy link
Collaborator

You're going to have to explain this one to me. I don't know what's wrong.

@jab416171
Copy link
Owner Author

Well, I was just skimming through the commits, and it looks like you might have fixed it.

@glenwatson
Copy link
Collaborator

I can't test it when your server is down.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants