• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Blackberry Trackball Help

 
Keith Fox
Greenhorn
Posts: 2
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 18359
56
Android Eclipse IDE Linux
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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!
 
Keith Fox
Greenhorn
Posts: 2
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
"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
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic