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


Thank you for visiting the BlackBerry Support Community Forums.

BlackBerry will be closing the BlackBerry Support Community Forums Device Forums on April 1st (Developers, see below)

BlackBerry remains committed to providing excellent customer support to our customers. We are delighted to direct you to the CrackBerry Forums, a well-established and thorough support channel, for continued BlackBerry support. Please visit http://forums.crackberry.com or http://crackberry.com/ask. You can also continue to visit BlackBerry Support or the BlackBerry Knowledge Base for official support options available for your BlackBerry Smartphone.

"When we launched CrackBerry.com 10 years ago, we set out to make it a fun and useful destination where BlackBerry Smartphone owners could share their excitement and learn to unleash the full potential of their BlackBerry. A decade later, the CrackBerry community is as active and passionate as ever and I know our knowledgeable members and volunteers will be excited to welcome and assist more BlackBerry owners with their questions."

- Kevin Michaluk, Founder, CrackBerry.com

Developers, for more information about the BlackBerry Developer Community please review Join the Conversation on the BlackBerry Developer Community Forums found on Inside BlackBerry.


Reply
Contributor
Posts: 13
Registered: ‎05-20-2010
My Device: 9550
My Carrier: verizon
Accepted Solution

How to get phone calling state?

I want to know the phone state(whether in calling) in my app. But I've no idea which API can offer this functionality.

My device is 9550.

Please help me.:smileyhappy:

Developer
Posts: 17,026
Registered: ‎07-29-2008
My Device: Z10 LE, Z30, Passport
My Carrier: O2 Germany

Re: How to get phone calling state?

check if Phone.getActiveCall returns a call (or null)

----------------------------------------------------------
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
Highlighted
Developer
Posts: 1,807
Registered: ‎04-28-2009
My Device: Z10 (STL100-4)-10.3.2.858, Z10 (STL100-3)-10.3.1.2576, Z30 (STA100-5)-10.3.1.2582, Passport (SQW100-1)-10.3.1.2576, PlayBook (16GB)-2.1.0.1917
My Carrier: Verizon

Re: How to get phone calling state?

[ Edited ]

Try net.rim.blackberry.api.phone.Phone.getActiveCall(). I haven't used it but I presume that if there is no phone call then it will return null. If it doesn't return null you can do PhoneCall.getStatus()

 

Edit: Simon beat me to it.

---Spends time in #blackberrydev on freenode (IRC)----
Three simple rules:
1. Please use the search bar before making new posts.
2. "Like" posts that you find helpful.
3. If a solution has been found for your post, mark it as solved.
--I code too much. Well, too bad.
Contributor
Posts: 13
Registered: ‎05-20-2010
My Device: 9550
My Carrier: verizon

Re: How to get phone calling state?

thank simon_hain and rcmaniac25. i'll try your method later

Contributor
Posts: 13
Registered: ‎05-20-2010
My Device: 9550
My Carrier: verizon

Re: How to get phone calling state?

thanks again, simon_hain and rcmaniac25. Phone.getActiveCall() works great for my appSmiley Very Happy

 

sorry for confirming solution so late(just too busy in the past few days) Smiley Happy