BlackBerry Forums Support Community               

Closed Thread
 
LinkBack Thread Tools
Old 03-27-2007, 03:23 PM   #1 (permalink)
New Member
 
Join Date: Feb 2006
Location: Colombia
Model: 8800
Carrier: Cingular
Posts: 12
Post Thanks: 0
Thanked 0 Times in 0 Posts
Default How to interrupt a phone call via Phone API

Please Login to Remove!

How can I interrupt a phone call when this has been already launched. I detect the phone call through a PhoneListener interface. What can I do?
Offline  
Old 03-29-2007, 07:49 AM   #2 (permalink)
Knows Where the Search Button Is
 
Join Date: Mar 2007
Model: 8100
Carrier: TMobile
Posts: 28
Post Thanks: 0
Thanked 0 Times in 0 Posts
Default

Let me know if you find any answers to your question. I have been trying to figure out how to answer an incoming call programmatically. Everyone has been slient. I guess not one has done this.

So to answer your question,, besides getting information about an incoming call, I don't believe you can do anything. You can't end he call. You can't answer the call.

There are some threads that suggest using the EventInjector to issue keys to end the call or answer the call. However, the events seems to be disabled or ignored by the incoming call dialog.

I hope that this will change on Tuesday when RIM is supposed to open up more APIs. However, it sounds like they do not want to allow programmatic control of inbound calls.

I hope this helps.
Offline  
Old 04-09-2007, 11:47 AM   #3 (permalink)
New Member
 
Join Date: Feb 2006
Location: Colombia
Model: 8800
Carrier: Cingular
Posts: 12
Post Thanks: 0
Thanked 0 Times in 0 Posts
Default How to use the EventInjector successfully

Hi knifegun. Do you know how to use the EventInjector Class. Ive been trying it but I could not get it. Can you provide me please an example to use.
Offline  
Old 04-10-2007, 04:53 AM   #4 (permalink)
Thumbs Must Hurt
 
Join Date: Jan 2007
Location: India
Model: 8700g
Carrier: Airtel
Posts: 117
Post Thanks: 0
Thanked 0 Times in 0 Posts
Default

this is an example of how to use EventInjector class:
Code:
 EventInjector.TrackwheelEvent eDown = new EventInjector.TrackwheelEvent(
                EventInjector.TrackwheelEvent.THUMB_ROLL_DOWN , 1,
                KeypadListener.STATUS_NOT_FROM_KEYPAD);

hi knifegun,

yes we cannot do anything to phonecalls.....only listen to them. There isn't enough api sipport for this. and rim is no mood to provide it sooner....i managed to end a phone call using EventInjector class...it worked fine for 8100 but failed royally for other phones.

but yet am hopefull that some day there will enough support for handling ph calls.
__________________
Thanks
Meenal
Offline  
Old 04-10-2007, 07:39 AM   #5 (permalink)
Knows Where the Search Button Is
 
Join Date: Mar 2007
Model: 8100
Carrier: TMobile
Posts: 28
Post Thanks: 0
Thanked 0 Times in 0 Posts
Default

Hi Menhal,

How were you able to end the call? Did you use the EventInjector as well? I was able to answer a call once but it did not continue working. Almost as if the events have other factors that affect their consumption by the phone dialog.

Can you post the code you used to end the call? I would really appreciate it.

Regarding the event injection, here is a sample to submit a key event. Remember that you have to submit a key down and a key up event to emulate a user pressing a key:

EventInjector.invokeEvent(new EventInjector.KeyCodeEvent(EventInjector.KeyEvent. KEY_DOWN , keyName, status, 1000));

EventInjector.invokeEvent (new EventInjector.KeyCodeEvent(EventInjector.KeyEvent. KEY_UP, keyName, status, 1000));
Offline  
Old 04-11-2007, 01:28 AM   #6 (permalink)
Thumbs Must Hurt
 
Join Date: Jan 2007
Location: India
Model: 8700g
Carrier: Airtel
Posts: 117
Post Thanks: 0
Thanked 0 Times in 0 Posts
Default

yes thats what have used.
this event is called when an incoming call arrives.it disconnects the call.
Code:
EventInjector.TrackwheelEvent eDown = new EventInjector.TrackwheelEvent(
                EventInjector.TrackwheelEvent.THUMB_ROLL_DOWN , 1,
                KeypadListener.STATUS_NOT_FROM_KEYPAD);
EventInjector.TrackwheelEvent eDown = new EventInjector.TrackwheelEvent(
                EventInjector.TrackwheelEvent.THUMB_CLICK  , 1,
                KeypadListener.STATUS_NOT_FROM_KEYPAD);
but t nly wroked on 8100 simulator.tried in 8800 smulator...t did not work.
__________________
Thanks
Meenal
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





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