org.placelab.midp.demo
Class PlacelabExampleMidlet

java.lang.Object
  extended byjavax.microedition.midlet.MIDlet
      extended byorg.placelab.midp.demo.PlacelabExampleMidlet
All Implemented Interfaces:
javax.microedition.lcdui.CommandListener, EstimateListener, java.lang.Runnable, SpotterListener

public class PlacelabExampleMidlet
extends javax.microedition.midlet.MIDlet
implements javax.microedition.lcdui.CommandListener, SpotterListener, EstimateListener, java.lang.Runnable

This is an example MIDlet that uses the Place Lab daemon to obtain position estimates. The demo shows current GSM cell information, all nearby bluetooth devices, and a position estimate if available. As required by Place Lab, the map database needs to be populated with known beacons that can be seen in order to generate position estimates.


Constructor Summary
PlacelabExampleMidlet()
           
 
Method Summary
 void commandAction(javax.microedition.lcdui.Command c, javax.microedition.lcdui.Displayable s)
           
 void destroyApp(boolean condition)
           
 void estimateUpdated(Tracker t, Estimate e, Measurement m)
          Implement this method to respond to updates from the Tracker(s) you are registered with.
 void gotMeasurement(Spotter sender, Measurement m)
           
 void pauseApp()
           
 void run()
           
 void spotterExceptionThrown(Spotter s, SpotterException ex)
           
 void startApp()
           
 
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
 

Constructor Detail

PlacelabExampleMidlet

public PlacelabExampleMidlet()
Method Detail

startApp

public void startApp()

run

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

pauseApp

public void pauseApp()

destroyApp

public void destroyApp(boolean condition)

commandAction

public void commandAction(javax.microedition.lcdui.Command c,
                          javax.microedition.lcdui.Displayable s)
Specified by:
commandAction in interface javax.microedition.lcdui.CommandListener

gotMeasurement

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

estimateUpdated

public void estimateUpdated(Tracker t,
                            Estimate e,
                            Measurement m)
Description copied from interface: EstimateListener
Implement this method to respond to updates from the Tracker(s) you are registered with.

Specified by:
estimateUpdated in interface EstimateListener
Parameters:
t - the Tracker producing the Estimate
e - the Estimate produced by the Tracker
m - the latest Measurement used by the Tracker to produce the Estimate

spotterExceptionThrown

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