Skip to main content

JSR-179 (Location API)

7 replies [Last post]
fommil
Offline
Joined: 2006-11-26

Hello everyone,

I am working on a LGPL reference implementation of the JSR-179 (Location API) and would love to contribute my work to this project! How do I go about committing my work?

Some other related questions/comments:-

- I am on OS X, so the only J2ME SDK I have is the MPowerPlayer one, which is not open source... but is pure java. When should I expect PhoneME to work on the mac? I guess my question really is, *why the hell isn't PhoneME written in pure Java*?

- I'd really love to get my hands on a test suite for JSR-179, I'm currently making my own and also comparing with the Nokia reference implementation (the only other implementation I could find, and it's proprietory).

- I don't have a GPRS on my iBook, but I don't think that should be a necessity anyway. I'm going to have a choice of hardcoded/lookup/stochastic location reported by this implementation. If anyone knows how to actually interface with GPRS devices in Java, I'd love to hear from you.

- I might add in some landmarks, but the spec has footprint sizes and I'd hate to break them.

- I might also implement the nokia extensions to this spec if there is enough support.

- Gimme a few days to brush it up for public scrutiny :-)

- Wow... this GPLing of Java just totally passed me by. Must have been distracted. Awesome stuff!

Reply viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.
terrencebarr
Offline
Joined: 2004-03-04

Hi again,

I discussed your project with Roger Brinkley, the community leader. He'll get in touch with you regarding how to proceed.

Cheers,

-- Terrence

fommil
Offline
Joined: 2006-11-26

Hi Terrence,

I've not heard from Roger... is he busy at the moment and not been able to see to this? In the meantime, I have actually almost finished. I implemented the store as RMS... which means that most SecurityExceptions for read operations are actually reported as IOExceptions but otherwise pretty compliant.

Regards,
Sam

kanke123
Offline
Joined: 2007-04-17

where is a code you posted?

terrencebarr
Offline
Joined: 2004-03-04

Hi,

Thanks for participating, glad you found us ;-)

I'll try to answer some OS X and contribution questions and let the phoneME experts answer on other details.

Question 1:

PhoneME feature is an implementation of Java ME CLDC/MIDP + optional JSRs designed to run on embedded devices, while phoneME advanced is CDC/FP + optional JSRs. Therefore, it has a lot of bits to map to native functionality on devices and to interface with the device operating system and infrastructure. For that reason it is impossible to make it "pure Java". Can we add more porting and abstraction layers to seperate the Java bits from the native stuff? Sure, we're going down that path but it takes time and effort.

MPowerPlayer is a commercial product which basically emulates CLDC/MIDP + some JSRs on top of Java SE. It is a very different animal and is very separate from the phoneME space. Plus, I am not even sure MPowerPlayer actually passes all TCKs (this is a must for all fully compatible and branded Java implementations).

Finally, Java ME development on OS X: For application development the gold standard is really Sun's WTK (or Netbeans Mobility, which is a layer on top of WTK). However, WTK contains native code so it currently is only released for Windows. And I agree with you here: "Why the hell is WTK not written in pure Java?". It could be, but there is native stuff for historical reasons.

You could use MPowerPlayer for application development but you'll miss many of the tools WTK offers so really the best advice I can give you is: Buy Parallels, install Windows, and run WTK that way. That's what I do and it works well and is a whole lot less effort than porting a WTK to OS X ;-)

Now, for development of JSRs this is a whole different story. To develop JSRs you need a platform implementation that allows you to add libraries to the classpath. phoneME targets are Windows and Linux so unless you want to contribute a OS X port you'll have to use one of those.

Question 2:

179 is a Nokia JSR and I believe the TCK is by Nokia, too. As such, you would have to license the TCK from Nokia. This is obviously a pretty high hurdle for an individual developer. We (Sun) are of course using the TCK for internal tests but we cannot make it available to the community because it is Nokia's IP. This is a situation we are facing with multiple JSRs (making them available for community testing) and we are working the issue. Not sure when we can give an answer.

Contributing in general:

See the following FAQ/forum thread for how to contribute:
http://forums.java.net/jive/thread.jspa?threadID=20392&tstart=0

Please be aware that since your 179 implementation would go into the phoneME project you would need to sign a Sun Contributor Agreement (see section "How to I contribute" in the FAQ).

Thanks for the kind words on GPL'ing Java. I too am very excited about this ... lots of new opportunities for everyone.

Cheers,

-- Terrence

Terrence Barr
Evangelist, Java Mobile & Embedded Community
Sun Microsystems, Germany
www.mobileandembedded.org

fommil
Offline
Joined: 2006-11-26

Terrence,

I have now started the project http://lapi.dev.java.net/ on Java.net. I hope to get approval soon so that I can start to upload my code. It is about 60-70% finished.

I'd like to request help for the project... I have a set of JUnit tests, but it's horribly biased since I've written them all and there may be things I didn't account for. I'd love it if people could contribute tests, tests, and more tests. :-)

I made it LGPL, but what would you prefer for PhoneME? I'm open to suggestions. Didn't want to make it too restrictive by going GPL.

Also, I'd like some help integrating this to work for PhoneME. Specifically, there is a class for persistent storage of some data, is there a persistent store library for PhoneME yet? Or, possibly more appropriate, what are the I/O libs I should use?

I ask because although PhoneME may have access to J2SE, it may be the case that any JSRs must restrict themselves to use the J2ME libraries. I'd appreciate some clarification on that please.

Kind regards,
Samuel Halliday

aap031
Offline
Joined: 2006-10-18

Hi Samuel!

Sorry I cannot comment over legal portion of your posting, let Terrence do that.

As what to persistence - you have two options - you can use RMS or FileConnection part of JSR 75. Both of these are part of MR1 (to get JSR75 implementation you need to download source bundle of MR1). Both of them use PCSL file module which is bound to OS file service. Linux version is POSIX-based and win32 uses win32 File API

Actually as phoneME product is targeted to be run on embedded devices so it cannot rely on J2SE. However sometimes for the purpose of providing emulation environment it's possible, yet there are no places where it's used. Any JSR implementation is either uses core functionality (I mean midp component) or another JSR or defines it's own porting interface. Implementation of this porting interface is free to be bound to OS, contain emulation engine or use 3rd part library. However in the latter case there are legal restrictions which can apply to such implementation, so please be careful

Regards,
Andrey

fommil
Offline
Joined: 2006-11-26

That's great feedback... I think I'll make this implementation use pure J2ME libs. That way it could also be used as a starting point for anybody wanting to implement JSR-179 on their location-aware device.

Also, I was thinking that it might be a good idea (phase 2) to allow entering a "path" into a logfile, to emulate a moving device. That might be a good test of the use of LocationListener... because there are many situations it can fail.

Can't wait for the project to be approved so I can upload...