Hi all,
I am getting null pointer exception in the second line below .
connectivity = (ConnectivityManager)
getSystemService(Context.CONNECTIVITY_SERVICE);
boolean b = (connectivity.getActiveNetworkInfo() != null &&
connectivity.getActiveNetworkInfo().isAvailable() &&
connectivity.getActiveNetworkInfo().isConnected() );
I have given the permissions in the manifest
<uses-permission
android:name="android.permission.INTERNET"></uses-permission>
<uses-permission
android:name="android.permission.ACCESS_NETWORK_STATE"></uses-permission>
<uses-permission
android:name="android.permission.CHANGE_NETWORK_STATE"></uses-permission>
--
Regards,
Vani Reddy
--
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en