how to check WiFi connection is automatic or estab

2019-07-17 00:14发布

I am doing a small android application, which will show established WiFi connection is automatic or Manuel. Is it possible to take WiFi access point which is set by user in default "setting" application?

Thanks, Vani

1条回答
可以哭但决不认输i
2楼-- · 2019-07-17 00:37

see this

 [ www.developer.android.com/reference/android/net/wifi/package-summary.html] 

or

WifiManager wifiManager = (WifiManager) getSystemService(Context.WIFI_SERVICE);
 if (wifiManager != null) {
     WifiInfo info = wifiManager.getConnectionInfo();
     if (info != null) {
        String ssid = info.getSSID();
        ...
   }           
 }
查看更多
登录 后发表回答