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

integrating 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 ? please help me out.

Please use plain text.
BlackBerry Development Advisor
Kareem_ELSayed
Posts: 81
Registered: ‎09-09-2013
My Device: BlackBerry Z10
My Carrier: Etisalat UAE

Re: integrating my application with Call log core application in BlackBerry10?

Hello,

Please check this thread for the same topic.

http://supportforums.blackberry.com/t5/Native-Development/Phone-call-logs/td-p/2118803

if you want to invoke the core phone log app then please check this link from the documentation here:

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

Thanks,
Kareem.
Kareem ELSayed | Application Development Consultant | Developer Relations | BlackBerry | Twitter:@kemobyte
Please use plain text.
Developer
smiley
Posts: 1,417
Registered: ‎07-14-2008
My Device: Z10
My Carrier: Fido

Re: integrating my application with Call log core application in BlackBerry10?


Kareem_ELSayed wrote:
Hello,

Please check this thread for the same topic.

http://supportforums.blackberry.com/t5/Native-Development/Phone-call-logs/td-p/2118803

if you want to invoke the core phone log app then please check this link from the documentation here:

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

Thanks,
Kareem.

You know this is getting really really tiring.  Why can't BB just release the **bleep** phone and phone log apis? 

 

All the broken promises.  All lies.

Please use plain text.
Developer
slashkyle
Posts: 798
Registered: ‎10-16-2012
My Device: Red Z10, Dev Alpha C
My Carrier: Telus

Re: integrating my application with Call log core application in BlackBerry10?

have you created a jira ticket about this, or if there already is one voted towards it?

 

Personally the only real reason i could see of a delay is they're focusing on other areas but the ticket system is there to let them know what we want

 

https://www.blackberry.com/jira/secure/Dashboard.jspa

Please use plain text.
Regular Contributor
dhirajnangare
Posts: 93
Registered: ‎08-20-2013
My Device: BB 10 -BlackBerry Z10
My Carrier: BlackBerry

Re: integrating my application with Call log core application in BlackBerry10?

Thanks , but the link you have given from developer docs is not reliable. I am not getting how to implement from that info. They have given very less info. 

Please use plain text.
BlackBerry Development Advisor
Kareem_ELSayed
Posts: 81
Registered: ‎09-09-2013
My Device: BlackBerry Z10
My Carrier: Etisalat UAE

Re: integrating my application with Call log core application in BlackBerry10?

Hello,

 

This code invoke the call logs page from your app (again you don't have access to the content). To call this function from QML, You need to mark it as Q_INVOKABLE in the .hpp file

 

void ApplicationUI::InvokeCallLog()
{
		qDebug()<<"Invocation Start";
		InvokeRequest cardrequest;
		cardrequest.setMimeType("application/vnd.blackberry.calllog.id");
		cardrequest.setAction("bb.action.OPEN");

		InvokeManager invokemanager;
		InvokeTargetReply *reply = invokemanager.invoke(cardrequest);
		if(reply){
			connect(reply,SIGNAL(finished()),this,SLOT(OnInvokeFinished()));
		}else{
			qDebug()<<"Invocation Connecting Failed!!";
		}
}

void ApplicationUI::OnInvokeFinished(){
	InvokeTargetReply *reply =  qobject_cast<InvokeTargetReply*>(sender());
	if(reply->error()){
		qDebug()<< "Invoke Failed - Do something";
	}
	reply->deleteLater();
}

Also, You will find alot of samples using the invokation framework here:

 

https://developer.blackberry.com/native/sampleapps/

 

If you know how to use the invokation API then the doc link mentioned in the previous post is more than enough to accomplish the task. moreover, i think this topic has been covered in a lot of older post on the forum so would be great to search the fourm for existing answers.

 

if you are new to BB10 / cascade development, I recommend to check out this web video training. Very useful!!  

 

https://developer.blackberry.com/blackberrybuilders/prepare/web_training_cascades.html#1

 

Please let me know if you need any further help.

 

Thanks,

Kareem.

Kareem ELSayed | Application Development Consultant | Developer Relations | BlackBerry | Twitter:@kemobyte
Please use plain text.
Developer
smiley
Posts: 1,417
Registered: ‎07-14-2008
My Device: Z10
My Carrier: Fido

Re: integrating my application with Call log core application in BlackBerry10?


Kareem_ELSayed wrote:

Hello,

 

This code invoke the call logs page from your app (again you don't have access to the content). To call this function from QML, You need to mark it as Q_INVOKABLE in the .hpp file

 

void ApplicationUI::InvokeCallLog()
{
		qDebug()<<"Invocation Start";
		InvokeRequest cardrequest;
		cardrequest.setMimeType("application/vnd.blackberry.calllog.id");
		cardrequest.setAction("bb.action.OPEN");

		InvokeManager invokemanager;
		InvokeTargetReply *reply = invokemanager.invoke(cardrequest);
		if(reply){
			connect(reply,SIGNAL(finished()),this,SLOT(OnInvokeFinished()));
		}else{
			qDebug()<<"Invocation Connecting Failed!!";
		}
}

void ApplicationUI::OnInvokeFinished(){
	InvokeTargetReply *reply =  qobject_cast<InvokeTargetReply*>(sender());
	if(reply->error()){
		qDebug()<< "Invoke Failed - Do something";
	}
	reply->deleteLater();
}

Also, You will find alot of samples using the invokation framework here:

 

https://developer.blackberry.com/native/sampleapps/

 

If you know how to use the invokation API then the doc link mentioned in the previous post is more than enough to accomplish the task. moreover, i think this topic has been covered in a lot of older post on the forum so would be great to search the fourm for existing answers.

 

if you are new to BB10 / cascade development, I recommend to check out this web video training. Very useful!!  

 

https://developer.blackberry.com/blackberrybuilders/prepare/web_training_cascades.html#1

 

Please let me know if you need any further help.

 

Thanks,

Kareem.


 

Thanks Kareem but what good is it if we can't get access to the call log?

 

Is the call log and new phone apis going to be in the gold 10.2 sdk?

Please use plain text.
Regular Contributor
dhirajnangare
Posts: 93
Registered: ‎08-20-2013
My Device: BB 10 -BlackBerry Z10
My Carrier: BlackBerry

Re: integrating my application with Call log core application in BlackBerry10?

Hi Kareem , Thanks for giving me answer but I think you didn't get my point . I dont want to invoke call log page from my application . I want to get call log entries in my application .  

Please use plain text.
Regular Contributor
dhirajnangare
Posts: 93
Registered: ‎08-20-2013
My Device: BB 10 -BlackBerry Z10
My Carrier: BlackBerry

Re: integrating my application with Call log core application in BlackBerry10?

I came to know that this can be done by using callUpdated() method but dont know how to do this . Could  you  please  tell me if you have any idea about this way . 

Please use plain text.
BlackBerry Development Advisor
Kareem_ELSayed
Posts: 81
Registered: ‎09-09-2013
My Device: BlackBerry Z10
My Carrier: Etisalat UAE

Re: integrating my application with Call log core application in BlackBerry10?

Hello, 

 

CallUpdated signal Emitted when an incoming call is received or updated, or an outgoing call initiated.

 

https://developer.blackberry.com/native/reference/cascades/bb__system__phone__phone.html?f=phone#fun...

 

The returned Call object, you have access to the call type (incoming / outgoing) and call state (Failed / connected etc)

 

https://developer.blackberry.com/native/reference/cascades/bb__system__phone__call.html

 

You can connect to the signal in QML or C++ (You would need access to the phone in the bar-descriptor file)

 

//In QML
 onCreationCompleted: {
        phone.callUpdated.connect(app.onCallUpdated);
 }

 Then you can implement the slot:

 

void ApplicationUI::onCallUpdated(const bb::system::phone::Call &call)
{
	qDebug()<< "Call Started : " << call.callType() << call.callId() << call.callState();
}

 

Moreover for my side, I will do more digging and try to get updates on when this can be supported in the roadmap.I will let you (all) know once i find something. 

 

Thanks,

Kareem.

 

Kareem ELSayed | Application Development Consultant | Developer Relations | BlackBerry | Twitter:@kemobyte
Please use plain text.