de.unikassel.android.sdcframework.devices
Class BluetoothDevice

Package class diagram package BluetoothDevice
java.lang.Object
  extended by de.unikassel.android.sdcframework.devices.AbstractSensorDevice
      extended by de.unikassel.android.sdcframework.devices.SystemBroadcastReceivingDevice
          extended by de.unikassel.android.sdcframework.devices.BluetoothDevice
All Implemented Interfaces:
SensorDevice, VisitableDevice

public final class BluetoothDevice
extends SystemBroadcastReceivingDevice

Implementation of the bluetooth sensor device.


Field Summary
 
Fields inherited from class de.unikassel.android.sdcframework.devices.SystemBroadcastReceivingDevice
receiver
 
Constructor Summary
BluetoothDevice(Context applicationContext)
          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.
protected  IntentFilter getIntentFilter()
          Getter for intent filter used by the broadcast receiver
 boolean isDeviceInSystemEnabled(Context context)
          Test method for the system wide enabled state of the device
protected  void onDeviceStateChange(Context context, Intent intent)
          Handler to react on broadcast intents for device changes
 
Methods inherited from class de.unikassel.android.sdcframework.devices.SystemBroadcastReceivingDevice
getReceiver, onConfigurationChanged, onDestroy
 
Methods inherited from class de.unikassel.android.sdcframework.devices.AbstractSensorDevice
accept, doHandleDeviceDisabledBySystem, doHandleDeviceEnabledBySystem, enableDeviceScanning, getConfiguration, getDeviceIdentifier, getScanner, isAirplaneModeOn, isDeviceScanningEnabled, onCreate, setDeviceIdentifier, setScanner, updateConfiguration
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

BluetoothDevice

public BluetoothDevice(Context applicationContext)
Constructor

Parameters:
applicationContext - the application context
Method Detail

getIntentFilter

protected IntentFilter getIntentFilter()
Description copied from class: SystemBroadcastReceivingDevice
Getter for intent filter used by the broadcast receiver

Specified by:
getIntentFilter in class SystemBroadcastReceivingDevice
Returns:
the intent filter used by the broadcast receiver

isDeviceInSystemEnabled

public 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 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

onDeviceStateChange

protected void onDeviceStateChange(Context context,
                                   Intent intent)
Description copied from class: SystemBroadcastReceivingDevice
Handler to react on broadcast intents for device changes

Specified by:
onDeviceStateChange in class SystemBroadcastReceivingDevice
Parameters:
context - the context
intent - the intent