my dog learned polymorphism*
The moose likes Java Micro Edition and the fly likes Best solution 4 user-input Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Android Security Essentials Live Lessons this week in the Android forum!
JavaRanch » Java Forums » Mobile » Java Micro Edition
Bookmark "Best solution 4 user-input" Watch "Best solution 4 user-input" New topic
Author

Best solution 4 user-input

Mike Cole
Ranch Hand

Joined: Sep 25, 2006
Posts: 38
Hi all,
ive made a little game for my mobile. I have a splash screen, where i want the user to click one of the softbuttons or a number or the fire-button.
While this all works fine in the emulator, it does not on the device itself.
What would be the best solution that works on any device?
uhm...
The SplashScreen extends GameCanvas...
And is switched to full screen...

Thnx in advance!
[ June 03, 2007: Message edited by: Mike Cole ]
Joao Eduardo Galli
Greenhorn

Joined: May 02, 2007
Posts: 6
Hi Mike,

I've already made some games for fun, and some components for form use, I know what's your problem and maybe it's too hard to say that there isn't a simple solution, but I will stay with this opinion right now. My suggestion is that you can test your cellphone with a simple application, make a Canvas that prints on the screen what code you get in the method keyPressed(int code) when you press the button you want to use. Normally we use that code with the method getGameAction(int code) to get the button pressed in game defaults, but maybe this last method is not recognizing your button as a game button even if the keyPressed() method is being called.
Well, if keyPressed() is being called you can simply use the code to identify the action in the game. This problem is common because of various implementations from brand to brand or model to model in a single brand.


You can search for your phone specification or others in this next site, click on the cellphone you want an then go to the end of the page to see which buttons are recognized by Java.
http://www.club-java.com/TastePhone/J2ME/MIDP_Benchmark.jsp?l=en
 
jQuery in Action, 2nd edition
 
subject: Best solution 4 user-input
 
Similar Threads
Screen meshing into main screen
Producing Virtual Keypad on Custom Items
Problem in Device Descovery via Bluetooth
Android User Interface Development - Is it easier/ harder than Blackberry UI development?
Porting