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
Contributor
pcsxk
Posts: 13
Registered: ‎05-20-2010
My Device: 9550
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
simon_hain
Posts: 16,282
Registered: ‎07-29-2008
My Device: Z10 LE, Z30, Passport

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
Developer
rcmaniac25
Posts: 1,805
Registered: ‎04-28-2009
My Device: Z10 (STL100-4)-10.2.1.3253, Z10 (STL100-3)-10.3.1.997 Dev OS, Z30 (STA100-5)-10.3.1.997 Dev OS, Passport (SQW100-1)-10.3.0.1418, PlayBook (16GB)-2.1.0.1917

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
pcsxk
Posts: 13
Registered: ‎05-20-2010
My Device: 9550

Re: How to get phone calling state?

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

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

Re: How to get phone calling state?

thanks again, simon_hain and rcmaniac25. Phone.getActiveCall() works great for my app:smileyvery-happy:

 

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