Author
Topic: Java/ J2ME mobile orbiter (Read 178953 times)

I did some tweaks to the JavaMO code a few days ago.* Changed image quality It seems that transferring a 100k + image over bluetooth takes too much time. Changing the image quality setting from 100 (png) to 30 radically improved responsiveness. Image size is now below 10k, and usually around 6k.* Added quite a bit of logging Trying to work out the mysterious crashes and malfunctions of the JavaMO on my phone, I added more logging to find out where the problem is.* Some more exception handling. Sometimes the JavaMO just quits on my phone. I suspect that some major unhandled exception causes this. I am trying to add handling and logging to work out this problem.* Added a explicit exit button to the media list, as my phone had no way of returning from the media list.

Still to do (from a stability perspective):* Debug the media list My phone shows no text for the audio list entries (the last entry has text), while other lists (pictures for instance) shows the texts correctly.* Debug the connection stuff, to find out what makes the MO crash and/or drop the connection.

I don't feel that I am finished by any means, but if someone is interested in testing this version of the JavaMO, I can put it up for download.Not sure if it will work on more phones, but the improvement in responsiveness might help a bit, and the extended logging might give us a better idea of what the problem might be.

I can also make a patch for the current SVN tree. Hari, can you comment on how (and when) you would like a patch?

I will continue working on the stability of the mo, and maybe some of the other issues mentioned here if I get the time. The repeated key presses might be the next thing on my list, but my primary goal is making it usable first. (What are the repeated key presses for anyway?)

br,sambuca

Im interesting in testing this new version.JavaMO is pretty stable on an SE P1i. No sudden crashes or so. At least not up until now.

You can download my modified version from http://hob.dyndns.org/javamo/. Just point your mobile browser to the JavaMO.jad file and it should download and install. Depending on your phone you will have to confirm the installation.

niz32, do you think the P1 is faster Java-wise than other phones? I think the Java speed might be a factor in the random crashes, since did not crash as much when it worked much better when I reduced image quality.

On a general note: This version does display more logging messages to start-up screen. While I probably will look into debugging my Sony Ericsson phone using a method similar to what hari described on the wiki, I think it might be useful to get some feedback from other phones without the users needing to set up any debugging.

You can download my modified version from http://hob.dyndns.org/javamo/. Just point your mobile browser to the JavaMO.jad file and it should download and install. Depending on your phone you will have to confirm the installation.

niz32, do you think the P1 is faster Java-wise than other phones? I think the Java speed might be a factor in the random crashes, since did not crash as much when it worked much better when I reduced image quality.

On a general note: This version does display more logging messages to start-up screen. While I probably will look into debugging my Sony Ericsson phone using a method similar to what hari described on the wiki, I think it might be useful to get some feedback from other phones without the users needing to set up any debugging.

Don´t know. Will get back to you on how its feeling now.Haven´t used it for several month, though.

It work pretty well now.Very responsive, compared to previous versions.

For a SE P1i there is no need to patch libBDCommon.so which is a big pro.

There are still problems with connecting to lmce from the phone.Sometimes it just not work (Waiting for connection).This problem have nothing to do with libBDCommon, patched or not.Have tried this before so. It is something else.

Things that do not work:* Media list only show text. Which is not to bad. Maybe that is the way forward and just add some graphics around it so it look nicer. Instead of shuffling images between phone and core.

*Pause/Play button do not work when playing video. (have not tested audio yet).

*Do not seem to reconnect to core if router is reloaded. However there is debug output when it happen (disconnect is shown on screen with some more text). This probably mean that javamo detect when it is offline so if we handle that...

There are still problems with connecting to lmce from the phone.Sometimes it just not work (Waiting for connection).This problem have nothing to do with libBDCommon, patched or not.Have tried this before so. It is something else.

Maybe the bluetooth_dongle log file can shed some light on this? As the JavaMO is just listening for incoming connections, I am not sure we can do anything to help the situation from this side.

Things that do not work:* Media list only show text. Which is not to bad. Maybe that is the way forward and just add some graphics around it so it look nicer. Instead of shuffling images between phone and core.

The media list uses the phones default list implementation, so there is limited possibilities to change it. This, I guess, is to save data transfer. But it is possible to use an image for each item in the list (a small image on the left of the text I think). This might require some changes to the bluetooth_dongle to send the images, and of course would require much more data transferred. Our best chance would be to first display the list, and them add images to the list as they are transferred. I fear this is too much work to implement and would be dead slow (my 600+ list of artists already takes 5 seconds + to display).

*Do not seem to reconnect to core if router is reloaded. However there is debug output when it happen (disconnect is shown on screen with some more text). This probably mean that javamo detect when it is offline so if we handle that...

Don't know if the JavaMO receives any notification about router reload. But anyway, I am trying to make it survive bluetooth reconnects, so this would probably help.

Another thing I remember that I changed in this version; Because the image transfer took so long, the screen saver kicks in, thus I wont see when the image was finally loaded. I added some code to flash the display to hopefully turn it on again. Let me know if it is for the better or worse.

Things that do not work:* Media list only show text. Which is not to bad. Maybe that is the way forward and just add some graphics around it so it look nicer. Instead of shuffling images between phone and core.

The media list uses the phones default list implementation, so there is limited possibilities to change it. This, I guess, is to save data transfer. But it is possible to use an image for each item in the list (a small image on the left of the text I think). This might require some changes to the bluetooth_dongle to send the images, and of course would require much more data transferred. Our best chance would be to first display the list, and them add images to the list as they are transferred. I fear this is too much work to implement and would be dead slow (my 600+ list of artists already takes 5 seconds + to display).

regarding TSCHAK datagrids will be rendered even by the Bluetooth_Dongle orbiter instance when they are bigger than one row. So this would be worth checking with the designer.

*Do not seem to reconnect to core if router is reloaded. However there is debug output when it happen (disconnect is shown on screen with some more text). This probably mean that javamo detect when it is offline so if we handle that...

Don't know if the JavaMO receives any notification about router reload. But anyway, I am trying to make it survive bluetooth reconnects, so this would probably help.

I fixed an exception regarding that lately. Bascially I tried to still send stuff when the socket was already down and did not catch the exception. Dunno if there is something else to fix, as I have not really tested this.

when clicking on any of the main items like lights, media etc.Everytime I back out back to main menu with C och if I click on the screen there is a big red F on top of media icon if that was the category I used last.

Playing audio I have manged to skip song twice.But havent figured out a way to reproduce. Button work sometimes and sometimes not.

hehe. Found a way to make it work now.I can skip songs by wating for the keylock to kick in. then unlock the phone.After that I can skip song one or two times.have to wait for the kelock to kick in again. And repeat.Above does not work all the time, around 85% of the times I try it work.

Question is. Can we disable the keylock from javamo when it is running?

I guess the phone you are using (SE P1?) has a touch screen, since your log reports mouse events. I haven't looked at the bluetooth dongle side of things (yet), so I can't really say why it only works sometimes. Maybe someone with more knowledge of the BD can comment? Or maybe anyone that uses another touch screen phone can try it out too?

Haven't had as much time to work on this as I would have liked, but I have looked into optimizing the performance more. Anyone who has done similar knows it can be a pain. Which is how it is now. There are some buffer copies in the code that I am trying to take out, but I must have messed up cause now it wont display anything any more. I'll keep looking. I hope to have it sorted out and cleaned up enough to make a patch for hari maybe next week.

hari, when you say that repeated keypresses are not implemented, is that in the JavaMO, or in the BD library?

I guess the phone you are using (SE P1?) has a touch screen, since your log reports mouse events. I haven't looked at the bluetooth dongle side of things (yet), so I can't really say why it only works sometimes. Maybe someone with more knowledge of the BD can comment? Or maybe anyone that uses another touch screen phone can try it out too?

I just report the mouse events back over BD when i receive them from the canvas.

Quote

hari, when you say that repeated keypresses are not implemented, is that in the JavaMO, or in the BD library?

in JavaMO, there are already "traces" of code for that. BD only wants one repeated event, but the canvas sends multiple as long as the key is pressed. This just needs to be filtered on the JavaMO side.

I'm a bit rusty as I havent touched java in about 1.5 years but did j2ee for 6+ so figured I'd play around a bit. I know hari is more or less too crunched to get more done on this but is sambuca working on it? If so could I get a copy of your current work set? Or the one for the last jad you did with the noted improvements...

I've not done much mobile development(mostly web stuff for me) but was wondering about a more robust system using maybe jsr75(which would mean probably only smart phones) to not only do logging but allow config files etc to be read/written.

last time when i've checked jsr075 support was not widely deployed. Plenty of mobiles support on device debugging, that is maybe the better approach. This should also help finishing the missing BD commands, they are not all handled.