BlackBerry Forums Support Community               

Closed Thread
 
LinkBack Thread Tools
Old 11-04-2008, 12:30 AM   #1 (permalink)
New Member
 
Join Date: Nov 2008
Model: 9000
PIN: N/A
Carrier: Idea
Posts: 2
Post Thanks: 0
Thanked 0 Times in 0 Posts
Unhappy Event Ejection is not working on Simulator

Please Login to Remove!

I am trying to open the message composer using my application with the help of event ejection.

I have written this code for opening the main menu of the simulator -

EventInjector.invokeEvent(new EventInjector.KeyCodeEvent(EventInjector.KeyCodeEv ent.KEY_DOWN,
Characters.CONTROL_MENU , KeypadListener.STATUS_NOT_FROM_KEYPAD, 200));

EventInjector.invokeEvent(new EventInjector.KeyCodeEvent(EventInjector.KeyCodeEv ent.KEY_UP,
Characters.CONTROL_MENU , KeypadListener.STATUS_NOT_FROM_KEYPAD, 200));


and i have written code to go back or to close the any running application -


EventInjector.invokeEvent(new EventInjector.KeyCodeEvent(EventInjector.KeyCodeEv ent.KEY_DOWN,
Characters.ESCAPE , KeypadListener.STATUS_NOT_FROM_KEYPAD, 200));

EventInjector.invokeEvent(new EventInjector.KeyCodeEvent(EventInjector.KeyCodeEv ent.KEY_UP,
Characters.ESCAPE , KeypadListener.STATUS_NOT_FROM_KEYPAD, 200));


but both are not performing any functioning..


I have also used the TrackwheelEvent that is working fine but in case of keys it is not doing any thing.

I have to do any thing extra for performing the key pressed event using EventEjection???

Last edited by amitbansal3 : 11-04-2008 at 06:26 AM.
Offline  
Old 11-21-2008, 12:20 PM   #2 (permalink)
jwb
New Member
 
Join Date: Jun 2005
Model: Many
Carrier: T-Mobile
Posts: 14
Post Thanks: 0
Thanked 0 Times in 0 Posts
Default

The last time I emailed RIM developer support about EventInjector, they told me that it's broken and it is not possible to inject key presses into the event thread using that API. The API is also completely misdesigned because the numeric keycode and character codes used by the event API and the injection API don't match. One of them is not even wide enough to hold the other.

Don't bang your head against this one, because it's not your problem.
Offline  
Closed Thread


Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On





Copyright 2004-2014 BlackBerryForums.com.
The names RIM and BlackBerry are registered Trademarks of BlackBerry Inc.