source code is very small but it provides full range of GPS functions such as: detect, select, and parse NMEA sentences.
GPS listener and application control processes are running in 2 diffrent threads. This will allow realtime tracking GPS location while application can do other tasks.
source code does not use any third party library.
J2MEGPS source code template is used in VGPS - World's First and Only GPS application runs on any cell phone that can install java J2ME application. www.digitalmobilemap.com
J2MEGPS82 has 4 classes:
J2MEGPS82.java --> main midlet, this class handles the life cycle of the midlet (98 lines of code).
AppCanvas.java --> main canvas, this class handles and controls the canvas (894 lines of code).
AppForm.java --> application form, this class provides UI for setup and about form (85 lines of code).
BlueForm.java --> bluetooth form, this class
provides UI for detects BT devices and select BT GPS from the list
of detected BT devices (122 lines of code).
J2MEGPS179 has 3 classes:
J2MEGPS179.java --> main midlet, this class handles the life cycle of the midlet (193 lines of code).
AppCanvas.java --> main canvas, this class handles and controls the canvas (712 lines of code).
AppForm.java --> application form, this class provides UI for setup and about form (85 lines of code).
Screenshots:
Source code of BlueForm class of J2MEGPS82. This class uses DiscoveryListener to detect BT devices.
Source code comes with comprehensive descriptions, easy to understand and integrate with your own code.