Skip to content

Android518-2017/topic12-02-net-HttpURLConnection

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

week14-net-HttpURLConnectionExample

Sample code that opens an HTTP connection (socket) to a web page, then retrieves the content which is displayed as text in the UI, normally this would be displayed in a WebView

Uses

  • ConnectivityManager and NetworkInfo
  • AsyncTask
  • HttpURLConnection for get
  • BufferedInputStream
  • ByteArrayOutputStream
  • DataOutputStream

app HttpUrlConnection

Note: input URL cannot be https:

Use of logcat to watch the logging

adb logcat -s HttpURLConn

About

Using Network I/O Check status & HttpURLConnection + get

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Java 100.0%