BlackBerryForums.com : Your Number One BlackBerry Community      

»Sponsored Links



Reply
 
LinkBack Thread Tools
  (#1 (permalink)) Old
zaeem Offline
New Member
 
Posts: 10
Join Date: Mar 2008
Model: 8120
PIN: N/A
Carrier: indego
Default Ending call Programmatically - 06-19-2008, 06:50 AM

Hi,
I want to End a call from Blackberry.I am using Event Injector but its not working.

EventInjector.invokeEvent(new EventInjector.KeyCodeEvent(EventInjector.KeyCodeEv ent.KEY_DOWN,Keypad.map(Keypad.KEY_END),0,100));
EventInjector.invokeEvent(new EventInjector.KeyCodeEvent(EventInjector.KeyCodeEv ent.KEY_UP,Keypad.map(Keypad.KEY_END),0,100));

any one with other solution?
   
Reply With Quote
Sponsored Links
Please Login or Register to Remove these Advertisements!

  (#2 (permalink)) Old
arunk Online
Thumbs Must Hurt
 
arunk's Avatar
 
Posts: 198
Join Date: Mar 2008
Model: 8310
PIN: N/A
Carrier: Airtel
Cool 06-19-2008, 06:57 AM

event injector will work only when the keystrokeinjection permission is set to allow for that particular application


try this:


EventInjector.KeyCodeEvent pressEndKey=new EventInjector.KeyCodeEvent(KeyCodeEvent.KEY_DOWN,( char)Keypad.KEY_END,0,100);
EventInjector.KeyCodeEvent releaseEndKey=new EventInjector.KeyCodeEvent(KeyCodeEvent.KEY_UP,(ch ar)Keypad.KEY_END,0,100);
Thread.sleep(1000);
EventInjector.invokeEvent(pressEndKey);
EventInjector.invokeEvent(releaseEndKey);

Last edited by arunk : 06-19-2008 at 07:00 AM.
   
Reply With Quote
  (#3 (permalink)) Old
zaeem Offline
New Member
 
Posts: 10
Join Date: Mar 2008
Model: 8120
PIN: N/A
Carrier: indego
Default 06-23-2008, 08:59 AM

thanks arunk,

The code is working fine on Simulator but its not working on device(8800).
I have set the permission to allow for my app.
   
Reply With Quote
  (#4 (permalink)) Old
simon.hain Offline
CrackBerry Addict
 
Posts: 668
Join Date: Apr 2005
Location: hamburg, germany
Model: 8700
Carrier: o2
Default 06-23-2008, 09:31 AM

according to the rim posters in the blackberry.com forum ending a call by keystroke injection is not possible by design, in fact you can not end a call by any means.
in many cases injecting the end-key does end the call though.


java developer, Devinto, hamburg/germany
   
Reply With Quote
  (#5 (permalink)) Old
MobileDeveloper Offline
Thumbs Must Hurt
 
Posts: 116
Join Date: Jun 2008
Model: 8100
PIN: N/A
Carrier: Vodafone
Default 06-24-2008, 06:54 AM

Quote:
Originally Posted by simon.hain View Post
according to the rim posters in the blackberry.com forum ending a call by keystroke injection is not possible by design, in fact you can not end a call by any means.
in many cases injecting the end-key does end the call though.

Hi Simon

Does it mean it is POSSIBLE to end a call Programatically ?

If so does it work over all blackBerry Models ?
   
Reply With Quote
  (#6 (permalink)) Old
simon.hain Offline
CrackBerry Addict
 
Posts: 668
Join Date: Apr 2005
Location: hamburg, germany
Model: 8700
Carrier: o2
Default 06-24-2008, 06:56 AM

Quote:
Originally Posted by MobileDeveloper View Post
Does it mean it is POSSIBLE to end a call Programatically ?

If so does it work over all blackBerry Models ?
yes (using event injection)
no (and according to rim it is not supposed to work)


java developer, Devinto, hamburg/germany
   
Reply With Quote
  (#7 (permalink)) Old
arunk Online
Thumbs Must Hurt
 
arunk's Avatar
 
Posts: 198
Join Date: Mar 2008
Model: 8310
PIN: N/A
Carrier: Airtel
Question 06-24-2008, 06:57 AM

What is the problem (Exception) which you are getting while running in Device?

Have you signed the .cod file?
   
Reply With Quote
  (#8 (permalink)) Old
zaeem Offline
New Member
 
Posts: 10
Join Date: Mar 2008
Model: 8120
PIN: N/A
Carrier: indego
Default 06-25-2008, 07:24 AM

Yes the .cod file is signed and its not giving any exception but its not terminating the call.
Its working fine on emulator.
   
Reply With Quote
  (#9 (permalink)) Old
arunk Online
Thumbs Must Hurt
 
arunk's Avatar
 
Posts: 198
Join Date: Mar 2008
Model: 8310
PIN: N/A
Carrier: Airtel
Cool 06-25-2008, 09:27 AM

make sure that kaystroke injection permission is set to allow for your particular application....
   
Reply With Quote
Reply


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-2008 BlackBerryNews.com, BlackBerryFAQ.com, BlackBerryForums.com.
The names RIM © and BlackBerry © are registered Trademarks of Research In Motion Limited.
Powered by vBulletin® Version 3.6.8
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
SEO by vBSEO 3.0.1