Ray's playground

 

The Connected World(Chapter 7 of Hello, Android)

  Android provides a full set of Java-standard networking APIs, such as the java.net.HttpURLConnection package, that you can use in your programs.
  The tricky part is to make the calls asynchronously so that your program’s user interface will be responsive at all times. Consider what would happen if you just make a blocking network call in your main (GUI) thread. Until that call returns (and it might never return), your application cannot respond to any user interface events
such as keystrokes or button presses. It will appear hung to the user. Obviously, that’s something you’ll have to avoid.

posted on 2010-01-20 23:18  Ray Z  阅读(201)  评论(0编辑  收藏  举报

导航