I have a problem that I couldn't find my wifi hotspot ssid in my Android system.
I found many information from google, but nothing helpful.
Please help me to solve it.
相关问题
- Delete Messages from a Topic in Apache Kafka
- Jackson Deserialization not calling deserialize on
- How can I create this custom Bottom Navigation on
- How to maintain order of key-value in DataFrame sa
- StackExchange API - Deserialize Date in JSON Respo
You can use WifiManager and WifiInfo for getting Wifi SSID
Also add Permission in your Manifest file.
Check via NetworkInfo for wifi-type if it is connected. And then use wifiinfo getSSid(). You might want to remove double slashes from returnd SSID
https://play.google.com/store/apps/details?id=com.connect.freewifi
You should check out this application and developer api from http://developer.android.com/reference/android/net/wifi/WifiInfo.html
It will help you with your task.
Have you tried using
WifiInfo.getSSID()
?http://developer.android.com/reference/android/net/wifi/WifiInfo.html#getSSID%28%29
Here: http://www.androidjavadoc.com/2.3/android/net/wifi/WifiManager.html is the full documentation on the WifiManager.
Note that some of the methods are only available through inspection, as is the method you need
getWifiApConfiguration
.O, and because this stuff is marked hidden, it can change or be completely removed in any future version of Android. So, don't rely on it too much on "official" apps, unless you make that very clear.