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

Integrated Circuit Lot Voltage Regulators, Transistors And Rectifiers 19 Types
$25.0
Integrated Circuit Lot Voltage Regulators, Transistors And Rectifiers 19 Types picture150 pcs TEXAS INSTRUMENTS LP2951ACM-3.3 Voltage Regulator IC IC
$19.99
150 pcs TEXAS INSTRUMENTS LP2951ACM-3.3 Voltage Regulator IC IC pictureElectroBits Neon High Voltage Connector HVC1001, Box of 10
$39.95
ElectroBits Neon High Voltage Connector HVC1001, Box of 10 pictureAC 220V 5000W SCR Voltage Regulator Speed Controller Dimmer Thermostat D
$8.04
AC 220V 5000W SCR Voltage Regulator Speed Controller Dimmer Thermostat D pictureMini Panelmeter Voltage Voltmeter DC 0 - 30V 20 mA Yellow Three Cables T1
$2.28
Mini Panelmeter Voltage Voltmeter DC 0 - 30V 20 mA Yellow Three Cables T1 picture






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