October 5, 2004 – 6:30 pm
(TO VIEW ALL RELATED POSTS, use the “sprintlbs” category below)
(Please see followup posts: #1 and #2)
DISCLAIMER: I have not tried any of this, so don’t blame me
For quite some time commercial cell phone carriers have been building in location based services (LBS) in comply with the E911 initiative. Unfortunatly, most carriers with exception of Nextel have not been making this information available for developers. After doing some research today, I think that for Sprint PCS this information is beginning to be available, albeit not publicized.
For a few years developers have been complaining to Sprint about lack of LBS support. If one goes through the developer forums at Sprint, it is full of nasty comments on lack of LBS support. However at the same time, Sprint has begun to offer two options for using LBS, but not making it very public yet:
1. J2ME / MIDP 2.0.
For phones that have MIDP 2.0, LBS services are available but restricted. All together four APIs are listed as restricted on Sprint’s developer site (go to “Market”, “Device Activation”). They are “LBS: Location Based Services”, “JSR-135 Mobile Media 1.1 API”, “JSR-120 Wireless Messaging 1.1 API” and “JSR-75 Personal information Management (PIM)”. To bypass the restriction two options are possible: either a $400 digital certificate from VeriSign OR disabling the restriction on specific phones via the developer site. The assumption is that if you manage to bypass the restrictions, the LBS API is open. Unfortunatly, on my Treo 600 this is not an option since PalmOne or IBM does not ship these APIs with their JVM. Hopefully when Sprint launches “Vision 2.0″ AKA MIDP 2.0, these will become available.
After browsing through Sprint PCS’s J2ME toolkit for MIDP 2.0, I came across the actual APIs that are used for this. Instead of using any of the proposed JSR APIs, Sprint chose to use Qualcomm’s Java Application Extensions (QJAE). Sprint’s toolkit does not include the actual API, but the documentation can be downloaded from Qualcomm’s site after filling in a licensing form. It includes one package called “com.qualcomm.qloc.gps” which contains the actual APIs for GPS. Sprint’s toolkit actually includes all of the GPS compiled class files in the “Emulator/lib/midp.zip” folder and the GPS simulator in “Emulator/bin/traveler”. Assuming you got around the restrictions mentioned above by deactiving your phone through the developer site, this API should be available. Make sure to check that your phone is MIDP 2.0 compliant.
2. Business Mobility Framework.
Sprint has also posted information on their developer site about the “Sprint Business Mobility Framework” (under “Developer Resources”). This framework is a set of web services that can be called with the phone number of a Sprint PCS subscriber and return location information. Of course, in order to do so access to the gateway is needed and that is something that only Sprint PCS can provide. Combine this with the web services kit for J2ME that IBM is working on, and it might be possible to use these directly from the phone.
UPDATE: If you will lucky enough, you can try out this small J2ME GPS testing utility I wrote. Another possible try is to press ##4771 (##GPS1) on your phone.
UPDATE #2: There was a small error in the GPS application. That has been fixed.
UPDATE #2: After getting an email from someone, I want to clarify the situation with the JVM provided by PalmOne for Treo handhelds. Yes, the JVM is MIDP v2.0 which should support GPS. However, running my testing program results in an exception “com.qualcomm.qjae.gps.GpsEventListener not found”. The reason for that is that PalmOne DOES NOT bundle the GPS classes with their JVM. I ran JAD on the classes included with the Sprint PCS emulator and found out that they require a native implementation OR an IP address of the a server on Sprint’s network. I suspect that most handhelds that DO support GPS come with the bundled native implementation. HOWEVER, if an IP address of the GPS server is obtained, then it would trivial to bundle the GPS classes from the emulator and use the API to manually set the IP address of the server.
UPDATE #3: Here is the source.
Posted in Programming | Comments Off