2

In one of my android app, I am trying to display last one week user connected WiFi list with name, time of last connection and security level of WiFi like below

Router_WiFi   Open   At 08:30 PM Jan 02,2017

Sunny_WiFi   WPA2   At 08:40 PM Jan 05,2017

Another_WiFi   WEP   At 08:50 PM Jan 07,2017

I am able to get list of all configured WIFI networks by below snippet

WifiManager wifiManager = (WifiManager) context.getSystemService(Context.WIFI_SERVICE);
List<WifiConfiguration> configuredNetworks = wifiManager.getConfiguredNetworks();

And their security type by using

android: Determine security type of wifi networks in range (without connecting to them)

But I'm don't know how to know weather a user connected to each WIFI, and last connected time

Thought I have lastConnected parameter in WifiConfiguration Object, It's always returning null. I am trying to get lastConnected parameter from configObject.toString() as I was unable to access as a public member of that class.

Can someone help me regarding this?

Sanyasirao Mopada
  • 943
  • 12
  • 31

0 Answers0