This is an old revision of the document!
AGTEK Lib (henceforth called “Lib” for keyboard convenience) is a library of code to provide a repository of common functionality for Android and Java applications. While the potential exists for generic Java applications, the focus is currently Android, so using this Library in a generic Java application may require some effort (particularly repackaging, building proper build scripts, etc.) It's also possible that a generic Java platform library needs to exist separately from the Android lib. Generic Java would be usable in in Android, which Java Swing would not be (much like Android specific functionality). Note for future thoughts, split the library 3 ways (generic, Android Platform specific, Java Platform specific).
This document is intended to give the reader an overview, with some taste (via simple code snippets) of how pieces of the Lib are to be used. This documented is not intended document each class, member, or method. The Javadocs are to be used for detailed reference on call level documentation. All components of the Lib are required to be Javadoc'ed.
AGTEK Lib is a collection of different functional groups. Largely the groups are intended to be interoperable functional classes. It's possible that some functional groups are intraoperable, but that is not a design requirement for the Lib. It is envisioned that the Lib will grow, somewhat organically as the Android product suite expands. While inclusion of a new functional group is encouraged, a group must exhibit some of the following characteristics:
The following functional groups, organized by their major package are currently part of the Lib. A longer description of each group follows this section. Each section may include links other pages discussing the architecture of the functionality or how to extend it.
The Android LocationManager interface isolates the application from the details of dealing with the built in Location Provider devices. Android currently support approximately three different providers; built in GPS, computed locations (based on WIFI & Cell Tower), and mock locations. Only the first two provide semi-reliable location information for applications, while the “mock” device is only useful for application development.
The Android LocationManager doesn't currently allow the ability to extend or add providers for additional devices, a key AGTEK requirement. The AGTEK LocationManager was designed with following goals in mind:
The Android LocationManager provides many interface methods for working with testing, development, and “normal” use. Our approach is to treat all of these factors the same. Testing and development all provide locations through the same interfaces as the “normal” devices.
To be informed of location changes, an application must implement the Locations listener interface;
import android.location.LocationListener;
public MyClass implements LocationListener
{
public void onLocationChanged(Location location)
{
/* Do something useful */
}
}