Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Is there any way to get notified when known SSIS wifi networks get in/out of range?

I want to write an application which consists on perform actions when a known wifi networks get in or out of range.

For example, let's say my home wifi network's SSIS is "WifiHome", and i want to make a notification "You just left home!" whenever the device can't detect this specific network anymore. (Or alternativly - "You just entered home" when the device re-detect signals from this network).

My question is: Is is possible to listen to those changes without polling the available-network-list frequently?

like image 810
Avi Shukron Avatar asked May 12 '11 19:05

Avi Shukron


People also ask

Do you get notifications when someone joins your Wi-Fi?

Network Activity notifications alert you about user and device activity, including: When a new device joins your WiFi network for the first time. When a profile has reached their allotted active time. If there are threats that require your attention.

What is a Wi-Fi notification?

The ability to spot and notify about the availability of Public WiFi Networks is an in-built feature in Android Devices.

How can I see all Wi-Fi networks using CMD?

At the command prompt, type netsh wlan show wlanreport. This will generate a wireless network report that's saved as an HTML file, which you can open in your favorite web browser. The report shows all the Wi-Fi events from the last three days and groups them by Wi-Fi connection sessions.


1 Answers

You should listen to broadcast event SCAN_RESULTS_AVAILABLE_ACTION. This will be sent each time Wi-Fi scan is finished. When such event occurs just re-iterate the scan results that can be obtained via WifiManager's getScanResults.

When wi-fi is active, you'll receive this broadcast every several seconds. But there is no way to configure this interval and my guess is that each manufacturer may change this interval.

You can manually trigger wi-fi scan using WifiManager's startScan.

like image 200
inazaruk Avatar answered Nov 01 '22 14:11

inazaruk