Welcome!

Welcome to the official BlackBerry Support Community Forums.

This is your resource to discuss support topics with your peers, and learn from each other.

inside custom component

Java Development

Reply
Developer
Posts: 198
Registered: ‎04-03-2009
My Device: Not Specified

Re: Call Control functions like answer/reject/disconnect/hold

hi Krishn2,

   

   The code posted by you works fine on Bold and Curves, but will it disconnect the call on 4.2.1 OS ?

 

    I have tested the application on Bold and Storm it works fine. 

 

    I dont have the device with 4.2.1 OS but I have tested the code on the 4.2.2 Simulator it does not disconnect the incoming call.

 

    Is this a Simulator problem ?

 

Thanks...

Highlighted
New Developer
Posts: 4
Registered: ‎08-03-2009
My Device: Not Specified

Re: Call Control functions like answer/reject/disconnect/hold

Thanks a lot Krishn2 and safycool,

 

We have  tested only to put the thread to sleep for 2 to 3 seconds in between the keydown / keyup event injections and it works alright now Smiley Happy

 

Thanks!
Regards

Mario

Developer
Posts: 198
Registered: ‎04-03-2009
My Device: Not Specified

Re: Call Control functions like answer/reject/disconnect/hold

Have you tested on 4.2.1 simulator ?..... I have tested on 4.3, It is working properly on 4.3 simulator also....
New Developer
Posts: 94
Registered: ‎03-06-2009
My Device: Not Specified

Re: Call Control functions like answer/reject/disconnect/hold

I also tested it on simulator 4.6.0 and OS 4.6.0.241 and faced no issue.

Cant you upgrade to higher verison of simulator and OS (on your cell phone)?

New Developer
Posts: 1
Registered: ‎12-15-2009
My Device: Not Specified

Re: Call Control functions like answer/reject/disconnect/hold

Hi, anyone have any luck being able to find code that does work on the Bold/Storm without using key injection?

 

My concern with key injection is the behaviour when the handset is in the holster, as how I understand it is that key injection is disabled in this situation.

Developer
Posts: 173
Registered: ‎06-11-2009
My Device: Not Specified

Re: Call Control functions like answer/reject/disconnect/hold

[ Edited ]

OK, on 4.2.1 KeyCodeEvent constructor is slightly different - it has 4th parameter int time:

http://www.blackberry.com/developers/docs/4.2.1api/net/rim/device/api/system/EventInjector.KeyCodeEv...(int, char, int, int)

which time - The time the key is held, in milliseconds.

This constructor is also present in 4.7.

I tried 100 msc and the code works on 4.2.1 (at least simulator) as well.

In my case I put it in callInitiated(int callid); Smiley Happy

...

P.S. guys (and gals) don't forget to press Star near krishn2's name Smiley Happy