de.unikassel.android.sdcframework.devices
Class WifiDeviceScanner

Package class diagram package WifiDeviceScanner
java.lang.Object
  extended by de.unikassel.android.sdcframework.util.ObservableEventSourceImpl<Sample>
      extended by de.unikassel.android.sdcframework.devices.AbstractSensorDeviceScanner
          extended by de.unikassel.android.sdcframework.devices.SampleReceivingDeviceScanner
              extended by de.unikassel.android.sdcframework.devices.WifiDeviceScanner
All Implemented Interfaces:
SensorDeviceScanner, ObservableEventSource<Sample>, ObserverRegistration<Sample>

public final class WifiDeviceScanner
extends SampleReceivingDeviceScanner

Implementation of the wifi sensor device scanner.


Field Summary
private  WifiManager wifiManager
          The Wifi manager
 
Fields inherited from class de.unikassel.android.sdcframework.devices.SampleReceivingDeviceScanner
lastScanFinished, receiver, worker
 
Constructor Summary
private WifiDeviceScanner()
          Constructor
  WifiDeviceScanner(Context context)
          Constructor
 
Method Summary
 void doHandleScanResults(Intent intent)
          Handler for the device scan results
 boolean doStartDeviceScan()
          Method to start a device scan
 void doStopDeviceScan()
          Method to stop a device scan which is called if scanner is stopped while a scan is ongoing
private  String getCurrentConnectionBSSID()
          Getter for the current connection BSSID
protected  IntentFilter getIntentFilter()
          Getter for intent filter used by the broadcast receiver
protected  boolean isCompatibleDevice(SensorDevice device)
          Validation method for a compatible device type
 
Methods inherited from class de.unikassel.android.sdcframework.devices.SampleReceivingDeviceScanner
isLastScanFinished, onDestroy, setLastScanFinished, start, stop
 
Methods inherited from class de.unikassel.android.sdcframework.devices.AbstractSensorDeviceScanner
enable, getDevice, isActive, isEnabled, setActive, setDevice
 
Methods inherited from class de.unikassel.android.sdcframework.util.ObservableEventSourceImpl
getObservers, hasObservers, notify, onObserverRegistration, onObserverUnregistration, registerEventObserver, removeAllObservers, unregisterEventObserver
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface de.unikassel.android.sdcframework.util.facade.ObservableEventSource
hasObservers, notify
 
Methods inherited from interface de.unikassel.android.sdcframework.util.facade.ObserverRegistration
registerEventObserver, removeAllObservers, unregisterEventObserver
 

Field Detail

wifiManager

private final WifiManager wifiManager
The Wifi manager

Constructor Detail

WifiDeviceScanner

private WifiDeviceScanner()
Constructor


WifiDeviceScanner

public WifiDeviceScanner(Context context)
Constructor

Parameters:
context - the application context
Method Detail

isCompatibleDevice

protected boolean isCompatibleDevice(SensorDevice device)
Description copied from class: AbstractSensorDeviceScanner
Validation method for a compatible device type

Specified by:
isCompatibleDevice in class AbstractSensorDeviceScanner
Parameters:
device - the device to test for compatibility

getIntentFilter

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

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

doHandleScanResults

public final void doHandleScanResults(Intent intent)
Description copied from class: SampleReceivingDeviceScanner
Handler for the device scan results

Specified by:
doHandleScanResults in class SampleReceivingDeviceScanner
Parameters:
intent - the broadcast intent to handle

getCurrentConnectionBSSID

private String getCurrentConnectionBSSID()
Getter for the current connection BSSID

Returns:
the current connection BSSID, or null if not connected

doStartDeviceScan

public final boolean doStartDeviceScan()
Description copied from class: SampleReceivingDeviceScanner
Method to start a device scan

Specified by:
doStartDeviceScan in class SampleReceivingDeviceScanner
Returns:
true if successful, false otherwise

doStopDeviceScan

public void doStopDeviceScan()
Description copied from class: SampleReceivingDeviceScanner
Method to stop a device scan which is called if scanner is stopped while a scan is ongoing

Specified by:
doStopDeviceScan in class SampleReceivingDeviceScanner