02-07-2013 03:06 PM
I know I am calling the card correctly, I am able to load and send an email. I am not able to get the "preloaded" data to load into the card. I am using the JSON from the Email Card page. I am pretty sure I am loading the JSON properly as I have printed the data to the console.
InvokeManager invokeManager;
InvokeRequest request;
request.setTarget("sys.pim.uib.email.hybridcompose r");
request.setAction("bb.action.COMPOSE");
request.setMimeType("message/rfc822");
JsonDataAccess jda;
QMap<QString, QVariant> prefilledData;
QVariant jsonData = jda.load(QDir::currentPath() + "/app/native/assets/mailProperties.json");
prefilledData = jsonData.toMap();
request.setMetadata(prefilledData);
Any ideas where I have gone wrong?
02-22-2013 12:01 PM
Same issue here.
I wasn't sure if we were supposed to send the json to the metadata, data or uri fields. I have tried all three to no avail.
My json:
{
"subject" : "Screenshot",
"body" : "Screenshot attached.",
"attachment" : "file:///shared/misc/screenshot.png"
}
invocation:
navigator_invoke_invocation_t *iRequest = NULL; navigator_invoke_invocation_create(&iRequest); navigator_invoke_invocation_set_action(iRequest, "bb.action.COMPOSE"); navigator_invoke_invocation_set_target(iRequest,"sys.pim.uib.email.hybridcomposer"); navigator_invoke_invocation_set_data(iRequest, url.c_str(), url.length()); navigator_invoke_invocation_set_type(iRequest, "message/rfc822"); navigator_invoke_invocation_send(iRequest); navigator_invoke_invocation_destroy(iRequest);
All this does is bring up a blank composer window.
I need this to work properly with optional inclusion of all the possible permutations. I see that others get around this with a mailto uri or a Share invocation, but I need the ability to populate email fields and add an attachment.
Is this a known issue with the current release of BB10, or am I doing something wrong?
02-22-2013 12:13 PM
I wasn't able to make this work. A workaround is to use URL:
02-22-2013 12:16 PM
02-22-2013 12:50 PM
That was also my understanding. This is a blocking issue for the release of our product (or will be when the product is ready for submission in a few weeks).
02-22-2013 12:52 PM
I currently have:
InvokeManager invokeManager;
InvokeRequest request;
request.setTarget("sys.pim.uib.email.hybridcompose r");
request.setAction("bb.action.SHARE");
QString fileURI = ("file://" + newFileName);
request.setUri(fileURI);
request.setMimeType("message/rfc822");but does not allow me to prepopulate the subject line as I'd like to
03-04-2013 07:52 AM
03-04-2013 08:19 AM
request.setTarget("sys.pim.uib.email.hybridcompose
request.setAction("bb.action.SHARE");
request.setMimeType("message/rfc822");
QString fileURI = ("file://assets/images/light.png");
request.setUri(fileURI);
still can not add a attachment, anywhere wrong?
03-04-2013 08:19 AM
03-04-2013 08:20 AM