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

NEW SK-10E Voltage Step Down Transformer Converter 110~130V to 100V 1000W Japan
$53.99
NEW SK-10E Voltage Step Down Transformer Converter 110~130V to 100V 1000W Japan pictureOmron A22-24AG LED Lamp, Green, 24 VAC/VDC Operating Voltage
$40.02
Omron A22-24AG LED Lamp, Green, 24 VAC/VDC Operating Voltage pictureDROK® 600W 12A DC Boost Voltage Converter 12-60V to 12-80V Step-up Power Supply
$26.23
DROK® 600W 12A DC Boost Voltage Converter 12-60V to 12-80V Step-up Power Supply  pictureTHERMO SPELLMAN MX12PN24/642 High Voltage Power Supply 24VDC, 80000-98050
$69.99
THERMO SPELLMAN MX12PN24/642 High Voltage Power Supply 24VDC, 80000-98050  pictureVoltage Protector Brownout Surge Refrigerator 1800 Watts Appliance
$25.61
Voltage Protector Brownout Surge Refrigerator 1800 Watts Appliance picture






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