org.placelab.midp.debug
Class BluetoothSpotterMidlet

java.lang.Object
  extended byjavax.microedition.midlet.MIDlet
      extended byorg.placelab.midp.debug.BluetoothSpotterMidlet
All Implemented Interfaces:
java.lang.Runnable, ScanOnceListener, SpotterListener

public class BluetoothSpotterMidlet
extends javax.microedition.midlet.MIDlet
implements java.lang.Runnable, ScanOnceListener

Bluetooth spotter midlet that does continuous inquiries and returns a Vector of all seen bluetooth devices. If the device is a known beacon, it's coordinates are returned as well.


Field Summary
protected  boolean alive
           
protected  javax.microedition.lcdui.StringItem beaconListStringItem
           
protected  BluetoothSpotter bs
           
protected  javax.microedition.lcdui.Form form
           
protected  RMSMapper mapper
           
 
Constructor Summary
BluetoothSpotterMidlet()
           
 
Method Summary
protected  void destroyApp(boolean flag)
           
 void endOfScan(Spotter sender)
          Sent when a Spotter doing scanOnce concludes its operation.
 javax.microedition.lcdui.StringItem getBeaconListStringItem()
           
protected  javax.microedition.lcdui.Form getForm()
           
 void gotMeasurement(Spotter sender, Measurement m)
           
protected  void pauseApp()
           
 void run()
           
 void spotterExceptionThrown(Spotter s, SpotterException ex)
           
protected  void startApp()
           
 void updateList()
           
 
Methods inherited from class javax.microedition.midlet.MIDlet
checkPermission, getAppProperty, notifyDestroyed, notifyPaused, platformRequest, resumeRequest
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

form

protected javax.microedition.lcdui.Form form

alive

protected boolean alive

beaconListStringItem

protected javax.microedition.lcdui.StringItem beaconListStringItem

bs

protected BluetoothSpotter bs

mapper

protected RMSMapper mapper
Constructor Detail

BluetoothSpotterMidlet

public BluetoothSpotterMidlet()
Method Detail

startApp

protected void startApp()
                 throws javax.microedition.midlet.MIDletStateChangeException
Throws:
javax.microedition.midlet.MIDletStateChangeException

pauseApp

protected void pauseApp()

destroyApp

protected void destroyApp(boolean flag)
                   throws javax.microedition.midlet.MIDletStateChangeException
Throws:
javax.microedition.midlet.MIDletStateChangeException

getForm

protected javax.microedition.lcdui.Form getForm()

getBeaconListStringItem

public javax.microedition.lcdui.StringItem getBeaconListStringItem()

run

public void run()
Specified by:
run in interface java.lang.Runnable

gotMeasurement

public void gotMeasurement(Spotter sender,
                           Measurement m)
Specified by:
gotMeasurement in interface SpotterListener

endOfScan

public void endOfScan(Spotter sender)
Description copied from interface: ScanOnceListener
Sent when a Spotter doing scanOnce concludes its operation.

Specified by:
endOfScan in interface ScanOnceListener
Parameters:
sender - the Spotter that has concluded its scanOnce operation
See Also:
Spotter.scanOnce(), Spotter.scanOnce(EventSystem)

updateList

public void updateList()

spotterExceptionThrown

public void spotterExceptionThrown(Spotter s,
                                   SpotterException ex)
Specified by:
spotterExceptionThrown in interface SpotterListener