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
Regular Contributor
Posts: 93
Registered: ‎08-20-2013
My Device: BB 10 -BlackBerry Z10
My Carrier: BlackBerry

How to integrate my application with Call log core application in BlackBerry10?

I am writing one application in which I want to integrate my application with core application- Call Log or Phone . I want to get all call history in my application . I have gone through BlackBerry's official doc but theres no any sample app for call log integration .

I am new to BlackBerry 10 .So Could anyone please tell me how should I do this ?

Retired
Posts: 571
Registered: ‎06-25-2010
My Device: Z10
My Carrier: Vodafone

Re: How to integrate my application with Call log core application in BlackBerry10?

You can open the call log from your app but not import the data itself:

 

https://developer.blackberry.com/native/documentation/cascades/device_platform/invocation/phone.html

 

 

--------------------------------------------------------------------------------------------
Feel free to press the like button on the right side if you liked my attempts to help :-)
And please mark posts as solved if you think I found the solution or set you on its path. Thanks!
Follow me on Twitter: @mdwrim
Regular Contributor
Posts: 93
Registered: ‎08-20-2013
My Device: BB 10 -BlackBerry Z10
My Carrier: BlackBerry

Re: How to integrate my application with Call log core application in BlackBerry10?

Thank you for your reply but I came to know that we can do this by CallUpdated signal. Emitted when an incoming call is received or updated, or an outgoing call initiated. But dont know how to implement. 

Retired
Posts: 571
Registered: ‎06-25-2010
My Device: Z10
My Carrier: Vodafone

Re: How to integrate my application with Call log core application in BlackBerry10?

This will only work if your application is running when the call is received.

 

Are you saying that you do not know how to use signals and slots? If so look at this as a start:

 

https://developer.blackberry.com/native/documentation/cascades/dev/signals_slots/

 

If not, can you clarify your question please?

--------------------------------------------------------------------------------------------
Feel free to press the like button on the right side if you liked my attempts to help :-)
And please mark posts as solved if you think I found the solution or set you on its path. Thanks!
Follow me on Twitter: @mdwrim
Regular Contributor
Posts: 93
Registered: ‎08-20-2013
My Device: BB 10 -BlackBerry Z10
My Carrier: BlackBerry

Re: How to integrate my application with Call log core application in BlackBerry10?

[ Edited ]

Actually I want to get call details from call log app and store it in my application's database.  I heard theres no any API for integrating directly with CallLog like as we can do in message and contacts but we can get the incoming and outgoing call details like number , duration etc by using callUpdated() .  I know how to implement signals and slots but I am not getting how to implement in this because I didn't get any sample app for integrating with callLog core app in docs. 

 

           Could you please tell me how should I do this by this way?

Retired
Posts: 571
Registered: ‎06-25-2010
My Device: Z10
My Carrier: Vodafone

Re: How to integrate my application with Call log core application in BlackBerry10?

Create a Phone object. Connect its callUpdated signal to a slot method in your code. You receive a Call object which you can process. 

 

There's an example in the documentation part way down this page:

 

https://developer.blackberry.com/native/documentation/cascades/device_comm/phone/

--------------------------------------------------------------------------------------------
Feel free to press the like button on the right side if you liked my attempts to help :-)
And please mark posts as solved if you think I found the solution or set you on its path. Thanks!
Follow me on Twitter: @mdwrim
Highlighted
Developer
Posts: 1,632
Registered: ‎07-14-2008
My Device: Z10
My Carrier: Fido

Re: How to integrate my application with Call log core application in BlackBerry10?


mwoolley wrote:

Create a Phone object. Connect its callUpdated signal to a slot method in your code. You receive a Call object which you can process. 

 

There's an example in the documentation part way down this page:

 

https://developer.blackberry.com/native/documentation/cascades/device_comm/phone/


mwoolley:  We've been this road before and it is not what the OP or I wanted.  The callUpdated is just a signal.  You can not get additional detail information such as call duration, caller number and caller name.

 

I've been begging since May to have access to Phone and Phone CallLogs.  It was promised in the Roadmap for end of Aug and still not available today.

 

The only missing phone API is getting the caller's number.  Is that too much to ask for?

Regular Contributor
Posts: 93
Registered: ‎08-20-2013
My Device: BB 10 -BlackBerry Z10
My Carrier: BlackBerry

Re: How to integrate my application with Call log core application in BlackBerry10?

[ Edited ]

I have wriiten some code for this -   Would you tell me whats the problem here or what should I do in this ?

 

---- .CPP file ---

 

AppDemo::AppDemo(bb::cascades::Application *app)

: QObject(app)

{

    QmlDocument *qml = QmlDocument::create("asset:///main.qml").parent(this);

    AbstractPane *root = qml->createRootObject<AbstractPane>();

    app->setScene(root);

    m_phone = new bb::system::Phone();

   QObject::connect(m_phone, SIGNAL(callUpdated(bb::system::Call&)),this,SLOT(onCallUpdated(bb::system::Call&)));

 

}

 

void AppDemo:Smiley SurprisednCallUpdated(const bb::system::Call &call)

{

    bb::system::CallState::Type state = call.callState();

    qDebug()<< "call updated: callId=" << call.callId() << " callState=" << state;

 

    if (bb::system::CallState::Connected == state) {

    qDebug() << "call connected, do something ...";

 

    }

}

 

 

--- .HPP file ---

 

class AppDemo : publicQObject

{

    Q_OBJECT

public:

    AppDemo(bb::cascades::Application *app);

    virtual ~AppDemo() {}

 

    Q_SIGNALS:

 

        void callUpdated(bb::system::Call&);

 

public slots:

 

void onCallUpdated(const bb::system::Call &call);

 

public:

    bb::system::Phone *m_phone;

  

};

 

#endif 

 

 

This code giving me error on the console but not showing any error in code or project . 

 

Thanks 

Dhiraj,

Retired
Posts: 571
Registered: ‎06-25-2010
My Device: Z10
My Carrier: Vodafone

Re: How to integrate my application with Call log core application in BlackBerry10?

Hi Smiley

 

apologies, I didn't know the background and was just trying to help based on what I'd read in your post.

 

I now see that this is a capability a number of people and that it was formally requested here: https://www.blackberry.com/jira/browse/BBTEN-1287

 

I've reached out to the Product Manager for our native APIs to see if I can get an update on the plan for this area and will report back when I have further information.

 

Regards

 

Martin

--------------------------------------------------------------------------------------------
Feel free to press the like button on the right side if you liked my attempts to help :-)
And please mark posts as solved if you think I found the solution or set you on its path. Thanks!
Follow me on Twitter: @mdwrim
Moderator
Posts: 4,539
Registered: ‎06-26-2013
My Device: Curve 8520

Re: How to integrate my application with Call log core application in BlackBerry10?

[ Edited ]

I have locked this thread as it is a duplicate to this existing thread

 

 

Steve_T                                                                                                                          New to the Community click here  
Community Moderator
Likes2.png  AS3.png  CG2.png