Class WifiSensor
- java.lang.Object
-
- eu.h2020.helios_social.core.sensor.Sensor
-
- eu.h2020.helios_social.core.sensor.ext.WifiSensor
-
public class WifiSensor extends Sensor
This class provides an implementation of sensor API for detecting currentlu active Wifi network. WifiSensor is a subclass of the abstract base class Sensor. It uses Android WifiManager API to detect the current Wifi and changes in network state. It detects the ssid of the current, connected Wifi (if any).
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description class
WifiSensor.WifiSensorReceiver
Handles Wifi network state change actions
-
Constructor Summary
Constructors Constructor Description WifiSensor(android.content.ContextWrapper appEnv)
Creates a WifiSensorWifiSensor(java.lang.String id, android.content.ContextWrapper appEnv)
Creates a WifiSensor
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description java.lang.String
getWifiSSID()
Gets current Wifi SSID valuevoid
startUpdates()
Starts receiving sensor data valuesvoid
stopUpdates()
Stops receiving sensor data values-
Methods inherited from class eu.h2020.helios_social.core.sensor.Sensor
finalize, getId, getSensorById, getValueListeners, receiveValue, registerValueListener, unregisterValueListener
-
-
-
-
Constructor Detail
-
WifiSensor
public WifiSensor(java.lang.String id, android.content.ContextWrapper appEnv)
Creates a WifiSensor- Parameters:
appEnv
- the application env
-
WifiSensor
public WifiSensor(android.content.ContextWrapper appEnv)
Creates a WifiSensor- Parameters:
appEnv
- the application env
-
-
Method Detail
-
startUpdates
public void startUpdates()
Description copied from class:Sensor
Starts receiving sensor data values- Specified by:
startUpdates
in classSensor
-
stopUpdates
public void stopUpdates()
Description copied from class:Sensor
Stops receiving sensor data values- Specified by:
stopUpdates
in classSensor
-
getWifiSSID
public java.lang.String getWifiSSID()
Gets current Wifi SSID value
-
-