03-24-2009 07:25 AM
Hi,
I need to convert some application (midlet) on BB, i have 2 problems:
1) how can i map the track ball? I can't use navigations as many of this application use command like repaint() , servicerepaint() etc.
2) And this is most important i see the key have really different keycode form other devices is there a sort of key table?
I need to convert it but i dunno why, i am not an "expert" on BB api.
Thanks
Aza
03-24-2009 07:35 AM
You want to implement your midlet in BB native or you jsut want to use Midlet on Bb devices. If you want to use midlet on BB devices tehn you need not to implement trackwheel navigation. device will take care of it as BB support midlets and for keyevents if your midlet is high level app then it will get keyevents automatically but if low level was there then you need to implement QWERTY keyboard
Press the kudos button to thank the user who helped you.
If your problem was get solved then please mark the thread as "Accepted solution".
03-24-2009 07:43 AM
Hi,
1. you might can use TrackwheelListener which is deprecated but hopefully still works.
UiApplication.getUiApplication().addTrackWheelList
2. Just map these using the Characters Class of BB Api!
net.rim.device.api.system.Characters
Regards,
Jochen
03-24-2009 07:46 AM - edited 03-24-2009 07:47 AM
Thanks for the answer.
I simply need to find a solution!! ![]()
I already did something like this, but trackwheel (or trackball i need to support 8800 and 9000 too) doesn't feel good (it's seem "lagging" ) and i have a game that use a sort of "combo" moves that's feel really hard to do it in this way.
My question is, there is a way to support trackball/wheel using a midlet application?
EDIT:
I saw now the other message!!
I used trackwheellistener but i received only up and down.. I need all the four directions.
Thanks
Aza
04-01-2009 06:55 AM
Azaratur - have you found a solution to the 'lagging'? I'm trying to do make use of the trackball in my MIDlet and it's very unresponsive. Thanks.
Chaim
04-01-2009 06:59 AM
No i didn't.
I mean maybe i found a better solution but trackball still not usable..
Unfortunately i am not working alone, probably my bosses will choose to skip bb devices.
Azaratur
04-02-2009 07:40 AM
Hi,
have a look into Canvas class of bb dev api documentation and Game Actions. Maybe usage of getGameActions might help?
Regards,
Jochen
04-02-2009 07:45 AM
Already did..
I need to let games avaiable on bb too, the main problem is the trackball not answer with precision.
Aza
01-31-2011 02:10 AM
in j2me we use joystick but in blackberry we use trackball. so how i maping that keypade??
public interface KEY
{
final static int NUM0 = (1 << 0);
final static int NUM1 = (1 << 1);
final static int NUM2 = (1 << 2);
final static int NUM3 = (1 << 3);
final static int NUM4 = (1 << 4);
final static int NUM5 = (1 << 5);
final static int NUM6 = (1 << 6);
final static int NUM7 = (1 << 7);
final static int NUM8 = (1 << 8);
final static int NUM9 = (1 << 9);
final static int UP = (1 << 10);
final static int DOWN = (1 << 11);
final static int LEFT = (1 << 12);
final static int RIGHT = (1 << 13);
final static int SELECT = (1 << 14);
final static int SOFT_L = (1 << 15);
final static int SOFT_R = (1 << 16);
// final static int SOFT_M = (1 << 17);
final static int STAR = (1 << 18);
final static int POUND = (1 << 19);
final static int CANCEL = (1 << 17);
final static int FIRE = SELECT | NUM5;
final static int MENU_UP = NUM2 | UP;
final static int MENU_DOWN = NUM8 | DOWN;
final static int MENU_LEFT = NUM4 | LEFT;
final static int MENU_RIGHT = NUM6 | RIGHT;
//final static int MyUP =(1<<10) | NUM2;
}
this is one key class of my j2me application. what should i do for blackberry key mapping??
help me friends.
thanks and regards,
ajay patil.