Questions tagged [android-wifi]

This tag is related to Wifi related questions on Android mobile devices

2111 questions
17
votes
2 answers

Is there any way to debug apps over Wi-Fi or bluetooth? [Please note that the device is not connected via USB]

For some reason (I don't know what), my phone is not getting connected over USB for debugging purposes. I have checked that the device drivers are properly installed and the USB debugging option inside phone settings is checked. Due to this, I am…
Ali_Waris
  • 1,944
  • 2
  • 28
  • 46
16
votes
3 answers

Difference between Wifi aware and Wifi P2P on Android?

What is the main difference between the WiFi aware and WiFi P2P technologies? Using WiFi P2P you can establish a connection between two or more nearby devices without the need of common network. But the android docs spec also that Wi-Fi Aware…
Themelis
  • 4,048
  • 2
  • 21
  • 45
16
votes
3 answers

Set static IP and gateway programmatically in Android 6.x (Marshmallow)

Can anybody tell me how can I set the static IP and gateway programmatically in Android 6? I have read here and here. Settings.System is not working anymore and goolgle says WIFI_STATIC_IP was deprecated in API level 17 and Use WifiManger instead.…
mohsen_og
  • 774
  • 1
  • 9
  • 31
16
votes
1 answer

How to be notified when a peer is no longer available in the Wi-Fi Direct range?

I am developing an Android application based on the use of Wifi Direct API. I have registered in my Activity a BroadcastReceiver in order to be notified about the following Wifi Direct events: WifiP2pManager.WIFI_P2P_STATE_CHANGED_ACTION…
16
votes
2 answers

Find all devices connected in a wifi network

I am trying to make an app here, which will detect all the devices connected in that WiFi network. I have done enough google and come up with an App which can detect IP Addresses of the devices connected in the WiFi network of the app. Now I want…
Vikas Gupta
  • 1,530
  • 5
  • 21
  • 34
16
votes
5 answers

Android - Detect if Wifi Requires Browser Login

My university has an open wifi access point, however it requires you to enter your e-mail before it allows you to use the web. My problem is that the Wifi is stupid in that it seems to drop my connection and force me to enter my e-mail again every…
Nicholas
  • 7,403
  • 10
  • 48
  • 76
15
votes
2 answers

How to keep CPU from 'sleeping' when screen is turned off in Android?

I have an application in which I am sending network data over WiFI. Everything is fine until I turn the display off or the device goes to 'sleep'. I'm already locking the WiFi however, it seems to be the case that the CPU speed ramps down when in…
fatfreddyscat
  • 835
  • 3
  • 8
  • 26
15
votes
2 answers

List WiFi networks on Android Q / API 29

I'm currently migrating my application to Android Q. I want to list all configured WiFi networks and before Q I was able to do so with the function getConfiguredNetworks from the WiFiManager. Sadly this method was deprecated on API level 29 and…
Cilenco
  • 6,951
  • 17
  • 72
  • 152
15
votes
2 answers

android 6.0.1 force wifi connection with no internet access

this has many similar questions (google for: "no internet access detected. won't automatically reconnect." or: android force wifi connection programmatically). i thought i had a answer here, but it stopped working after installing 6.0.1 updates (i…
15
votes
2 answers

How to specify wifi network with NetworkRequest.Builder().setNetworkSpecifier(string)

I am searching for a way to let an Android 5.0 tablet connect to an intranet which does not have internet connection for security reasons. Problem is the captive portal protection that Google build in android since 4.4/5.0. A call is done to…
bluevoid
  • 1,274
  • 13
  • 29
15
votes
1 answer

Getting data speed of wifi/mobile network programmatically

How do I get the data speed of wifi/mobile network programmatically in my application.
Ullas
  • 383
  • 2
  • 6
  • 13
15
votes
3 answers

How to get the coarse location using Wifi or GSM or GPS, whichever is available?

My app only needs a coarse location service when started up. In detail, I need the app's rough location so as to provide the users with the shop info nearby. The location does NOT need to be updated constantly. In addition, coarse localization will…
Sibbs Gambling
  • 19,274
  • 42
  • 103
  • 174
14
votes
5 answers

How to start a local network connection programmatically via Wi-Fi hotspot on Android?

I want to start a local network connection using the built-in Wi-Fi hotspot on Android devices. Is there a way to accomplish it? And how to communicate between two devices? EDIT: I want to do it programmatically. Then I can transfer my own data…
shiami
  • 7,174
  • 16
  • 53
  • 68
14
votes
4 answers

Multicast Support on Android in Hotspot/Tethering mode

I have a prototype Android app that is listening for multicast packets to 'discover' clients to communicate with. The socket set up is similar to this: InetAddress group = InetAddress.getByName("228.1.2.3"); MulticastSocket s = new…
Sarge
  • 141
  • 1
  • 4
14
votes
1 answer

Disabling Samsung "Auto Network Switch" for WiFi Connection

In our app, we handle initiating a WiFi connection to a device that broadcasts its own wireless access point (with no internet connection) for direct communication. It works very well on all of our test devices; however, we're receiving reports…
Kevin Coppock
  • 133,643
  • 45
  • 263
  • 274