Hi,
I want to send email/sms programatically from Tizen Web application.
I tried to ran the same code to send SMS given in Tisen documentation on Emulator. Following is the code that I am trying to execute. I can send Send Email on console after that I don't see any thing from messageSent, messageFailed or serviceErrorCB. Not sure what happening.
function sendEmail(){
console.log("Send Email");
tizen.messaging.getMessageServices("messaging.sms",
serviceListCB,
serviceErrorCB);
}
// Define the success callback.
function messageSent(recipients) {
console.log("The SMS has been sent");
}
// Define the error callback.
function messageFailed(error) {
console.log("The SMS could not be sent " + error.message);
}
// Define service error callback.
function serviceErrorCB(error) {
console.log("Cannot get messaging service " + error.message);
}
// Define the success callback.
function serviceListCB(services) {
if (services.length > 0) {
// SMS sending example
var msg = new tizen.Message("messaging.sms", {plainBody:"I will arrive in 10 minutes.",
to:["+34666666666"]});
// Send request
services[0].sendMessage(msg, messageSent, messageFailed);
}
}