01-17-2013 08:24 PM
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?
01-18-2013 05:21 PM
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@h otmail.com"]
}, function (done) {
console.log(done);
}, function (cancel) {
console.log(cancel);
}, function (invokeError) {
console.log(invokeError);
});
01-18-2013 05:23 PM
01-19-2013 06:46 PM
just make sure the "to" is an array of strings, not just a string ![]()