In the Android system, the following three communication interfaces are available:
1, Standard Java interface: java.net.
2, Apache interface: Org.apache.http.
3, Android network interface: Android.net.http.
In order to access the network, it is necessary to set the application to obtain Android.permission.INTERNET permissions on the Android system.
Here are the packages related to network connectivity:
1, java.net
The package provides networking-related classes, including streaming and datagram sockets, Internet protocols, and common HTTP processing.
2, Java.io
The various classes in the package are used by sockets and links provided in other Java packages. They can be used to interact with local files.
3, Java.nio
A variety of classes that contain buffering of specific data types to facilitate network communication between the two endpoints of the Java voice.
4, org.apache.*
A variety of packages that provide granular control and functionality for HTTP communication.
5, Android.net
Includes various additional network access sockets, including URL classes, outside of the core java.net.* class.
6, Android.net.http
Contains the various classes that can operate SSL certificates.
7, Android.net.wifi
Contains various classes to manage all aspects of Wi-Fi in the Android platform.
Reprint Please specify source:http://blog.csdn.net/hai_qing_xu_kong/article/details/42823899 Emotional Control _
Learn about the HTTP readiness of Android (16)