Android networking tutorial in Hindi

In this video we will learn how to make http request in Android application. We will use HttpUrlConnection class to make http request to "www.google.com" and read the response code.




Reference Urls to this tutorial:

Http status codes: https://www.tutorialspoint.com/http/http_status_codes.htm

Processes and Threads: https://developer.android.com/guide/components/processes-and-threads.html

HttpUrlConnection: https://developer.android.com/reference/java/net/HttpURLConnection.html

NetworkOnMainThreadException: https://developer.android.com/reference/android/os/NetworkOnMainThreadException.html

MainActivity.java code:


There is no modification in MainActivity.xml file.

Do not forget to write network permission in "AndroidManifest.xml" file or else your application will be unable to access Mobile internet:





Comments

Popular posts from this blog

Android Sudoku Game Project With Source Code