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

Web and WebWorks Development


Thank you for visiting the BlackBerry Support Community Forums.

BlackBerry will be closing the BlackBerry Support Community Forums Device Forums on April 1st (Developers, see below)

BlackBerry remains committed to providing excellent customer support to our customers. We are delighted to direct you to the CrackBerry Forums, a well-established and thorough support channel, for continued BlackBerry support. Please visit http://forums.crackberry.com or http://crackberry.com/ask. You can also continue to visit BlackBerry Support or the BlackBerry Knowledge Base for official support options available for your BlackBerry Smartphone.

"When we launched CrackBerry.com 10 years ago, we set out to make it a fun and useful destination where BlackBerry Smartphone owners could share their excitement and learn to unleash the full potential of their BlackBerry. A decade later, the CrackBerry community is as active and passionate as ever and I know our knowledgeable members and volunteers will be excited to welcome and assist more BlackBerry owners with their questions."

- Kevin Michaluk, Founder, CrackBerry.com

Developers, for more information about the BlackBerry Developer Community please review Join the Conversation on the BlackBerry Developer Community Forums found on Inside BlackBerry.


Reply
Contributor
Posts: 33
Registered: ‎01-17-2013
My Device: BB10 Dev Alpha Sim
My Carrier: Verizon

Opening Email Client on BB10

So it seems the BB10 dev alpha simulator does not have an email client.

I have search around, and believe i have the correct code to invoke it, but i want to be sure before i submit my app.

 

This is the code im using (This is a javascript/html5 app)

 

sendBlackBerryEmail: function(subject, body, to) {
		blackberry.invoke.card.invokeEmailComposer({
			subject: subject,
			body: body,
			to: to
		}, function (done) {
			console.log(done);
		}, function (cancel) {
			console.log(cancel);
		}, function (invokeError) {
			console.log(invokeError);
		});
	},

 So is this the correct way?

Contributor
Posts: 16
Registered: ‎08-27-2011
My Device: Curve9300, PlayBook
My Carrier: SFR

Re: Opening Email Client on BB10

Javascript is not a typed language, depending on parameter types when you call 

function(subject, body, to)

 

it may work and may not. I used the following in my app (not approved yet). Hope this helps:

		blackberry.invoke.card.invokeEmailComposer({
			subject: "this subject is a string",
			body: "body is a text string",
			to: ["emailRecipientsIsAArrayEvenItHasOnlyOneElement@hotmail.com"]
		}, function (done) {
			console.log(done);
		}, function (cancel) {
			console.log(cancel);
		}, function (invokeError) {
			console.log(invokeError);
		});

 

 

Highlighted
Contributor
Posts: 33
Registered: ‎01-17-2013
My Device: BB10 Dev Alpha Sim
My Carrier: Verizon

Re: Opening Email Client on BB10

Cool, i am passing in vars of the right type.

So i will send it off and update it later if it doesn't work.
Developer
Posts: 314
Registered: ‎03-28-2012
My Device: Curve 9360, Playbook, BB10 Dev Alpha
My Carrier: TMN

Re: Opening Email Client on BB10

just make sure the "to" is an array of strings, not just a string Smiley Happy

Nuno