Permissions Journey: ACCESS_WIFI_STATE

Public on May 26, 2009
ACCESS_WIFI_STATE allows applications to access information about Wi-Fi networks, pretty much explained it all.

Manifest file
<uses-permission android:name="android.permission.ACCESS_WIFI_STATE" ></uses-permission>
WifiManager wifiManager = (WifiManager) getSystemService(WIFI_SERVICE);
WifiInfo wifiInfo = wifiManager.getConnectionInfo();

First we need to get our Wifi service, WifiManager class is pretty much the class you need for wifi connectivity.
WifiManager wifiManager = (WifiManager) getSystemService(WIFI_SERVICE);

Get the infomration of the current wifi connection information with getConnectionInfo
WifiInfo wifiInfo = wifiManager.getConnectionInfo();

For now we trace our connection

I got this result since i didnt turn on my wifi, you could turn your wifi on via settings and try to trace it again.
SSID: , BSSID: , MAC: 00:18:41:c8:62:98, Supplicant state: UNINITIALIZED, RSSI: -200, Link speed: 54, Net ID: -1


Update History
   Jan 17, 2012 - Visual Update

[Advertising]Faster Thinking - Speed up your brain

Faster Thinking Game

sentiment_satisfied Emoticon