Thursday, February 19, 2009

LocateMe 1.1 Released - Free Java ME GPS Tracking Software

UPDATE: LocateMe 1.1 has been updated and renamed to FollowMe 1.2

LocateMe - Free open source GPS tracking software for MIDP 2.0 mobile phones.

This small (30-35K) application requires a mobile phone with an integrated GPS or a separate Bluetooth GPS and will show you the direction to a given location (a "target") without maps, using a pulsing direction arrow. You can request the location of other LocateMe users by text message, send your own location, or just simply save a location for directions back to it later.

The Features:

* "Target" other LocateMe users' locations via a request text message
* Send your location to other LocateMe users via text message (can use your contacts list)
* Record your last location as a target
* View all the satellites around you on a "radar" style view
* Display RAW GPS data (suitable for testing)
* Connects to any mobile phone integrated GPS or Bluetooth GPS
* Saves your GPS and target settings between runs.

New Features for 1.1:

* Complete integrated GPS support (some features may not be available depending on phone GPS capability).
* Last known target direction shown when stationary (arrow stops pulsing when stationary and an accurate direction cannot be calculated due to GPS fix precision errors)
* Added a new option to invert display colours (you can choose depending on light)
* Fixed the speed error for bluetooth GPS knots to km/h - the value was off by 0.001 km/h per knot
* Fixed the speed bug for integrated GPS (would you believe - integrated GPS use metres/second, normal GPS use knots!)
* Added a warning before setting a new target
* Added support for viewing satellites positions using an integrated GPS (Bluetooth always could) but only if the phone can support this feature
* Moved "Target here" to "Target" which on most devices will now be at the top of the menu or centred
* Sats button is now "Satellites"
* Marquee time is 45 seconds before next reading shown
* Moved "Dist. to target" to start of marquee text
* Distance shown is in km when metres > 1000
* Removed the About menu item (it now shows (C) Silent Software in the marquee on first run)

For developers the fully commented source code is a good example of:

* Design patterns, i.e. lazy initialization, command, strategy patterns
* 2 Tier system
* How to use PushRegistry (JSR 118)
* How to use the Record Store (JSR 118)
* How to use Bluetooth (JSR 82)
* How to use Text Messaging (JSR 120)
* How to use the PIM (and hack to minimise the security notices - JSR 75)
* How to use the Location Based API (JSR 179 - Nokia lapi.jar included)
* How to use simple graphics (not using a Game Canvas however)
* How to multi thread effectively
* How to process raw NMEA GPS data
* Provide a basic understanding into Graphical and GPS trigonometry

Known Issues:

* The application is not security signed (this costs money!), so you will be shown numerous security popups when you start it.
* As your phone is not a compass the direction target arrow will only point to the correct direction once you start walking, and the phone can determine which way relative to North you are going, i.e. when you are stood still your phone doesn't know which direction you are facing! :) On startup, until the GPS gets an accurate fix, the direction arrow to the target will not be shown.
* On first run there can be some delay discovering the Bluetooth devices in busy areas (i.e. it may display "Waiting for GPS..." on first run for some time). This is down to the Bluetooth device discovery picking up a large number of devices and querying them. Once you have located your GPS, future connections to the GPS do not require this discovery period and will be relatively quick

This software has been tested on Nokia Series 40 3rd edition phones at a minimum resolution of 128x128 pixels and Sun WTK emulator at 240x320. It has also been successfully tested on a Nokia N95 and Nokia 6650 with integrated GPS'.

The software is licenced under the modified for UK Law CPL 1.0 licence which is included with the distributions.

Download for mobile phones with an integrated GPS
Download for mobile phones using a separate Bluetooth GPS
Download LocateMe source code (and full javadoc)

2 comments:

Anonymous said...

Hi,this is great source so i am going to compile it on netbeans 6.7 for Nokia 6600 seri 40 but i have a problem with the Location Based API (JSR179). your compiled jar file worked on this device correctly but the JAR which i compiled didn't work and give me exception on Location classes. please help me. thanks

Benjamin said...

If you have an integrated GPS in your phone remove the lapi.jar (location API) from your netbeans project - you don't need it as the API is built-in to the phone already. On phones without GPS the lapi.jar file provides utility classes for location manipulation which are ordinarily not available. To use lapi.jar on such phones you will need to obfuscate the lapi.jar when you compile your project or you will not be permitted to compile/install the app since the lapi.jar file has packages in the default Java namespace ("java.location" if I remember) and this is banned according to the Java specification. This will be the problem you have seen. Obfucating the code scrambles the jar so the namespace changes to something like "a.b" which is not recognised as being in the Java namespace. Hope this helps.