This is an old revision of the document!
The following pseudo-UML diagram details the basic structure of the LocationManager framework. The LocationManager framework is composed of the following classes:
The framework also provides the following devices and providers:
A LocationDevice provides a device Name (human readable) map to the Provider (via getProviderInstance() method). During normal operations, the Application/Activity asks the LocationManager for a list of known providers. The Application/Activity displays those to the user, or makes a choice (somehow). Once the LocationDevice is chosen, the Application then requests updates. The LocationManager will create and manage an instance of the LocationProvider, as needed. The application does not need to be involved in Provider management.
Adding new devices is relatively straight forward. For each new device you must write a new class to be the LocationDevice and write a new class to be the LocationProvider. It is up to the Device to perform detection and verification of the ohysical device, while the Provider is to provide the normalized location updates when they are made available via the physical device.
If the instrument being added is a Bluetooth device, the you should extend com.agtek.location.bluetooth.AbstractBluetoothDevice instead of the normal LocationDevice and the Provider should extend com.agtek.location.bluetooth.AbstractBluetoothProvider. These classes serve to combine common Bluetooth functionality and data needed across all Bluetooth devices.