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
Developer
Posts: 85
Registered: ‎06-22-2013
My Device: N/A
My Carrier: N/A

invoke sms with image attached.

Hello Guys,

 

i need to invoke sms composser with an image attached,

this code works for me but for text messages only.

InvokeRequest request;
request.setAction("bb.action.COMPOSE");
request.setTarget("sys.pim.text_messaging.composer");
request.setMimeType("application/text_messaging");
QVariantMap map;
map.insert("to", QVariantList() << sendTo);
map.insert("body", body);
map.insert("send", sendNow);
QByteArray requestData = bb::PpsObject::encode(map, NULL);
request.setData(requestData);
m_invokeManager->invoke(request);

 

Retired
Posts: 749
Registered: ‎12-16-2008
My Device: BlackBerry Z30
My Carrier: Bell

Re: invoke sms with image attached.

You'll want to use one of the invoke methods in the "Sharing an attachment with a recipient" section of the SMS Invoke page: https://developer.blackberry.com/native/documentation/cascades/device_platform/invocation/text_messa...

Paul Bernhardt
Application Development Consultant
BlackBerry
@PBernhardt

Did this answer your question? Please accept this post as the solution.
Found a bug? Report it to the Developer Issue Tracker