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: 68
Registered: ‎03-12-2013
My Device: BB Z10
My Carrier: Rogers
Accepted Solution

Invoking the phone to dial a number

I am trying to dial a telephone number from my application running on my BB Z10. I have been able to launch the phone application and bring it to focus but it does not dial the number. I have tried the following to dial 9999 as the number:

 

navigator_invoke_invocation_create(&iRequest);

navigator_invoke_invocation_set_id(iRequest, "1");

navigator_invoke_invocation_set_action(iRequest, "bb.action.DIAL");

navigator_invoke_invocation_set_type(iRequest, "application/vnd.blackberry.phone.startcall");

string data = "{\"number\" : \"9999\"}";

navigator_invoke_invocation_set_data(iRequest, data.c_str(), data.length());

navigator_invoke_invocation_send(iRequest);

navigator_invoke_invocation_destroy(iRequest);

 

I have also tried sending as URI instead of data:

 

navigator_invoke_invocation_create(&iRequest);

navigator_invoke_invocation_set_id(iRequest, "1");

navigator_invoke_invocation_set_action(iRequest, "bb.action.DIAL");

navigator_invoke_invocation_set_type(iRequest, "application/vnd.blackberry.phone.startcall");

navigator_invoke_invocation_set_uri(iRequest, "data://local?number=9999");

navigator_invoke_invocation_send(iRequest);

navigator_invoke_invocation_destroy(iRequest);

 

In both cases the phone appears but does not dial.

Highlighted
Developer
Posts: 196
Registered: ‎03-04-2013
My Device: BB Z10
My Carrier: Rogers

Re: Invoking the phone to dial a number

Well, not sure if this would help you or not, if you insist on using Invocation and stuff..

 

There's always this:

https://developer.blackberry.com/cascades/reference/bb__system__phone__phone.html

 

And the Cascades API sample "Call a pizza" uses it even though it's Cascades, I'm sure you could use it in C++...

Developer
Posts: 217
Registered: ‎09-18-2009
My Device: Z10
My Carrier: O2

Re: Invoking the phone to dial a number

You could do this.

 

Phone phone;
phone.initiateCellularCall(number);

 Using the Phone class.

 

https://developer.blackberry.com/cascades/reference/bb__system__phone__phone.html