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
4
votes
0 answers

How to restrict android app to connect to specific wifi & work only in that particular wifi premises

I am working on a project for a client which has some premises at different location on the globe. How do I restrict my android application to work on a specific wifi network of a specific premises. For Example Let A and B be the two separate…
4
votes
1 answer

Android: Remove WIFI network with certain SSID's

I understand that in Android you have to remove WIFI networks by network ID and not SSID. However I am trying to remove devices that contains certain phrase in the SSID name. Say if(k.SSID.contains("ThisWord_")) it would remove that configured…
user3465662
  • 41
  • 1
  • 2
4
votes
1 answer

How to wait for WifiManager connect, and determine if OK/failed?

I am building an app that can use WifiManager to automagically add/connect our WiFi hosting hardware, so that the user can easily get to its webinterface. The wifiManager.enableNetwork(i.networkId, true); part works. It returns immediately and in a…
Barry Staes
  • 3,890
  • 4
  • 24
  • 30
4
votes
2 answers

wifiManager.startScan not returning any results (need some guidance please)

At this moment in time I am trying to build an Android application that will be able to locate a wifi enabled device indoors. So I have broken it down into various steps in order and 1 of the steps is to scan for available wireless networks and…
user3270260
  • 57
  • 1
  • 2
  • 8
4
votes
1 answer

Connect with particular wifi programmatically after fetching available wifi connections

I have got the list of available wifi network list now i want to connect with a particular network.So please guide me what i have to do after fetching the network list in a list view. **package com.example.wifilist import java.util.ArrayList;…
Sourav Bansal
  • 111
  • 2
  • 6
4
votes
3 answers

Android - How to disable WiFi channel scan programatically?

In Android, is there a way to programatically disable the WiFi channel scan? Looking at WiFiManager I did not see anything short of disabling WiFi, but I'd like to just disable the channel scans.
4
votes
3 answers

Android : Reconnect to Wi-Fi after entering coverage area while screen turned off

I have been struggling with automatically turning on Wi-Fi as soon as the device is within range of an access point without turning on the screen. It has been very frustrating to test and figure out a solution, especially since different devices…
Alex
  • 2,033
  • 1
  • 24
  • 40
4
votes
1 answer

How to connect to a Wifi ScanResult item

i'm trying to create a custom WifiSettings. I create an activity: package manual; import java.util.ArrayList; import java.util.HashMap; import java.util.List; import android.app.Activity; import android.content.BroadcastReceiver; import…
Jayyrus
  • 12,961
  • 41
  • 132
  • 214
4
votes
3 answers

how to programmatically determine if android is connected to wifi?

I'm trying to setup a test for automation on a new android app that I'm developing but having a bit of trouble with one of the apis The problem i'm facing is I want to start the test AFTER wifi has a connection, not when its in the connecting state.…
kptkev
  • 83
  • 1
  • 1
  • 6
4
votes
2 answers

Check the quality of wifi connectivity?

I ran into the case that when I had 4G off and connected to certain wifi access point but without capability to send out or receive data, the flag used to check the connectivity of network was set to be true like below. NetworkInfo ni =…
Hao
  • 43
  • 1
  • 4
4
votes
1 answer

Android Customize Wifi Scan

I am interested in scanning only a particular set of frequencies for a particular time interval (this is different from scanning interval in android api). Is there any high level api or user to kernel space communication interfaces, mechanisms…
user1302884
  • 783
  • 1
  • 8
  • 16
3
votes
1 answer

Wifi Enabling broadcast coming late

I've got a widget that I'm trying to use to enable/disable wifi, as well as display some additional info. I want to show a transitional hourglass icon while Wifi is enabling/disabling, so I'm listening for the android.net.wifi.WIFI_STATE_CHANGED…
Nick
  • 6,900
  • 5
  • 45
  • 66
3
votes
1 answer

android wifi active data transfer

Using Android TelephonyManager an application can obtain the state of data activity over the cellular network. For example, activity is coming in, going out, or both. I am wondering if anyone knows of a way to obtain the same information for when…
blh83
  • 495
  • 5
  • 17
3
votes
2 answers

How to use SUPPLICANT_STATE_CHANGED_ACTION WiFi BroadcastReceiver - android

I want to show the connection process on the screen when my device is connecting to the wifi network. SUPPLICANT_STATE_CHANGED_ACTION is provided by WifiManager but i don't know how to use it. Can anyone help me please?
Vikram Gupta
  • 6,496
  • 5
  • 34
  • 47
3
votes
2 answers

Can't set "WifiConfiguration" when enabling wifi-hotspot using "setWifiApEnabled"

I'm trying to set my Android device to be an Access-Point using the code I've seen here before: WifiManager wifi = (WifiManager) getSystemService(Context.WIFI_SERVICE); WifiConfiguration netConfig = new WifiConfiguration(); netConfig.SSID =…
xhuur
  • 103
  • 1
  • 7