If you want to develop a network applicationProgramFirst, determine whether to connect to the network and determine whether to connect to the network on the Android mobile phone through the isavailable () method of the connectivitymanager class. First, obtain the connectivitymanager cwjmanager = (connectivitymanager) instance of the network communication class) getsystemservice (context. connectivity_service);, use cwjmanager. getactivenetworkinfo (). isavailable (); to return whether it is valid. If it is true, it indicates that the current Android phone is connected to the Internet, which may be WiFi, GPRS, HSDPA, etc. Specifically, you can use getactivenetworkinfo () of the connectivitymanager class () method to Determine the detailed access method. Note that the <uses-Permission Android: Name = "Android. permission. access_network_state "> </uses-Permission> permission. The Android Development Network reminds everyone that the market and browser programs on the real machine use this method to determine whether to continue, when some network times out, you can also check whether the network connection exists to avoid wasting the power resources on the mobile phone.