Languages

Menu
Sites
Language
Sending SMS with WebApp on Gear S

I am tryong to send SMS in an App with a Samsung Gear S. Unfortunately this does not really seem to work. JS comes back with that this package/message is not supported? Any idea what I did wrong? Or is this not available on the Samsung Wearable SDK?

See also: http://stackoverflow.com/questions/27290483/sms-sending-in-webapi-with-samsung-gear-s. I used the following code from the web.

// Define the success callback.
function messageSent(recipients)
{
    if (bDebug)
        alert("The SMS has been sent");
}

// Define the error callback.
function messageFailed(error)
{
    alert("The SMS could not be sent " + error.message);
}

// Define service error callback.
function serviceErrorCB(error)
{
    alert("Cannot get messaging service " + error.message);
}

// Define the success callback.
function serviceListCB(services)
{
    try
    {
        if (services.length > 0)
        {
            var msg = new tizen.Message("messaging.sms",
            {
                plainBody : "Hilferuf von Nummer: " + smsnumber + ": "
                        + vorname + " " + nachname + ": " + adresse,
                to : [ smsnumber ]
            });
            // Send request
            services[0].sendMessage(msg, messageSent, messageFailed);
        }
    }
    catch (e)
    {
        alert("serviceListCB Problem - " + e.message);
    }
}


function sendSMS_tizen(smsno)
{
    if (bDebug)
        alert("Versuche SMS zu senden an " + smsno);
    smsnumber = smsno;
    try
    {
        tizen.messaging.getMessageServices("messaging.sms", serviceListCB,
                serviceErrorCB);
    }
    catch (e)
    {
        alert("tizen.messaging nicht definiert- " + e.message);
    }
}

Responses

1 Replies
AVSukhov

Hello,

I have not seen information about supporting Messages API on Tizen wearable SDK.