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

Reply
Developer
Sanjit_Patra
Posts: 148
Registered: ‎01-08-2013
My Device: 9860

Access call history

[ Edited ]

Hi All,

 

  I want to access call details and sms send information from device programatically. Please help me.

 

Thanks & Regards

Sanjit

Please use plain text.
Contributor
vishakhaYadav10
Posts: 49
Registered: ‎12-29-2011
My Device: 9800

Re: Access call history

hi,

 

you can get the call logs using this api

http://www.blackberry.com/developers/docs/7.1.0api/net/rim/blackberry/api/phone/phonelogs/PhoneLogs....

 

And for sms there is no api.

 

 

 

 

Please use plain text.
Developer
smiley
Posts: 1,468
Registered: ‎07-14-2008
My Device: Z10

Re: Access call history


vishakhaYadav10 wrote:

hi,

 

you can get the call logs using this api

http://www.blackberry.com/developers/docs/7.1.0api/net/rim/blackberry/api/phone/phonelogs/PhoneLogs....

 

And for sms there is no api.

 

 FAILED:  The link you have is for Java. This is for BB10.

 

You can not get call log on BB10. There are ALOT of missing parts still.

 

 


 

Please use plain text.
Contributor
vishakhaYadav10
Posts: 49
Registered: ‎12-29-2011
My Device: 9800

Re: Access call history

Sorry, i posted on wrong forum.

it was for java development,

for BB10 i have no idea.

 

 

Please use plain text.
BlackBerry Development Advisor
sabdelsayed
Posts: 249
Registered: ‎08-17-2012
My Device: BlackBerry Z10 and Q10

Re: Access call history

Hi Sanjit_Patra,

 

Currently, you cannot retrieve the phone logs data in your BlackBerry 10 app. You can only invoke the Phone logs view into your UI. This is possibly for user privacy considerations.

 

For further details, checkout the following forum posts:

 

http://supportforums.blackberry.com/t5/Native-Development/Access-Call-History-in-BB10/m-p/2341593/hi...

http://supportforums.blackberry.com/t5/Native-Development/How-to-integrate-my-application-with-Call-...

http://supportforums.blackberry.com/t5/Native-Development/integrating-my-application-with-Call-log-c...

 

If you are interested, however, you can register your app to listen to phone events by using the Phone class and connecting to the callUpdated signal.

 

As with respect to the sms history, you can use the MessageService API to listen to incoming messages. Here, don't forget to add the SMS access permission (access_sms_mms) to your bar-descriptor.

 

bb::pim::message::MessageService* m_messageService = new bb::pim::message::MessageService(this); 

connect(m_messageService, SIGNAL( messageAdded(bb::pim::account::AccountKey, bb::pim::message::ConversationKey, bb::pim::message::MessageKey)), SLOT( onMessageReceived(bb::pim::account::AccountKey, bb::pim::message::ConversationKey, bb::pim::message::MessageKey)));

 

 

@SamarAbdelsayed

Did this answer your question? Please accept post as solution.
Please refrain from posting new questions in solved threads.
Found a bug? Report it using the Issue Tracker
Please use plain text.
Developer
Sanjit_Patra
Posts: 148
Registered: ‎01-08-2013
My Device: 9860

Re: Access call history

[ Edited ]

Hi sabdelsayed

 

      Can you tell me when app is closed that time messageUpdated(bb::smileytongue:im::account::AccountKey, bb::smileytongue:im::message::ConversationKey, bb::smileytongue:im::message::MessageKey, bb::smileytongue:im::message::MessageUpdate) is called if any message is send from native app Text message?

 

Thanks & Regards

Sanjit

Please use plain text.
BlackBerry Development Advisor
sabdelsayed
Posts: 249
Registered: ‎08-17-2012
My Device: BlackBerry Z10 and Q10

Re: Access call history

Hi,

 

Your app will only receive those events while it's running.

@SamarAbdelsayed

Did this answer your question? Please accept post as solution.
Please refrain from posting new questions in solved threads.
Found a bug? Report it using the Issue Tracker
Please use plain text.
Developer
Sanjit_Patra
Posts: 148
Registered: ‎01-08-2013
My Device: 9860

Re: Access call history

Hi ,

 

  Than how to listen the message when app is closed like push notification.

 

Thanks & regards

Sanjit

Please use plain text.
BlackBerry Development Advisor
sabdelsayed
Posts: 249
Registered: ‎08-17-2012
My Device: BlackBerry Z10 and Q10

Re: Access call history

Hi,

 

This is currently not possible.

 

@SamarAbdelsayed

Did this answer your question? Please accept post as solution.
Please refrain from posting new questions in solved threads.
Found a bug? Report it using the Issue Tracker
Please use plain text.