BlackBerry Forums Support Community               

Closed Thread
 
LinkBack Thread Tools
Old 04-26-2007, 01:20 AM   #1 (permalink)
New Member
 
Join Date: Apr 2007
Model: 8100
PIN: N/A
Carrier: china mobile
Posts: 14
Post Thanks: 0
Thanked 0 Times in 0 Posts
Default successful! end a call programmaticly

Please Login to Remove!

Hi Guys,

I have solved the problem of ending a active call programmaticly.because I found the keycode of RED END KEY

(test succeed on 8100)

below is my code:
Code:
 
EventInjector.KeyCodeEvent pressEndKey=new EventInjector.KeyCodeEvent(KeyCodeEvent.KEY_DOWN,(char)20,KeypadListener.STATUS_NOT_FROM_KEYPAD,100);
EventInjector.KeyCodeEvent releaseEndKey=new EventInjector.KeyCodeEvent(KeyCodeEvent.KEY_UP,(char)20,KeypadListener.STATUS_NOT_FROM_KEYPAD,100);
EventInjector.invokeEvent(pressEndKey);
EventInjector.invokeEvent(releaseEndKey);
and then some setings need to be made.

Home Screen---Options---advanced Options---Applications--- find out you program---click Menu button---Edit Permission---expand "Interactions"----change "Keystroke injection" to "Allow"

Last edited by franktian : 04-26-2007 at 01:22 AM.
Offline  
Old 04-26-2007, 03:03 AM   #2 (permalink)
New Member
 
Join Date: Apr 2007
Model: 8100
PIN: N/A
Carrier: china mobile
Posts: 14
Post Thanks: 0
Thanked 0 Times in 0 Posts
Default

Test succeed on 8800 too

change the keycode to 18 or Keypad.KEY_END
Code:
EventInjector.KeyCodeEvent pressEndKey=new EventInjector.KeyCodeEvent(KeyCodeEvent.KEY_DOWN,(char)18,KeypadListener.STATUS_NOT_FROM_KEYPAD,100);
EventInjector.KeyCodeEvent releaseEndKey=new EventInjector.KeyCodeEvent(KeyCodeEvent.KEY_UP,(char)18,KeypadListener.STATUS_NOT_FROM_KEYPAD,100);
EventInjector.invokeEvent(pressEndKey);
EventInjector.invokeEvent(releaseEndKey);
or
Code:
EventInjector.KeyCodeEvent pressEndKey=new EventInjector.KeyCodeEvent(KeyCodeEvent.KEY_DOWN,(char)Keypad.KEY_END,KeypadListener.STATUS_NOT_FROM_KEYPAD,100);
EventInjector.KeyCodeEvent releaseEndKey=new EventInjector.KeyCodeEvent(KeyCodeEvent.KEY_UP,(char)Keypad.KEY_END,KeypadListener.STATUS_NOT_FROM_KEYPAD,100);
EventInjector.invokeEvent(pressEndKey);
EventInjector.invokeEvent(releaseEndKey);
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.