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

Native 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
Developer
Posts: 324
Registered: ‎03-10-2010
My Device: Bold 9780, DevAlpha
My Carrier: Vodafone CZ
Accepted Solution

Incoming/Outgoing call phone number, Phone log listener?

Yes. There is a object phone exists, there is a signal onCallUpdated. But how to retrieve phone number?

 

Another question - in BBOS has been PhoneLogListener object. I can't find alternative in new BB10. How to access to the Phone Log?

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

Re: Incoming/Outgoing call phone number, Phone log listener?

the phone number is linked in the line object, you could get it by using sender() on the event i think (to get the phone object and query that).

i don't think phonelogs are available as an api yet, but i would not mind to be proved wrong Smiley Happy
----------------------------------------------------------
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
Posts: 324
Registered: ‎03-10-2010
My Device: Bold 9780, DevAlpha
My Carrier: Vodafone CZ

Re: Incoming/Outgoing call phone number, Phone log listener?

Developer
Posts: 324
Registered: ‎03-10-2010
My Device: Bold 9780, DevAlpha
My Carrier: Vodafone CZ

Re: Incoming/Outgoing call phone number, Phone log listener?

Can you provide example?

 

void TestPhone::onCallUpdated(const bb::system::phone::Call &call) {
	m_CallState = 0;
    CallState::Type state = call.callState();

    if(state ==  CallState::Incoming )
    {
    	m_CallState = 1;
    }
    emit callStateChanged();
}

 

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

Re: Incoming/Outgoing call phone number, Phone log listener?

you can access the sender of a signal by calling sender(), in your case that would be the Phone class i guess.
----------------------------------------------------------
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
Posts: 324
Registered: ‎03-10-2010
My Device: Bold 9780, DevAlpha
My Carrier: Vodafone CZ

Re: Incoming/Outgoing call phone number, Phone log listener?

Thanks! Found it!!!

 

Works! Smiley Happy

Developer
Posts: 1,638
Registered: ‎07-14-2008
My Device: Z10
My Carrier: Fido

Re: Incoming/Outgoing call phone number, Phone log listener?

Does is give you the caller phone number or just the line number of your own phone?


Contributor
Posts: 17
Registered: ‎09-05-2012
My Device: 9780 Bold
My Carrier: Bouygues Telecom

Re: Incoming/Outgoing call phone number, Phone log listener?

Hello, with the phone object, i can only get my own number with:

Phone phone;
phone.activeLine().description();

 What did you do to get the caller number or the number called?

Thanks

Developer
Posts: 656
Registered: ‎02-03-2010
My Device: Z10 LE
My Carrier: Rogers

Re: Incoming/Outgoing call phone number, Phone log listener?


AlexXF wrote:

Thanks! Found it!!!

 

Works! Smiley Happy


Would you mind sharing the code to get the phone number of the person who called....haven't figured out how to that yet.  Thanks.


Steven Kader at JaredCo
   Follow me on Twitter    |     Mipixi.com :  Web App for Photo Sharing
New Member
Posts: 4
Registered: ‎04-01-2013
My Device: blackberry z10
My Carrier: bouygues

Re: Incoming/Outgoing call phone number, Phone log listener?

Alex, do you ses the number you calcul or your own number?