Android - Checking internet connection before starting an intent -


I want to check internet connection before opening an intention How can I do this? Any help I am getting started in this area will be appreciated.

This method checks whether the mobile is connected to the internet or not, to update your manifest file Also required

  Personal Boolean is Network Connect (Connectivity Manager = CM (Connectivity Manager) getSystemService (reference. CONNECTIVITY_SERVICE); NetworkInfo NetworkInfo = Sem.ActiveNetworkInfo (); If (networkInfo == faucet) {// There are no active networks details are false; } And true back; } & Lt; Usage-permission Android: name = "android.permission.ACCESS_WIFI_STATE" / & gt; & Lt; Usage-permission Android: name = "android.permission.ACCESS_NETWORK_STATE" />  

Comments

Popular posts from this blog

python - Overriding the save method in Django ModelForm -

html - CSS autoheight, but fit content to height of div -

qt - How to prevent QAudioInput from automatically boosting the master volume to 100%? -