Jump to content

Wherigo for J2ME


matejcik

Recommended Posts

Yes, it was talked about, and no, this is not a question.

 

This, in fact, is an information.

 

For some time now, i've been developing this little project i call OpenWIG. It is a J2ME application (midlet, if you wish) that you can run on your java-enabled cellphone.

(and a variety of other devices that support J2ME)

It plays Wherigo cartridges and it turns out to be already quite usable. Not yet as cool as the official player, and it can't play every cartridge properly ... but it can play many of them! ;e)

 

you can download it here.

 

As of now, the biggest shortcoming (and one that won't be fixed very soon) is that it can't save progress.

On the other hand, it does not crash even remotely as much as any of the official players :)

 

a little list of anticipated questions, complaints etc.:

 

- It doesn't work on my phone!

Too bad, i guess. Is your phone new enough? Check the specs: you need MIDP 2.0, CLDC 1.1 and support for JSR-75. Most phones in the last three years have all that, though.

Then, many of you american guys have weird operator-locked phones that won't work with any app that's not bought with cold hard cash from the operator. I can't help there - get your phone unlocked.

And if you are sure that your phone is OK, then perhaps the app is broken. Report a bug and i'll see what i can do to fix it.

 

- The thing keeps asking me about reading user data!

Yes, it does that. I'm sorry, but to fix this, i'd need a Java security certificate. Security certificates are expensive and i'm not buying one. So you'll have to be patient and always say Yes.

It should not ask anything during the game itself, if it does, please tell me.

 

- Cool, it seems to work, but ... which cartridge do i use? There is no "openwig" download available.

We have best results for PocketPC cartridges, as they seem to have the most features.

 

- It won't play my cartridge!

Well, too bad. It isn't official and it isn't perfect. If you want it to play your cartridge, you need to tell me about the problem (and, if possible, provide a source code for the cartridge).

 

- The images won't fit on my screen!

Your phone doesn't scale images automatically. All's not lost, though. Take your downloaded cartridge file and submit it to Wherigo Cartridge Optimizer[1]. Select your screen resolution and download an optimized cartridge with images that fit your phone perfectly.

Oh, and OpenWIG doesn't play sound yet. But it will in the upcoming version ;e)

([1] http://ati.land.cz/gps/Wherigo/ but with lowercase W. the forum won't let me write Wherigo uncapitalized...)

 

- Great, another player, completely new device to worry about, good job smartass :(

Um, no, you got it all wrong.

See, with the official players, if you hit a bug, there isn't really that much to do about it, except try to work around it.

On the other hand, my project is following something that already works. I can't expect to be successful if it works differently. So if you say "hey there, matejcik, when i do this and that, your java thingy acts all funky, when it should instead act sanely, cos that's what the official player does", then you have a pretty good chance that i will fix it and release a new version soon.

(then again, i can say that it's hard to fix and release a new version much later, but oh well. at least you had a chance)

 

there's an issue tracker for bugs you find, at http://code.google.com/p/openwig/issues/list . Don't worry about those foreign language bugs already in there ;e)

Link to comment

I had to check up on this before I could allow third party software on the Groundspeak Forum. The person participates with Earwigo, it's not for profit, and everything is legit.

 

I wanted to get this project the same status as Earwigo, but it's taking too long. I'm releasing this thread contingent on Groundspeak's future approval of this project.

 

Feel free, everyone, to play around with it and post what you think. Does this help the problems you have been experiencing with the official Player? Do tell!

Link to comment

Is there an OTA link for the application?

 

if by "OTA link" you mean "downloadable directly to phone", then here's one: http://openwig.googlecode.com/files/OpenWIG.jad

 

Tried it on a BlackBerry. Got 'PlayerListener.b' not found

 

that's strange. please try this version: http://openwig.googlecode.com/files/openwig-0.3.07a.zip

it's not obfuscated, so we might learn what exactly isn't found.

Link to comment

After an update of the Java Manager (Esmertec Jbed) on my HTC TyTN II (Kaiser) it seems to work:

I can start my own cartridge and the Wherigo tutorial successful. GREAT!

 

But I can't connect with my internal (and bluetooth) GPS. With the latest version of OpenWIG (0.3.07) I get the this error:

 

javax.microedition.io.ConnectionNotFoundException: Cannot create
comm,null;baudrate=9600

Link to comment

After an update of the Java Manager (Esmertec Jbed) on my HTC TyTN II (Kaiser) it seems to work:

I can start my own cartridge and the Wherigo tutorial successful. GREAT!

 

But I can't connect with my internal (and bluetooth) GPS. With the latest version of OpenWIG (0.3.07) I get the this error:

 

javax.microedition.io.ConnectionNotFoundException: Cannot create
comm,null;baudrate=9600

 

hi,

did you specify which serial port to use in Options? there's a "choose" button below the gps type selection, you have to choose a port before attempting to connect.

 

also, i'm curious, which version of Jbed did you use? i had somebody try it before on Kaiser, and there was no option of selecting the serial connection.

Link to comment

Error starting OpenWIG: Symbol 'PlayerListener.metatable' not found.

 

hm, this looks as if the blackberry converter messed it up.

it would be interesting if somebody could compile it directly with the BlackBerry JDE - i have no experience with it and it's windows-only anyway.

 

please try this version:

http://openwig.googlecode.com/files/openwig-0.3.07b.zip

it should work around this problem - but i'm not sure that it will get very far

 

if there is somebody who has experience developing for blackberries, please contact me and we'll work it out together ;e)

Link to comment
hi,

did you specify which serial port to use in Options? there's a "choose" button below the gps type selection, you have to choose a port before attempting to connect.

Yes I specify port 4 for my internal GPSr and 8 for my bluetooth GPSr. Both gives the same error if I want to connect!

 

also, i'm curious, which version of Jbed did you use? i had somebody try it before on Kaiser, and there was no option of selecting the serial connection.

I use 'Esmertec Jbed 20080428.2.1'.

 

btw: The 'choose'-button works at me only in the latest version 0.3.07 (not in 0.3.06).

Link to comment

Error starting OpenWIG: Symbol 'PlayerListener.metatable' not found.

 

hm, this looks as if the blackberry converter messed it up.

it would be interesting if somebody could compile it directly with the BlackBerry JDE - i have no experience with it and it's windows-only anyway.

 

please try this version:

http://openwig.googlecode.com/files/openwig-0.3.07b.zip

it should work around this problem - but i'm not sure that it will get very far

 

if there is somebody who has experience developing for blackberries, please contact me and we'll work it out together ;e)

 

Same problem

Link to comment

both of you please try this newest variant: http://openwig.googlecode.com/files/openwig-0.3.07c.zip

 

Geinponem: i'm not sure that it will solve your problem, because the error message you gave me should not happen ;e) are you sure that it says "comm,null;baudrate=9600" and not "comm:null;baudrate=9600" ?

i discovered a bug with saving the connection method of choice, so please go to Options, choose a different method, save, then return and select serial port (and port number) again - but it's just a blind try

 

Keith Watson: this version creates a completely separate subclass of PlayerListener, so there should be no way "metatable" sneaks in.

but it is possible that there will be similar errors (Runnable.metatable comes to mind).

i'm googling around and it seems that some people have similar problems ... not sure how to fix it yet, only "success story" i found was when the guy in question had mismatched Blackberry JDE and OS versions

Link to comment

I checked > the error certainly is:

comm,null;baudrate=9600

 

With the new version I get some (for me) new screens with questions about a connection to '//localhost:8' before this error occurs:

 

javax.microedition.io.ConnectionNotFoundException

 

Isn't it necessary to make a bluetooth-connection with the GPS? In an older version I remember we could choose in the Options-menu for 'Bluetooth' as GPS-type.

Link to comment

I checked > the error certainly is:

comm,null;baudrate=9600

interesting indeed. i'll try to get me a HTC device and try it myself

 

With the new version I get some (for me) new screens with questions about a connection to '//localhost:8' before this error occurs:

 

javax.microedition.io.ConnectionNotFoundException

this actually makes at least some sense - did you unset and re-set to "serial" connection? try switching to Manual, going to GPS screen and back and then setting Serial again.

 

Isn't it necessary to make a bluetooth-connection with the GPS? In an older version I remember we could choose in the Options-menu for 'Bluetooth' as GPS-type.

Maybe, but that won't work from the midlet - Jbed doesn't implement the necessary APIs. This new version can detect that and doesn't show the bluetooth option when it can't be used anyway.

If your GPS is bluetooth, you need to set up a virtual COM port for it and connect through that.

(the fact that it doesn't work is another matter, though ;e) but i hope that i can fix it)

Link to comment

Getting Runnable.metatable not found this time.

Just as i thought. In that case, I'm sorry, but it won't work on a blackberry, not on your version anyway.

(i have this nasty habit of using builtin interfaces and inheritance together, and either the translator or the device can't cope.)

But as i said before, if you know about anybody with java-on-blackberry experience who's willing to help, let them contact me and we'll see what we can do.

Link to comment
did you unset and re-set to "serial" connection? try switching to Manual, going to GPS screen and back and then setting Serial again.

Yes I did, but the same error occurs

 

If your GPS is bluetooth, you need to set up a virtual COM port for it and connect through that.

(the fact that it doesn't work is another matter, though ;e) but i hope that i can fix it)

My virtual COM-port is 8. I use this BT-GPSr also for geocaching and with the Wherigo-player in combination with the Kaiser. I supose that I don't have to change those BT-COM-settings (?).

Perhaps it is necessary to make a connexion between the GPS and the Kaiser before I start OpenWIG? But how do I do that?

Link to comment

With the new version I get some (for me) new screens with questions about a connection to '//localhost:8' before this error occurs:

javax.microedition.io.ConnectionNotFoundException

wait a minute here.

 

you say that your virtual COM port is number 8, right?

this seems that you set the local socket port to 8, instead of the serial port. yes, the wording is a bit clumsy in that regard :e)

what the application should do is this:

 

1. when opening the options, you have an options list with the following options:

---

( ) Manual

(x) Serial port

( ) TCP Socket

---

below that should be a text:

Port: /something/ Choose...

 

2. switch to "TCP Socket", the text below should change:

Local port: 8 Choose...

 

3. click Choose, a text window input should come up and ask you to enter "Port number"

 

4. cancel the window, switch back to Serial port. make sure that the text changes, then click Choose. a window labeled "Serial ports" should come up and contain a list of your COM ports

 

5. select one of the ports from the list, make sure that the text is updated

 

6. if everything that i wrote here is true, go to GPS screen and try to connect again, the error should go away.

 

7. if something that i wrote is not true, which i'm afraid is the case, tell me how far you got and what happened :e)

 

thanks

Link to comment
hi,

did you specify which serial port to use in Options? there's a "choose" button below the gps type selection, you have to choose a port before attempting to connect.

Yes I specify port 4 for my internal GPSr and 8 for my bluetooth GPSr. Both gives the same error if I want to connect!

 

also, i'm curious, which version of Jbed did you use? i had somebody try it before on Kaiser, and there was no option of selecting the serial connection.

I use 'Esmertec Jbed 20080428.2.1'.

 

btw: The 'choose'-button works at me only in the latest version 0.3.07 (not in 0.3.06).

 

My experience on the HTC Touch using Esmertec JBed was that the Bluetooth and GPS functionality is not implemented yet for this JVM. It's promised later but I had to give up on mgmaps due to this limitation. There is a workaround using a third program and a TCP/IP socket to redirect the GPS to but this would mean that functionality has to be programmed into the Java app (to listen on TCP/IP for location info)

 

IBM's J9 has the functionality to connect to a GPS port but good luck finding THAT anywhere, and it doesn't have anywhere near the niceness of JBed's GUI.

 

But the official player should run on a Kaiser.... no?

Link to comment

 

1. when opening the options, you have an options list with the following options:

---

( ) Manual

(x) Serial port

( ) TCP Socket

---

 

Unfortunately, this is not what I see in the last version. On my Option-screen there is only a choise between 'Manual' and 'TCP Socket'. So I don't see 'Serial Port'.

 

In an older verion (0.3.06) I could choose between: 'Manual', 'Serial Port' and 'Bleutooth' (???) If I 'Choose' for 'Serial Port' (in that version) I get the following error:

No serial ports found!

Link to comment
My experience on the HTC Touch using Esmertec JBed was that the Bluetooth and GPS functionality is not implemented yet for this JVM.

Isn't there an alternatve for Esmertec JBed to install on mij Kaiser that wordks good with OpenWIG

 

But the official player should run on a Kaiser.... no?

Certainly, but I want also try this JAVA-version. If it words good I can try it also on my old Nokia.

Link to comment
Unfortunately, this is not what I see in the last version. On my Option-screen there is only a choise between 'Manual' and 'TCP Socket'. So I don't see 'Serial Port'.

that explains it.

as northernpenguin said above, you can't connect to bluetooth, internal nor serial GPS in Jbed.

what you need is a tcp redirector, you might try for example this one: http://linuxtechs.net/kruch/tb/forum/viewtopic.php?t=1331

(note that i don't own a PPC, i never tried this, so i can't help you set it up. but i think that you can find all answers in that forum)

with that, you will set up a redirection from your COM port to a local TCP/IP socket, and then input the TCP port number in openwig.

then it should work :e)

Link to comment

Getting access to the GPS (Internal, Serial or Bluetooth) on a typical HTC device is maddening through Java.

 

I have been successful in the past using IBM J9, but they've changed things and it's a bit more painful now. JBed *does* have a version that does GPS but I haven't seen it anywhere in the wild yet - perhaps in the future someone can extract a cab from a newer Java enabled device.

 

This thread specifically talks about using a product like GPSGate/GPSPort to feed data to mgmaps (which is a cool product in it's own regard!) There is a complete tutorial there as a download.

 

I have an HTC Touch (Windows Mobile 6.1) and I have been successful with the GPSPort program mentioned in matejcik's post. GPSGate costs money and has a few more toys but GPSPort is plenty fine.

Link to comment
The test with OpenWIG on my own Wherigo-cartridge was succesful. There was only one thing which did not work good: the screen with the Completion Code appeared only less then a second.
can you send me the log file?
Question: is it possible to instal OpenWIG on my old Nokia 6230 (I don't have a datacable or BT-dongle at the moment).
last time i checked, somebody was using it on nokia 6230, so it probably should work.

if you can connect to the internet from the phone, install from http://openwig.googlecode.com/files/OpenWIG.jad

Link to comment
can you send me the log file?

How do I do that? Does OpenWIG create a .gwl-file?

 

last time i checked, somebody was using it on nokia 6230, so it probably should work.

if you can connect to the internet from the phone, install from http://openwig.googlecode.com/files/OpenWIG.jad

 

It doesn't work on my Nokia 6230 yet. I get the following message:

 

Application error 

 

[and by details:]

 

No Class Def Found
Error
java/lang/NoClass
DefFoundError
ah:
javax/microedition
/location/Location
Listener

Link to comment
can you send me the log file?
How do I do that? Does OpenWIG create a .gwl-file?
yes, but it's not enabled by default, you have to check "enable logging" in options.

then it will create a log file, which is named (cartridge name).owl and it's quite similar to gwl.

 

It doesn't work on my Nokia 6230 yet. I get the following message:
okay, i'll get back to you on this, a friend has n6230 so i can test it myself
Link to comment
does work now, please try again

 

Wow! It almost works. I can connect with my BT GPSr now. Never thought that this would be possible on a Nokia 6230. But...

 

If I select 'Start' in the Main-menu I get immediately an other Application error:

 

No Class Def Found
Error
java/lang/NoClass
DefFoundError
javax/microedition
/io/file/FileSystem
Registry

 

So I can't browse to my cartridge.

Link to comment
Wow! It almost works. I can connect with my BT GPSr now. Never thought that this would be possible on a Nokia 6230. But...

 

If I select 'Start' in the Main-menu I get immediately an other Application error:

 

So I can't browse to my cartridge.

in that case, bad luck :e(

nokia 6230 does not have JSR-75 (filesystem API) (see here), so that will never work. i tested on 6230i, which has it, so i didn't run into this.

and it also has 128kB limit on JAR size, so you couldn't even stuff a cartridge inside the JAR (which was possible in the past and i might readd that option)

Link to comment

This is soooooo cool. I could install the original player but never got it working.

 

This runs, but I don't know what to do with it. Once I launch it, Quit works as expected, and Options allows me to set up my GPS. Have not been able to get a fix yet with my GPS in GPS mode. Will try more later. Start just gives me a blank screen. How do I tell it what cartridge to load? I don't see an options for that.

 

Thanks for this great effort!

Link to comment

This is soooooo cool. I could install the original player but never got it working.

 

This runs, but I don't know what to do with it. Once I launch it, Quit works as expected, and Options allows me to set up my GPS. Have not been able to get a fix yet with my GPS in GPS mode. Will try more later. Start just gives me a blank screen. How do I tell it what cartridge to load? I don't see an options for that.

 

Thanks for this great effort!

haha, well, not much to thank for if it doesn't work yet :)

what device is this? a cellphone, or some kind of PDA?

when you hit Start, you should see a file browser, then find your cartridge

Link to comment

 

haha, well, not much to thank for if it doesn't work yet :)

what device is this? a cellphone, or some kind of PDA?

when you hit Start, you should see a file browser, then find your cartridge

 

You still deserve thanks for several things...it goes farther than the official player, you respond quickly, you are providing source code, and you are making the effort. Kudos all around even if you do nothing more!

 

I am using a Mio C230 running MioPocket (basically a hacked auto GPS).

 

My GPS never did show a fix, even after many attempts outdoors, even though I had a fix through BeeLineGPS.

 

In GPS mode, the only options I have are Connect and Disconnect (and Navigate at the bottom). There is no way to get out of GPS mode.

 

When I hit Start, I see a blank screen except for Actions and Navigate.

Link to comment
I am using a Mio C230 running MioPocket (basically a hacked auto GPS).

 

My GPS never did show a fix, even after many attempts outdoors, even though I had a fix through BeeLineGPS.

 

In GPS mode, the only options I have are Connect and Disconnect (and Navigate at the bottom). There is no way to get out of GPS mode.

 

When I hit Start, I see a blank screen except for Actions and Navigate.

all this is officially Very Weird .

 

so. if i understand this correctly, it's a WinMobile-based device.

what midlet manager are you using?

what gps connection method?

"GPS mode" is the screen that you see when you click "GPS" from the main menu?

 

you should not see "Navigate" in any of the places you see it. unless that's a button from the device itself and not from OpenWIG.

nor should you see Actions on the Start screen. also there should be a Back button on all screens.

i can't imagine how that happened. that looks as if the application has fallen apart and been reassembled...

 

maybe try installing and using Esmertec Jbed midlet manager (northernpenguin posted a link few posts above)

Link to comment

Well, I agree it is weird. I will try to install the other java midlet manager. I'll try to find out what one is installed already.

 

I use internal GPS on serial port com 2.

 

I think Navigate and Action are parts of the midlet manager.

 

I never see a back button, unless it is hidden somewhere.

 

Will let you know more later.

Link to comment

if the "navigate" is part of the manager, maybe the Back button is hidden in it? what does it do when you click it?

same question for Actions.

 

about the GPS:

1. i assume you choose "Serial" in options and chose COM2 (or whatever it's called) via the "Choose" link.

i also assume that you use the latest version, 0.3.07

2. so when you click Connect in GPS screen, it shows "GPS: no fix" and no coordinates, right?

3. is it possible that you can't open the port with two applications at a time? did you try running openwig without BeelineGPS ?

 

about the blank screen after Start:

let's assume that the file browser process failed for some reason.

in that case, you should see a blank screen labeled "wait..." or maybe "file browser" (that is if the midlet manager shows screen labels) with two commands, "Select" (but that might be hidden, because it's an implicit command) and "Back" (see above ;e) ).

ALSO it's possible, that the listRoots method does not fail, but returns an empty list of roots. in that case, the screen label would be blank and you'd see no items. (is that the case? each screen should have a label - if you see labels (window titles?) normally, but not on this screen, then this is what happened)

i'll examine the code and whip up something that will report as many errors as possible

Link to comment

if the "navigate" is part of the manager, maybe the Back button is hidden in it? what does it do when you click it?

same question for Actions.

 

about the GPS:

1. i assume you choose "Serial" in options and chose COM2 (or whatever it's called) via the "Choose" link.

i also assume that you use the latest version, 0.3.07

2. so when you click Connect in GPS screen, it shows "GPS: no fix" and no coordinates, right?

3. is it possible that you can't open the port with two applications at a time? did you try running openwig without BeelineGPS ?

 

about the blank screen after Start:

let's assume that the file browser process failed for some reason.

in that case, you should see a blank screen labeled "wait..." or maybe "file browser" (that is if the midlet manager shows screen labels) with two commands, "Select" (but that might be hidden, because it's an implicit command) and "Back" (see above ;e) ).

ALSO it's possible, that the listRoots method does not fail, but returns an empty list of roots. in that case, the screen label would be blank and you'd see no items. (is that the case? each screen should have a label - if you see labels (window titles?) normally, but not on this screen, then this is what happened)

i'll examine the code and whip up something that will report as many errors as possible

 

Navigate and actions do nothing except for look "pressed" when I press them.

 

I'll try with one of the alternative Java managers and will report back either tomorrow or Monday.

 

Thanks for the effort.

 

All assumptions correct about GPS, and yes, tried it alone and with BeeLine

Link to comment

 

Navigate and actions do nothing except for look "pressed" when I press them.

 

I'll try with one of the alternative Java managers and will report back either tomorrow or Monday.

 

Thanks for the effort.

 

All assumptions correct about GPS, and yes, tried it alone and with BeeLine

 

Couple things to try to verify that GPS functionality works in your Java environment:

 

1) If you have data connection - fire up Google Maps (or Beeline) and leave it running. This will 'prime' the GPS and ensure Windows Mobile has started the hardware correctly. Some devices don't activate the GPS correctly without doing this.

 

2) Try a different Java program. Like FE Updater or Mobile GMaps to validate that your JVM is actually using the GPS. There's a bunch of GPS enabled Java apps out there. Not all require data connections.

 

3) If you're using JBed - make sure you use the one I linked to above --- The September 2008 build. Earlier ones DO NOT support the GPS stack at all.

Link to comment

This is definitely progress!! Much better than the "It only works on WiMo and the Colorado" that seems to be answer up until now.

 

I did the OTA install on my BlackBerry pearl (8130 from Sprint) about 20 minutes ago, so everything here is just initial impressions. I'm at work right now and inside a building, so I can't really test it. However, I was able to get enough of a GPS lock in the building that OpenWIG was able to tell me my coordinates once.

 

My initial nit is with navigation. This may be something that's BB specific, but it seems that for every action I want to take I have to click twice. For example, when it first comes up, I get a screen that says

  • Start
  • GPS
  • Options
  • Quit

I can roll my trackball and the selected option changes as expected, but when I click the trackball I get a menu that gives me choices of:

  • Select
  • Close
  • Copy

What I'd expect to happen at this point instead is that it would just automatically "Select" the choice I have highlighted. If I wanted the menu, I'd hit the Menu (or BlackBerry) key.

 

So anyway, I choose "Start" and browse to the .gwc file I downloaded (whereigo_player_tut.gwc) while clicking through the security warnings (I understand the why these are here and can live with it). (FYI: At this point, the "double click" issue mentioned above is still an issue.) The main screen that talks about the tutorial comes up fine (at least I assume it's fine, I've never seen Wherigo actually working!!) I doubletap to get it started. (Now I notice another BB specific nit... typically, on my phone if I hit the '9' key it's a page down for faster scrolling than rolling the trackball. Not that this is the first app I've used that violates this... in the gmail app that same key mutes the conversation... frustrating when what you really wanted to do was scroll!) So I read though a couple screens and get to the point where it wants me to put on the space suit. I select menu item of "Actions" that brings me to a screen that has one action defined. To me, it would have made more sense if the menu that came up gave me that one option. I click through a couple more screens and it wants me to move 50m. Now's where I have to stop because I don't have a reliable GPS signal in this building... I'll have to play more later.

 

I want to be very clear that I am not complaining on any of the nits I've mentioned above. OpenWIG has gotten me much, much, MUCH farther than anything else to date has with Wherigo on my BlackBerry. I wish I was a BB app developer so I could assist more... but I don't even know Java. Perhaps if nobody smarter than me pops out of the woodwork I can attempt to get the devel tools installed and learn some basic stuff.

Link to comment

This is definitely progress!! Much better than the "It only works on WiMo and the Colorado" that seems to be answer up until now.

 

I did the OTA install on my BlackBerry pearl (8130 from Sprint) about 20 minutes ago, so everything here is just initial impressions. I'm at work right now and inside a building, so I can't really test it. However, I was able to get enough of a GPS lock in the building that OpenWIG was able to tell me my coordinates once.

hi,

glad to hear that you made so much progress on a BlackBerry :huh: From Keith Watson's results, i didn't think it possible.

 

My initial nit is with navigation. This may be something that's BB specific, but it seems that for every action I want to take I have to click twice. For example, when it first comes up, I get a screen that says (...) What I'd expect to happen at this point instead is that it would just automatically "Select" the choice I have highlighted. If I wanted the menu, I'd hit the Menu (or BlackBerry) key.
Definitely BB specific, and i can't do anything about it too. See, there's a list of "Commands" associated with each screen - such as Select, Exit, Navigate, Actions, Back etc. - and it's the job of the midlet manager to assign those to device buttons. On a phone, the commands should be mapped to function buttons, and if there's too many of them, one of the buttons should say "More" and display a list of the remaining commands.

Apparently, BB does this differently, at least your model.

For the record, there are only two commands in the main menu: Select and Exit. "Copy" and "Close" must come from the midlet manager itself.

 

So anyway, I choose "Start" and browse to the .gwc file I downloaded (whereigo_player_tut.gwc) while clicking through the security warnings (I understand the why these are here and can live with it). (FYI: At this point, the "double click" issue mentioned above is still an issue.) The main screen that talks about the tutorial comes up fine (at least I assume it's fine, I've never seen Wherigo actually working!!) I doubletap to get it started. (Now I notice another BB specific nit... typically, on my phone if I hit the '9' key it's a page down for faster scrolling than rolling the trackball. Not that this is the first app I've used that violates this... in the gmail app that same key mutes the conversation... frustrating when what you really wanted to do was scroll!)
Again, not something i can help easily - if i wanted to read keypresses, i'd have to use "custom screens" and draw all GUI components myself. This way i'm using components of the native interface and letting the midlet manager do the hard work.

Which also means that there's some kind of a "bug" in it if it doesn't let you scroll down the way other BB apps do...

 

So I read though a couple screens and get to the point where it wants me to put on the space suit. I select menu item of "Actions" that brings me to a screen that has one action defined. To me, it would have made more sense if the menu that came up gave me that one option.
This is something I was not too sure about when I wrote it. There's a couple of different ways to approach the Actions thing, i chose to have a command called Actions which displays a list of available actions. It's no big deal on a phone, just one more click, but i see how that can be annoying if you have to double-click to do anything.

I might change it in the future, who knows :D

(if i ever switch to custom screens, i'll do this the way official Player does it, turn the actions into clickable buttons below item description)

 

I click through a couple more screens and it wants me to move 50m. Now's where I have to stop because I don't have a reliable GPS signal in this building... I'll have to play more later.
Please be aware that there's a known bug, the tutorial cartridge will display an error instead of the completion code. This will be fixed in the next version of OpenWIG, as soon as i get to it.

 

I want to be very clear that I am not complaining on any of the nits I've mentioned above. OpenWIG has gotten me much, much, MUCH farther than anything else to date has with Wherigo on my BlackBerry. I wish I was a BB app developer so I could assist more... but I don't even know Java. Perhaps if nobody smarter than me pops out of the woodwork I can attempt to get the devel tools installed and learn some basic stuff.
I'll be looking forward to that ;)
Link to comment

I'll be looking forward to that :)

Any help you can give somebody who has basically no Java experience but knows a fair amount of PHP/perl and a very little VB.net on where to start with this? I get the impression from above comments that there's some kind of a framework that you used to do the programming... where can I find more information about that? You made mention that the BB tools were Windows only and that gave you a problem so I assume you don't program on Windows. I have Ubuntu and CentOS installs of Linux available if the devel tools are on those platforms. I also have VMWare so I can can pretty much anything other than MacOS.

Link to comment

It's not really a "framework" in the PHP sense, it's a native J2ME API called lcdui. There are two ways to do UI in javaME: the so-called "high-level" lcdui, which gives you some basic display controls (lists, forms, checkboxes etc), and the "low-level" canvas, which just gives you an empty screen and drawing primitives.

 

if you're new to object-oriented programming, you'll have to read some java tutorial that would explain things like classes, interfaces, extending, inheritance ... some kind of general java introduction would probably be useful anyway, just to get familiar with how things work - the whole static types thing, distinction between primitives and object types, passing by reference, null pointers, exceptions ... VB.NET is the closest from your list, but not quite there.

you can continue with this nice tutorial (it's part 2 of a series, but the other three parts don't look too interesting)

http://today.java.net/pub/a/today/2005/05/03/midletUI.html

 

compiling the "normal" version is really straightforward in windows as well as in linux:

1. install NetBeans 6 or higher (i'm currently using 6.1, but it appears that 6.5 has been released already) with the Mobility pack.

you can choose the smallest download option (Java SE) and then install the "Mobility" and "Java ME CDC" components from tools->plugins menu

2. while you're there, make sure Subversion plugin is installed

i tried to run this on windows some time back and if i recall correctly, you have to install subversion client separately.

3. checkout the project. openwig's "Source" page is a good starting point.

you can as well install TortoiseSVN, checkout the project manually and then just open it in NetBeans.

4. click Compile (to build jar+jad) or Run (to start the emulator)

there, you're all done

 

the BB part is a little more interesting - mostly because i don't understand it very well :e)

everything i know about it, i learned from this article: http://developers.sun.com/mobility/midp/ar.../blackberrydev/

you have to install RIM Java Development Environment, somehow import the code into it and go from there.

the interesting part is that in addition to normal J2ME UI, BlackBerry has a completely different UI API which you can use. the proper way to go would probably be to rewrite the gui part of OpenWIG to use this instead of lcdui - it isn't that hard to do, but it ain't easy either, and i won't do it, because i don't have a blackberry and i don't want to spend much time in windows ;e)

 

when i last tried something with the JDE, i spent half hour importing files one-by-one, then did a directory tree list and copied it into the project definition file (which is fortunately human-editable) by hand ... and after that, i just couldn't manage to make the JDE compile anything, it always complained about not being able to find javac (the java compiler)

 

a little source guide:

the part you'll want to deal with is located in the package "gui".

central file is Midlet.java, it contains the midlet lifecycle code, screen switching logic and some utility functions.

MainMenu.java is the in-game main menu

ListOfStuff.java is the generic list of whatever (zones, actions, items, tasks). the others (Tasks, Actions, Things, Targets, Zones .java) are descendants that only fill it up, the gui code itself is mostly in the ListOfStuff

Dialog handles dialogs/messageboxes, Input does inputs, Details show details of task/thing/zone.

i guess you can catch up from there.

oh and comments are scarce :) sorry about that, i might be adding detailed documentation in the future ... but that's in the future :)

 

feel free to contact me with any questions, but preferably off-thread <_< i might set up a separate forum or a google group for this purpose, in case somebody else wanted to tinker with the code

Link to comment

Sorry, but I could use some help. I'd love to install & try on my Blackberry Curve 8310 but I'm having trouble. I've downloaded http://openwig.googlecode.com/files/openwig-0.3.07.zip, unzipped, and the application loader on my PC doesn't recognize anything to install.

Do I need to hit that link from the phone itself?

Looking forward to hearing back, and getting a chance to play!

Link to comment

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
×
×
  • Create New...