This tag is related to Wifi related questions on Android mobile devices
Questions tagged [android-wifi]
2111 questions
319
votes
11 answers
How do I connect to a specific Wi-Fi network in Android programmatically?
I want to design an app which shows a list of Wi-Fi networks available and connect to whichever network is selected by the user.
I have implemented the part showing the scan results. Now I want to connect to a particular network selected by the user…

Vikram Gupta
- 6,496
- 5
- 34
- 47
273
votes
21 answers
Broadcast receiver for checking internet connection in android app
I am developing an Android broadcast receiver for checking the internet connection.
The problem is that my broadcast receiver is being called two times. I want it to get called only when the network is available. If it is unavailable, I don't want…

Nikhil Agrawal
- 26,128
- 21
- 90
- 126
255
votes
24 answers
How do I see if Wi-Fi is connected on Android?
I don't want my user to even try downloading something unless they have Wi-Fi connected. However, I can only seem to be able to tell if Wi-Fi is enabled, but they could still have a 3G connection.
android.net.wifi.WifiManager m = (WifiManager)…

Nathan Schwermann
- 31,285
- 16
- 80
- 91
219
votes
40 answers
Android Studio - Android Emulator Wifi Connected with No Internet
I have wasted a whole day trying out different solutions floating around in SO and other place mentioned to enable wifi on the android emulator but to no avail.
Can anybody help me figure out how do I enable internet on my android emulator?
I have…

Vikram Mahishi
- 2,871
- 3
- 15
- 19
147
votes
15 answers
How to detect when WIFI Connection has been established in Android?
I need to detect when I have network connectivity over WIFI. What broadcast is sent to establish that a valid network connection has been made. I need to validate that a valid network connection for HTTP exists. What should I listen for and what…

Androider
- 21,125
- 36
- 99
- 158
128
votes
7 answers
Enabling WiFi on Android Emulator
How to enable WiFi on Android emulator? I have tried to find this but everyone is confusing WiFi with 3G.

salman khalid
- 4,884
- 4
- 27
- 33
111
votes
5 answers
How to programmatically create and read WEP/EAP WiFi configurations in Android?
How to programmatically create and read WEP/EAP WiFi configurations in Android?
I have seen a number of people struggling on this very question on various forums and all across the community. I know this is not that straight forward(especially EAP)…

Alok Save
- 202,538
- 53
- 430
- 533
100
votes
7 answers
Adb over wireless without usb cable at all for not rooted phones
I want to debug Android APPs on my phone (LG nexus 4). I'm travelling and I forgot my USB cable. When I work at home I can do it just connecting the USB cable and executing the command 'adb tcpip 5555'. Then I can unplug the USB cable and connect…

alexpfx
- 6,412
- 12
- 52
- 88
74
votes
14 answers
Android turn On/Off WiFi HotSpot programmatically
Is there an API to turn On/Off the WiFi HotSpot on Android programmatically?
What methods should I call to turn it On/Off?
UPDATE:There's this option to have the HotSpot enabled, and just turn On/Off the WiFi, but this is not a good solution for me.

mxg
- 20,946
- 12
- 59
- 80
68
votes
13 answers
How to turn off Wifi via ADB?
Im automating a testing procedure for wifi calling and I was wondering is there a way to turn off/on wifi via adb?
I would either like to disable/enable wifi or kill wifi calling (com.movial.wificall) and restart it.
Is it possible to do this all…

Nefariis
- 3,451
- 10
- 34
- 52
62
votes
4 answers
How to get name of wifi-network out of android using android API?
I thought that I should use NetworkInterface::getDisplayName. I got some name, but this name is different that this name which I can see, when I choosing to which network I want to connect.

noisy
- 6,495
- 10
- 50
- 92
57
votes
7 answers
Wifi Connect-Disconnect Listener
Which listener does my class have to implement inorder to automatically check code if the wifi connects/disconnects?
I'm able to manually check for wifi connection/disconnection but each time I need to connect/disconnect WIFI from android settings…

Neha
- 569
- 1
- 5
- 6
57
votes
7 answers
Getting WiFi signal strength in Android
I can get WiFi signal level in dBm using following code.
for (ScanResult result : wifiScanResultList) {
int signalLevel = result.level;
}
It gives negative value. When we see the default system WiFi setting and clicked on the connected WiFi…

AnujAroshA
- 4,623
- 8
- 56
- 99
52
votes
14 answers
CONNECTIVITY_ACTION intent received twice when Wifi connected
In my app I have a BroadcastReceiver that is launched as a component through a tag, filtering android.net.conn.CONNECTIVITY_CHANGE intents.
My goal is simply to know when a Wifi connection was established, so what I am doing in…

Torsten Römer
- 3,834
- 4
- 40
- 53
48
votes
9 answers
Get my wifi ip address Android
How can I get the ip address of my phone when it is connected under wifi?
I found a method here but it returns something like 24.182.239.255 even if I'm under wifi and I expect something like 192.168.1.10.
I'd like something like:
if (you are under…

Luigi Tiburzi
- 4,265
- 7
- 32
- 43