Class 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).
    • 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 class Sensor
      • stopUpdates

        public void stopUpdates()
        Description copied from class: Sensor
        Stops receiving sensor data values
        Specified by:
        stopUpdates in class Sensor
      • getWifiSSID

        public java.lang.String getWifiSSID()
        Gets current Wifi SSID value