wood burning stoves 2.0*
The moose likes Java Micro Edition and the fly likes Blackberry Trackball Help Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Murach's Java Servlets and JSP this week in the Servlets forum!
JavaRanch » Java Forums » Mobile » Java Micro Edition
Bookmark "Blackberry Trackball Help" Watch "Blackberry Trackball Help" New topic
Author

Blackberry Trackball Help

Keith Fox
Greenhorn

Joined: Jan 10, 2010
Posts: 2
First, I have already searched the previous posts with no luck.

I am new to J2ME programming.

My program runs without errors on the blackberry "actual phone", as well as several other phone emulators.


My problem lies with receiving input from the trackball.

I've scoured the web trying to find information about this, and am only more confused.

I am trying to stay away from any RIM-specific API's so the game is more portable.


I found information stating I have to capture the input from the GameCanvas or Canvas "LEFT, RIGHT, UP, DOWN". There is also supposed to be a way to capture the trackball being pressed without the RIM-specific API's.

Can anyone give me a code snippet that basically shows how to do this working off of "javax.microedition.lcdui.game.GameCanvas;"?


Thanks in advance,
Keith
Tim Holloway
Saloon Keeper

Joined: Jun 25, 2001
Posts: 15951
    
  19

I don't think a trackball is an expected standard control in J2ME. You may be stuck with using RIM-specific stuff. Of course, since a trackball can be represented as an HID device firing off a limited set of events, there might be a standard set of input events that it maps to. But to know for sure, I'd have to Google for it, and I wouldn't want to deprive you of the challenge of doing that yourself!


Customer surveys are for companies who didn't pay proper attention to begin with.
Keith Fox
Greenhorn

Joined: Jan 10, 2010
Posts: 2
"I've scoured the web trying to find information about this, and am only more confused."

I google'd for this for several hours actually. I found information that it "could" be done, but never any actual code listings.

I will probably go ahead and use the RIM API's. I figure I can design the program in both versions side-by-side in Netbeans for standard J2ME and eclipse for BB specifically, RIM decided support the Eclipse JDE over Netbeans for some reason.


Sincerely,
Keith Fox
 
It is sorta covered in the JavaRanch Style Guide.
 
subject: Blackberry Trackball Help
 
Similar Threads
Problem with testing my j2me application on blackberry
Set Focus to multiple fields?
This weeks book give away: Please welcome James White and David Hemphill!!
help locating java.sql
Blackberry dev forum