O2X2 fullscreen + softkeys

1st off, this is what I already know :-

The O2X2 is MIDP1.0.
However, it also implements the MIDP2.0 method setFullscreenMode(boolean).

The O2X2 does not report keyCodes for the softkeys in either normal or fullscreen mode.
Therefor, Commands must be added to a Canvas if you wish to listen for soft key presses.

The O2X2 has a peculiar way of arranging Commands. The exact logic behind how it arranges the Commands is somewhat complicated.
However it can be summarised as :-
When showing just 1 Command, you can forcefully make it appear on either the left or right soft key.
When showing 2 Commands, you can have them either :-

  1. Appear 1 on the left & 1 on the right softkey
  2. both on the right softkey (in the form of a pop-up menu).

In normal mode, adding Commands isn’t an issue.

However, my problem lies when I add Command[s] in fullscreen mode.

Regardless of whether I add 1 or 2 Commands, they always* appear in a pop-up menu on the right side.

So, my question is, has any1 managed to get fullscreen + 1 Command (or even better 2 Commands!) to work without the pop-up menu on the O2X2?

(always* - This isn’t entirely true, as I have managed to get fullscreen + 1 Command without the pop-up menu to work once. However, this was a 1 off anomoly I havn’t managed to replicate :S)

yay, I’ve solved it ;D

Its a rather suprising solution :slight_smile:

Mind telling what the solution is? …

gah, I was premature.

I managed to make a build that worked, I then changed 1 line of completely unrelated code, and it stopped working.

Changed the code back again, and it still doesn’t work :S

/me has finished pulling his hair out …

The only thing that has changed, is the time of day, and the battery level :S

Heisenberg would approve of this thread.

shmoove

Incase you need an avenue of exploration to try and fix this issue yourself.

My initial success was though a Threading issue.

By removing all yield/sleeps from the game loop, I managed to prevent the popup menu from being displayed.

I presume this was because whatever thread that was managing the popup, was being starved of time by the main thread, and subsequently being cancelled because it took too long to execute.

However, this starvation also made the key event delivery thread lag as well.
To fix this lag, I tried changing the priority of the main thread, and thats what caused the popup menus to come back - since then, i’ve not managed to repeat my success =|

Very peculiar, and even more frustrating as I realy need the fullscreen area, but the popup menu looks **** :frowning:

update. I solved this a few days ago.

Actually, to be more specific I found the cause of the problem - there is no ideal solution =(

The cause appears to be if you run a Java app. that makes use of ‘some feature’ then it causes all future executed java apps. to completely ignore the very 1st Command added to a Canvas. (until the phone is rebooted)

I’m unsure of exactly what feature it is that has this effect. but the built-in game mobimon quite regularly causes the error to appear.

hi!
how can i play sounds on O2X2 ?
thanks

john tchuvahtz

There is an O2X2 SDK, but I don’t know if it has been publicly released yet.

The API is provided by “iaSolution Corp.”, and the package name is “com.benq.ext”, so maybe you can find it yourself with google.
(You may have to email a few ppl)

Hi!

Can anybody help me with a code example for playing sounds on O2X2?

Thanx

Not possible I’m afraid

I trawled the SDK (I couldn’t possibly say I decompiled it) - and there’s actually a naughty little call “suppressSoftKeys(boolean)” or similar that’s activated when in fullscreen mode.

I fiddled around with various dummy menu options but came to the conclusion that the only safe thing to do is abuse the “*” and “#” keys as the softkeys.

If you’re very nice I can provide you with some api details. (We originated the SDK for O2).

I can’t distro the SDK I’m afraid but can give some hints :wink:

[quote]If you’re very nice I can provide you with some api details. (We originated the SDK for O2).

I can’t distro the SDK I’m afraid but can give some hints :wink:
[/quote]
Fortunately, I already have it, however I can’t distro it either =(

I’d love to know the logic behind keeping the API top secret :expressionless:
The O2X2 is already a shitty handset, its crazy that O2 are effectively hiding the API extensions, so any content for the phone is unnecessarily shit >:(

Perhaps its a licensing issue - the O2X2 API is a completely bastardized version of MIDP1, tonnes of methods added to where they shouldn’t be.

As far as I could make out (esp looking at the ext api) they’ve got a halfway house to MIDP2.0 there

To be fair on O2 its not then keeping the SDK secret - they didn’t even know there was an SDK. Even worse Benq didn’t know one existed - or if they did they deliberately hid it. We pestered their guys in Holland for ages and they came up with nothing).

I’m not sure where you got yours (not a Macrospace guy are you ?) but we obtained ours through some Chinese guys who know the people at Benq very well.

We have given O2 the SDK - but only on the understanding that they get permission from Benq to redistro - as the license afaics doesn’t permit that.

We got ours through a company we contract to (mentioning no names, its a large American ‘global wireless publisher’ ;))
They got hold of it direct from O2.

and no, I don’t work for Macrospace.

All very cloak and dagger, this staying anonymous business ;D

Dude, can you send me an e-mail on this adress: sarirodord@flash.ro, I want to ask you something, pls pls pls

The forums have a PM facility.

‘com.benq.ext’ ?

Nice package name.

If I were BenQ…

a) I would call my Vibration class ‘Vibration’ (with static methods perhaps looking like ‘void on()’ and ‘void off()’)
b) My BackLight class would be called ‘BackLight’, and have similar on & off static methods.
c) Volume control would ofcourse be achieved through a ‘VolumeController’ class, possibly with static methods such as ‘int getLevel()’, ‘boolean isMuted()’, ‘void setLevel(int)’, and ‘void setMute(boolean)’
d) I think Melody playback should be handled by a Melody class, with a constructor that takes an mmf file in the form of a byte[], and methods such as ‘void pause()’, ‘boolean play(int)’, ‘void resume()’, and ‘void stop()’

ofcourse, this is all completely hypothetical…

It would be truely miraculous if some stub classes made to match the above class/method definitions actually worked on a phone!

Maybe somebody without access to the API should give it a try…

Hey dude, Anon666, if u know more pls mail me at sarirodord@flash.ro

So let’s say you were a BenQ…
How exactly would be the Melody class’ constructor? Something like this:
public Melody(byte[] melody){
} ?
Could it also be a constructor like this:
public Melody(String mmf){
} ?