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 classWifiSensor.WifiSensorReceiverHandles 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.StringgetWifiSSID()Gets current Wifi SSID valuevoidstartUpdates()Starts receiving sensor data valuesvoidstopUpdates()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:SensorStarts receiving sensor data values- Specified by:
startUpdatesin classSensor
-
stopUpdates
public void stopUpdates()
Description copied from class:SensorStops receiving sensor data values- Specified by:
stopUpdatesin classSensor
-
getWifiSSID
public java.lang.String getWifiSSID()
Gets current Wifi SSID value
-
-