Java-Gaming.org    
Featured games (78)
games approved by the League of Dukes
Games in Showcase (429)
Games in Android Showcase (89)
games submitted by our members
Games in WIP (466)
games currently in development
News: Read the Java Gaming Resources, or peek at the official Java tutorials
 
    Home     Help   Search   Login   Register   
Pages: [1] 2
  ignore  |  Print  
  O2X2 fullscreen + softkeys  (Read 7582 times)
0 Members and 1 Guest are viewing this topic.
Offline Abuse

JGO Coder


Medals: 10


falling into the abyss of reality


« Posted 2004-11-21 09:32:45 »

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 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)

Make Elite IV:Dangerous happen! Pledge your backing at KICKSTARTER here! https://dl.dropbox.com/u/54785909/EliteIVsmaller.png
Offline Abuse

JGO Coder


Medals: 10


falling into the abyss of reality


« Reply #1 - Posted 2004-11-24 18:54:44 »

yay, I've solved it  Grin

Its a rather suprising solution ^_^

Make Elite IV:Dangerous happen! Pledge your backing at KICKSTARTER here! https://dl.dropbox.com/u/54785909/EliteIVsmaller.png
Offline Matzon

JGO Knight


Medals: 19
Projects: 1


I'm gonna wring your pants!


« Reply #2 - Posted 2004-11-25 05:38:59 »

Mind telling what the solution is? ...

Games published by our own members! Check 'em out!
Legends of Yore - The Casual Retro Roguelike
Offline Abuse

JGO Coder


Medals: 10


falling into the abyss of reality


« Reply #3 - Posted 2004-11-25 09:59:53 »

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

Make Elite IV:Dangerous happen! Pledge your backing at KICKSTARTER here! https://dl.dropbox.com/u/54785909/EliteIVsmaller.png
Offline shmoove

Junior Member




Doh!


« Reply #4 - Posted 2004-11-25 12:50:52 »

Heisenberg would approve of this thread.

shmoove
Offline Abuse

JGO Coder


Medals: 10


falling into the abyss of reality


« Reply #5 - Posted 2004-11-25 14:27:47 »

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 **** Sad

Make Elite IV:Dangerous happen! Pledge your backing at KICKSTARTER here! https://dl.dropbox.com/u/54785909/EliteIVsmaller.png
Offline Abuse

JGO Coder


Medals: 10


falling into the abyss of reality


« Reply #6 - Posted 2005-01-26 12:36:32 »

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.

Make Elite IV:Dangerous happen! Pledge your backing at KICKSTARTER here! https://dl.dropbox.com/u/54785909/EliteIVsmaller.png
Offline qosmin

Innocent Bystander




Java games rock!


« Reply #7 - Posted 2005-02-14 07:39:12 »

hi!
how can i play sounds on O2X2 ?
thanks

john tchuvahtz
Offline Abuse

JGO Coder


Medals: 10


falling into the abyss of reality


« Reply #8 - Posted 2005-02-14 08:12:35 »

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)

Make Elite IV:Dangerous happen! Pledge your backing at KICKSTARTER here! https://dl.dropbox.com/u/54785909/EliteIVsmaller.png
Offline vlad

Innocent Bystander




Java games rock!


« Reply #9 - Posted 2005-02-14 10:47:59 »

Hi!

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

Thanx
Games published by our own members! Check 'em out!
Legends of Yore - The Casual Retro Roguelike
Offline skeeve

Junior Newbie




Java games rock!


« Reply #10 - Posted 2005-02-27 12:16:01 »

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.

Offline skeeve

Junior Newbie




Java games rock!


« Reply #11 - Posted 2005-02-27 12:17:58 »

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 ;-)
Offline Abuse

JGO Coder


Medals: 10


falling into the abyss of reality


« Reply #12 - Posted 2005-02-27 13:26:09 »

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 ;-)


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 :|
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 Angry

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.

Make Elite IV:Dangerous happen! Pledge your backing at KICKSTARTER here! https://dl.dropbox.com/u/54785909/EliteIVsmaller.png
Offline skeeve

Junior Newbie




Java games rock!


« Reply #13 - Posted 2005-02-27 14:04:34 »

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.

Offline Abuse

JGO Coder


Medals: 10


falling into the abyss of reality


« Reply #14 - Posted 2005-02-27 15:27:52 »

We got ours through a company we contract to (mentioning no names, its a large American 'global wireless publisher' Wink)
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 Grin

Make Elite IV:Dangerous happen! Pledge your backing at KICKSTARTER here! https://dl.dropbox.com/u/54785909/EliteIVsmaller.png
Offline sarirodord

Senior Newbie





« Reply #15 - Posted 2005-09-28 12:22:08 »

We got ours through a company we contract to (mentioning no names, its a large American 'global wireless publisher' Wink)
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 Grin

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

JGO Coder


Medals: 10


falling into the abyss of reality


« Reply #16 - Posted 2005-09-28 13:50:32 »

The forums have a PM facility.

Make Elite IV:Dangerous happen! Pledge your backing at KICKSTARTER here! https://dl.dropbox.com/u/54785909/EliteIVsmaller.png
Offline Anon666

Junior Member




aka Abuse/AbU5e/TehJumpingJawa


« Reply #17 - Posted 2005-09-28 16:54:23 »

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)

'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.........
Offline sarirodord

Senior Newbie





« Reply #18 - Posted 2005-09-29 14:05:38 »

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

Senior Newbie





« Reply #19 - Posted 2005-09-29 14:44:37 »

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){
} ?
Offline Anon666

Junior Member




aka Abuse/AbU5e/TehJumpingJawa


« Reply #20 - Posted 2005-09-29 19:18:52 »

If I were making a lightweight API, I would leave out the 'String filename' constructor.
Offline sarirodord

Senior Newbie





« Reply #21 - Posted 2005-09-30 09:39:43 »

My exact question is: the constructor has only one parameter? Is it for sure that it works with mmf file type?
Offline Anon666

Junior Member




aka Abuse/AbU5e/TehJumpingJawa


« Reply #22 - Posted 2005-09-30 11:03:52 »

My exact question is: the constructor has only one parameter? Is it for sure that it works with mmf file type?

yes, yes.
Offline sarirodord

Senior Newbie





« Reply #23 - Posted 2005-09-30 13:38:35 »

This can't be, I tried it this way and it gives me an "unexpected error" on the phone, and the byte[] is created correctly cause I verified it.
Offline sarirodord

Senior Newbie





« Reply #24 - Posted 2005-09-30 14:09:00 »

I think the play(int) function is the problem; I didn't call it now and it didn't show the "unexpected error" anymore.
Offline Anon666

Junior Member




aka Abuse/AbU5e/TehJumpingJawa


« Reply #25 - Posted 2005-09-30 14:39:45 »

hmm, perhaps a boolean return type to indicate if the playback was successful or not would be useful Grin (sorry :S)

boolean play(int loop)

loop==0, play once
loop!=0, loop forever
Offline sarirodord

Senior Newbie





« Reply #26 - Posted 2005-09-30 14:56:22 »

10X, I'll see if it works this way Smiley
Offline sarirodord

Senior Newbie





« Reply #27 - Posted 2005-09-30 15:32:01 »

YEEEEYYYY
Thanks a lot man, you made a man happy to heaven  Smiley Smiley Smiley
Offline sarirodord

Senior Newbie





« Reply #28 - Posted 2005-09-30 16:17:58 »

Would a BenQ phone get upset if I asked too many questions??? Cause I'd also like to find out if it has a method for full screen work, with the possibility of still being able to use the soft keys.
Offline sarirodord

Senior Newbie





« Reply #29 - Posted 2005-10-30 17:52:57 »

I work on a game and it throws this exception when calling RecordStore.openRecordStore(filename, true): javax.microedition.rms.RecordStoreException: error opening record store file.
Could anyone tell me how to resolve this problem please? I need an answer really urgent!!!  Undecided
Pages: [1] 2
  ignore  |  Print  
 
 
You cannot reply to this message, because it is very, very old.

 

Add your game by posting it in the WIP section,
or publish it in Showcase.

The first screenshot will be displayed as a thumbnail.

xsi3rr4x (80 views)
2014-04-15 18:08:23

BurntPizza (72 views)
2014-04-15 03:46:01

UprightPath (83 views)
2014-04-14 17:39:50

UprightPath (67 views)
2014-04-14 17:35:47

Porlus (83 views)
2014-04-14 15:48:38

tom_mai78101 (107 views)
2014-04-10 04:04:31

BurntPizza (167 views)
2014-04-08 23:06:04

tom_mai78101 (263 views)
2014-04-05 13:34:39

trollwarrior1 (213 views)
2014-04-04 12:06:45

CJLetsGame (222 views)
2014-04-01 02:16:10
List of Learning Resources
by SHC
2014-04-18 03:17:39

List of Learning Resources
by Longarmx
2014-04-08 03:14:44

Good Examples
by matheus23
2014-04-05 13:51:37

Good Examples
by Grunnt
2014-04-03 15:48:46

Good Examples
by Grunnt
2014-04-03 15:48:37

Good Examples
by matheus23
2014-04-01 18:40:51

Good Examples
by matheus23
2014-04-01 18:40:34

Anonymous/Local/Inner class gotchas
by Roquen
2014-03-11 15:22:30
java-gaming.org is not responsible for the content posted by its members, including references to external websites, and other references that may or may not have a relation with our primarily gaming and game production oriented community. inquiries and complaints can be sent via email to the info‑account of the company managing the website of java‑gaming.org
Powered by MySQL Powered by PHP Powered by SMF 1.1.18 | SMF © 2013, Simple Machines | Managed by Enhanced Four Valid XHTML 1.0! Valid CSS!