de.unikassel.android.sdcframework.devices
Class VirtualSensorDevice

Package class diagram package VirtualSensorDevice
java.lang.Object
  extended by de.unikassel.android.sdcframework.devices.AbstractSensorDevice
      extended by de.unikassel.android.sdcframework.devices.VirtualSensorDevice
All Implemented Interfaces:
SensorDevice, VisitableDevice
Direct Known Subclasses:
AudioDevice, TagDevice, TimeProviderDevice, TwitterDevice

public class VirtualSensorDevice
extends AbstractSensorDevice

Base class for virtual sensor devices which does not refer to a physical sensor in the system.


Constructor Summary
VirtualSensorDevice(SensorDeviceIdentifier deviceId)
          Constructor
 
Method Summary
protected  void doSignalDeviceNotEnabledInSystem(Context applicationContext)
          Method to signal the user that the device is disabled in the system and needed by this service.
 boolean isDeviceInSystemEnabled(Context context)
          Test method for the system wide enabled state of the device
protected  void onConfigurationChanged()
          Callback to signal configuration of device has changed
 
Methods inherited from class de.unikassel.android.sdcframework.devices.AbstractSensorDevice
accept, doHandleDeviceDisabledBySystem, doHandleDeviceEnabledBySystem, enableDeviceScanning, getConfiguration, getDeviceIdentifier, getScanner, isAirplaneModeOn, isDeviceScanningEnabled, onCreate, onDestroy, setDeviceIdentifier, setScanner, updateConfiguration
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

VirtualSensorDevice

public VirtualSensorDevice(SensorDeviceIdentifier deviceId)
Constructor

Parameters:
deviceId -
Method Detail

isDeviceInSystemEnabled

public final boolean isDeviceInSystemEnabled(Context context)
Description copied from interface: SensorDevice
Test method for the system wide enabled state of the device

Parameters:
context - the application context
Returns:
true if device is enabled in system, false otherwise

doSignalDeviceNotEnabledInSystem

protected final void doSignalDeviceNotEnabledInSystem(Context applicationContext)
Description copied from class: AbstractSensorDevice
Method to signal the user that the device is disabled in the system and needed by this service.
This method is called from the handler AbstractSensorDevice.doHandleDeviceDisabledBySystem(android.content.Context) to react on system state changes from enabled to disabled.
The implementation depends on the concrete device.

Specified by:
doSignalDeviceNotEnabledInSystem in class AbstractSensorDevice
Parameters:
applicationContext - the application context

onConfigurationChanged

protected final void onConfigurationChanged()
Description copied from class: AbstractSensorDevice
Callback to signal configuration of device has changed

Specified by:
onConfigurationChanged in class AbstractSensorDevice