As the title says, I'm trying to invoke Contacts in BlackBerry Cascades:
https://developer.blackberry.com/cascades/documentation/device_platform/invocation/contacts.html
with fields filled from string variable containing a vCard. I have had no success with mimeTypes, URIs, actions and targets specified in above documentation. The following code or any variation I could develop from documented cases doesn't invoke:
Container {
property string inputString //contains data from which vCard should be extracted if detected
//....
attachedObjects: [
Invocation {
id: myQuery
property bool ready: false
query {
mimeType: "text/plain"
invokeTargetId: "sys.browser"
uri: ("http://www.google.com/search?q="+ escape(inputString))
invokeActionId: "bb.action.OPEN"
data: ""
onArmed: {myQuery.ready = true}
onQueryChanged: {
myQuery.query.updateQuery()
}
}
}
//....
if (inputString.indexOf("VCARD") > -1) {
myInvocation.query.setMimeType("");
myInvocation.query.setUri(inputString);
myInvocation.query.setData(inputString);
myInvocation.query.setInvokeTargetId("sys.pim.contacts.card.viewer");
myInvocation.query.setInvokeActionId("bb.action.VIEW");
myInvocation.query.updateQuery();
}
//...
Button {
onClicked: {
if (myQuery.ready = true) {
myQuery.trigger(myQuery.query.invokeActionId);
}
}
}
}
Other invocations like SMS, eMail & Browser do invoke with this setup, although the MimeType, URIs, data, targets and actions took some fiddling to set right and the configuration that finally worked is not the one from the documentation.
So, how to invoke Contacts?