Questions tagged [wifimanager]

WifiManager is the primary Android API for managing all aspects of Wi-Fi connectivity.

WifiManager is the primary Android API for managing all aspects of Wi-Fi connectivity.

As per the WifiManager documentation, this class provides access to:

  • The list of configured networks. The list can be viewed and updated, and attributes of individual entries can be modified.
  • The currently active Wi-Fi network, if any. Connectivity can be established or torn down, and dynamic information about the state of the network can be queried.
  • Results of access point scans, containing enough information to make decisions about what access point to connect to.
  • It defines the names of various Intent actions that are broadcast upon any sort of change in Wi-Fi state.
667 questions
5
votes
3 answers

Is it possible to programmatically enable wifi on Android 10 devices?

Since setWifiEnabled is deprecated on Android 10, how does one programatically enable wifi on Android 10 devices? Is it not possible to programmatically enable wifi at all on Android 10+ (SDK 29) ?
AdeleGoldberg
  • 1,289
  • 3
  • 12
  • 28
5
votes
1 answer

Android wifimanager always returns true

This is killing me and any help would be greatly appreciated. I want to connect to an open network using wifi manager. The problem I am having is that the code claims connection to any network - even non-existing ones. Below is the entire code that…
Bob
  • 51
  • 1
  • 3
5
votes
1 answer

No response received in startscan method at WifiManager in Android 8 Oreo

According to official Android documentation, the method startScan at WifiManager is deprecated in API level P. However I am trying to use this method in API level 26 (previous to P) without success. I have developped an app which requires the…
Antonio
  • 53
  • 1
  • 5
5
votes
1 answer

SupplicantState COMPLETED but DetailedState OBTAINING_IPADDR while actually connected to Wifi?

I'm using API level 27 but run my app on a 6.0 tablet. Here is the suspicious code: WifiManager wm = (WifiManager)pContext.getSystemService(Context.WIFI_SERVICE); WifiInfo wi = wm.getConnectionInfo(); SupplicantState ss =…
dom_beau
  • 2,437
  • 3
  • 30
  • 59
5
votes
7 answers

Android 6 : Connect to specific wifi network programmatically not working

I am trying to connect to a wifi network by giving the SSID and pass using WifiManager configurations. Based on this threads solution: How do I connect to a specific Wi-Fi network in Android programmatically? The reconnect method is called. but…
chimaira
  • 173
  • 2
  • 2
  • 12
5
votes
5 answers

Android Lollipop - WiFi Hotspot setWifiApEnabled() get InvocationTargetException

I'm using in the app setWifiApEnabled() from Hidden API (access by reflection). In some older phone it´s working (also with Samsung Galaxy S3, some phones with 4.4,...) but I tested it with Samsung Galaxy S5 and I…
Pepa Zapletal
  • 2,879
  • 3
  • 39
  • 69
5
votes
1 answer

Determine Network Connection Bandwidth (speed) wifi and mobile data

I want to get Network Connection Bandwidth in kbps or mbps. if the device is connected to wifi then it should returns the network bandwidth(speed) as well as mobile data. it will returns wifi capablity rate but i want exact data transfer…
Rathan Kumar
  • 2,567
  • 2
  • 17
  • 24
5
votes
2 answers

What does "mWifiServiceMessenger == null" exception in LogCat imply?

When getting a WifiManager System Service like this WifiManager mainWifi = (WifiManager) context.getSystemService(Context.WIFI_SERVICE); I have the following permissions in the Manifest file:
sleidig
  • 1,350
  • 12
  • 28
5
votes
2 answers

How to get signal strength of connected WiFi android?

I want to get signal strength of this wifi which is connected with my device. This is probably easy. But I am beginner. And It's homework. How to get it? I tried this code. But it doesn't work. registerReceiver(new BroadcastReceiver() { …
Emrah Şentürk
  • 107
  • 1
  • 6
  • 10
5
votes
0 answers

Writing my own wifi driver for linux?

I am wondering where to start if I decided to write\hack my own wifi driver? What language should be of choice? Where to get the initial research documents? Fourms I should visit? IRC channels?
zotherstupidguy
  • 2,976
  • 10
  • 39
  • 59
5
votes
3 answers

Setting Priority for wifi configuration in android

I have to set a priority for wifi configuration sothat I have to always connect to specified wifi network so that device ignores other available wifi in the region. configuration.priority = 100000; It is connecting to the last known connected…
user1699512
  • 141
  • 1
  • 6
4
votes
4 answers

Can I use WiFi to transfer data/messages between two android phones, not connected to a router?

I'm aware that if two Android phones are connected to a same wifi network, they can implement socket programming to transfer data between them But I actually want to know if you can use wifi as a transfer medium between two Android phones, just like…
4
votes
1 answer

Is there a Flutter library that can scan for WIFI networks and connect/disconnect to/from these networks, that works for Android API level 28-30

I am working on a Flutter app that needs to scan for WIFI networks and be able to connect and disconnect to/from these. I have tried to use wifi_configuration which works with Android 9(API level 28) but not above this. I also tried using the…
Daniel
  • 546
  • 6
  • 17
4
votes
3 answers

Missing method in android.net.wifi.WifiManager

On the site androidjavadoc.com, a method startScanActive is listed in the class WifiManager that makes it possible to perform an active wi-fi scan. It has been discussed here recently, too. Nevertheless, when I try to use that method in Eclipse, it…
filip
  • 3,542
  • 1
  • 26
  • 23
4
votes
0 answers

How to get Wi-Fi hotspot clients connectivity status in android?

I have created a WI-FI Hotspot in my app and then I try to show a toast message when a device connects to my hotspot. I have tried this : private var onClientConnected = object : BroadcastReceiver(){ override fun onReceive(context: Context?,…
Jazz
  • 214
  • 2
  • 10