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
New Developer
Gus33
Posts: 12
Registered: ‎11-18-2010
My Device: Not Specified

Monitor Voice Calls and SMS

Hi,

 

Is it possible to monitor voice calls on BB 10 by listening to incoming/outgoing call events?

If not, is there a way to access Call History files from the System? (http://developer.blackberry.com/native/beta/documentation/com.qnx.doc.native_sdk.devguide/com.qnx.do...

 

As for SMS, there seems to be an access_sms_mms permission (http://developer.blackberry.com/native/beta/documentation/com.qnx.doc.native_sdk.devguide/com.qnx.do...

Is this done by accessing System files as well?

 

Thank you.

 

BlackBerry Development Advisor
IsaacGordezky
Posts: 57
Registered: ‎10-04-2012
My Device: developer

Re: Monitor Voice Calls and SMS

It is possible to monitor phone events. There is a permission access_phone which you will need to set in your bar-descriptor.xml. You will have to edit the source manually because this permission is not listed in the Application in the Momentics IDE.

 

To listen to events you can use the Phone class and connect to callUpdated signal.

Developer
jtegen
Posts: 6,541
Registered: ‎10-27-2010
My Device: HTC One, PlayBook, LE Z10, DE Q10

Re: Monitor Voice Calls and SMS

How do you make a call from an app, regardless of its development environment? How do you invoke the phone app (if there is one)?
BlackBerry Development Advisor
IsaacGordezky
Posts: 57
Registered: ‎10-04-2012
My Device: developer

Re: Monitor Voice Calls and SMS

You can use the invocation framework to invoke the phone app, to dial a number. You can read about the invocation framework here and how to send invocations here.

 

To make a call, set the action to "bb.action.DIAL" and the MIME type to "application/vnd.blackberry.phone.startcall". (see InvokeRequest). The following snippet shows how to set the data for the call, note the data must be PPS encoded:

QVariantMap map;
map.insert(“number”, “15198887465”);         // required
map.insert(“line_id”, “cellular”);           // optional
map.insert(“apply_smart_dialing”, false);    // optional
QByteArray requestData = PpsObject::encode(map, NULL);

 

Developer
jtegen
Posts: 6,541
Registered: ‎10-27-2010
My Device: HTC One, PlayBook, LE Z10, DE Q10

Re: Monitor Voice Calls and SMS

Thanks.

How is the data mapped for other bindings like AIR?
Developer
jtegen
Posts: 6,541
Registered: ‎10-27-2010
My Device: HTC One, PlayBook, LE Z10, DE Q10

Re: Monitor Voice Calls and SMS

Also, is there a source for other "standard" schemas? Like contacts, SMS, maps, etc?