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
New Developer
lyra27
Posts: 4
Registered: ‎08-02-2009
My Device: Not Specified

Auto Answering/Rejecting Phone calls in PhoneListener

I would like to consult you guys about this proof of concept idea:

 

Auto answering / rejecting an incoming call without user action (touch / press key)

 

Scenario:

A user initial a phone call with call-back function (calling card, etc), when it receive the callback call, it automatically answer it.

Is this possible in BlackBerry?

 

This should be running in background, but there is also a foreground app allowing user to change settings of the app.

 

I know I could use PhoneListener - callIncoming(int) to capture the event, but I wonder if I could answer / reject the phone by code after receiving the incoming call event.

 

I also searched about Key Stroke Injection but I could not test it by now. So I would like to ask here.

 

Please use plain text.
Developer
simon_hain
Posts: 16,113
Registered: ‎07-29-2008
My Device: Z10 LE, Z30, Passport
My Carrier: O2 Germany

Re: Auto Answering/Rejecting Phone calls in PhoneListener

prior to 4.5(?) it was possible to end calls using menu item execution. afterwards only event injection works.

----------------------------------------------------------
feel free to press the like button on the right side to thank the user that helped you.
please mark posts as solved if you found a solution.
@SimonHain on twitter
Please use plain text.
New Developer
lyra27
Posts: 4
Registered: ‎08-02-2009
My Device: Not Specified

Re: Auto Answering/Rejecting Phone calls in PhoneListener

So with Event Injection, can the incoming call be answered / picked without user action?

Please use plain text.
Developer
simon_hain
Posts: 16,113
Registered: ‎07-29-2008
My Device: Z10 LE, Z30, Passport
My Carrier: O2 Germany

Re: Auto Answering/Rejecting Phone calls in PhoneListener

yes, you inject the accept key

----------------------------------------------------------
feel free to press the like button on the right side to thank the user that helped you.
please mark posts as solved if you found a solution.
@SimonHain on twitter
Please use plain text.
Developer
amardeepjaiman
Posts: 293
Registered: ‎02-25-2009
My Device: Not Specified

Re: Auto Answering/Rejecting Phone calls in PhoneListener

Hi simon,

 

I have trying aunswering call using eventinjector on device, on emulator its working fine. but call is not getting picked up.. I am able to disconnect the call on device.

 

reference thread :

http://supportforums.blackberry.com/t5/Java-Development/Auto-Answering-Rejecting-Phone-calls-in-Phon...

 

Please comment on this.

 

~Amardeep

Please use plain text.
Developer
hades_6
Posts: 178
Registered: ‎08-26-2009
My Device: Not Specified

Re: Auto Answering/Rejecting Phone calls in PhoneListener

You have to set the application permission settings to allow event injection. Go to settings->applications->permission and set it to allow all.

 

You can also do this programatically by prompting the user.

Please use plain text.