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
Contributor
Posts: 10
Registered: ‎03-04-2013
My Device: developer
My Carrier: developer

Re: Email Card not prepopulating

oh~my god, still can not add attachment.

 

By the way: i need to add title, to and attachment in to the mail page.

 

have you solved the issues ? or do you know is it the known issue of this release?

sunshiningjane@gmail,com , can i talk with you about the detail?

Developer
Posts: 47
Registered: ‎01-15-2013
My Device: Z10
My Carrier: N/A

Re: Email Card not prepopulating

		QString appFolder(QDir::homePath());
		appFolder.chop(4);
		QString mainManuImage = appFolder + "app/native/assets/...";

 

 

Contributor
Posts: 10
Registered: ‎03-04-2013
My Device: developer
My Carrier: developer

Re: Email Card not prepopulating

void InvokeEmail::sendEmail() {

         InvokeRequest request;

         request.setAction("bb.action.COMPOSE");

         request.setMimeType("message/rfc822");

         QVariantMap data;

         data["to"] = (QVariantList() << "me@gmail.com");

         data["subject"] = "This is a subject";

 

         data["body"] = "Hello there, things are great!";

         QString logpath = "/accounts/1000/shared/documents/test.pdf";

         QString logpathEncoded = QString(QUrl(logpath).toEncoded());

         qDebug() << "## LOG PATH: " + logpathEncoded;

         data["attachment"] = (QVariantList() << logpathEncoded);

         QVariantMap moreData;

         moreData["data"] = data;

         bool ok;

         request.setData(bb:Smiley TonguepsObject::encode(moreData, &ok));

 

         m_invokeManager->invoke(request);

}

 

this will  work~~

Developer
Posts: 47
Registered: ‎01-15-2013
My Device: Z10
My Carrier: N/A

Re: Email Card not prepopulating

thanks for the update, it seems to be working as I'm able to load the subject line. I am now having issues with my email only loading the title, size shows as 0b. When I click send the attachment disappears entirely.
Contributor
Posts: 10
Registered: ‎03-04-2013
My Device: developer
My Carrier: developer

Re: Email Card not prepopulating

The Email can't access to the data of the third party App except the "shared" path(that's to say that the email can access to  the "shared" under the Sandboxes->your project->shared ).

you can think about copy the file you want to add as the attachment to the "tmp"(System-->tmp),then add as the attachment, that's ok

 

by the way , i have tried adding the file under the "share" and the "tmp" as attachment, it's ok