I want to know is there any way to determine whatever I am logging should go through WIFI instead of device network,Is there any methods as part of Log entries SDK
Asked
Active
Viewed 728 times
1
-
go through this link. http://stackoverflow.com/questions/9353005/android-wifi-how-to-detect-when-specific-wifi-connection-is-available – Vasant May 03 '17 at 12:16
-
Is there any default option in sdk – Rakesh May 04 '17 at 05:23
1 Answers
0
Try this code for wifi connection or not.
private boolean checkConnectedToDesiredWifi() {
boolean connected = false;
WifiManager wifiManager =(WifiManager) context.getSystemService(Context.WIFI_SERVICE);
WifiInfo wifiInf = wifiManager.getConnectionInfo();
String desiredMacAddress = wifiInf.getMacAddress();
WifiInfo wifi = wifiManager.getConnectionInfo();
if (wifi != null) {
// get current router Mac address
String bssid = wifi.getBSSID();
connected = desiredMacAddress.equals(bssid);
}
return connected;
}

Vasant
- 3,475
- 3
- 19
- 33
-
I am asking is there any default option in this SDK,to be used,I dont what to check for WIFI connection and log it manually from my end – Rakesh May 04 '17 at 15:06