1

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

Rakesh
  • 14,997
  • 13
  • 42
  • 62

1 Answers1

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