BlackBerry Forums Support Community               

Closed Thread
 
LinkBack Thread Tools
Old 04-26-2007, 12: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 12:22 AM.
Offline  
Old 04-26-2007, 02: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

Nortel Avaya BCM50 R5 5.0 4 Line 4 IP Phone System 2 SIP Gateway NT9T6505E5 VoIP
$795.0
Nortel Avaya BCM50 R5 5.0 4 Line 4 IP Phone System 2 SIP Gateway NT9T6505E5 VoIP pictureTriton VoIP Board 8-Port
$15.0
Triton VoIP Board 8-Port pictureRevolabs FLX2 IP Conference Station - Wireless 10-FLX2-020-VOIP
$180.0
Revolabs FLX2 IP Conference Station - Wireless 10-FLX2-020-VOIP pictureLot of 5 Mitel IP Phones 5020 Business Office VOIP Black
$41.08
Lot of 5 Mitel IP Phones 5020 Business Office VOIP Black pictureLOF OF FOUR (4) Polycom SoundPoint IP550 SIP VOIP Phones
$68.0
LOF OF FOUR (4) Polycom SoundPoint IP550 SIP VOIP Phones picture






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