Question:What does the following code do?
public boolean isOnline() {
   ConnectivityManager connMgr = (ConnectivityManager) getSystemService(Context.CONNECTIVITY_SERVICE);
   NetworkInfo networkInfo = connMgr.getActiveNetworkInfo();
   return (networkInfo != null && networkInfo.isConnected());
}
 

A checking Network connection. 

B checking only WIFI network connectivity. 

C checking only Bluetooth data connection. 

D checking only Ethernet data connection 

+ Answer
+ Report
Total Preview: 2133

Copyright © 2024. Powered by Intellect Software Ltd