Skip to content

UI Thread Blocking #3

Open
Open
@jab416171

Description

@jab416171

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions