Check Internet connection in your Android Device and AVD

17:30:00 Dhaval Sodha Parmar 0 Comments



 For many application, you have to check internet connection in emulator or in handset.

First In androidmanifest.xml file give the permission of internet given below : 

    <uses-permission android:name="android.permission.INTERNET"></uses-permission>
    <uses-permission android:name="android.permission.ACCESS_WIFI_STATE">
    </uses-permission>
    <uses-permission android:name="android.permission.ACCESS_NETWORK_STATE">
   </uses-permission>


Now add Internet Connection code given below : 










0 comments: