Sms 使用三星Gear S在WebAPI中发送短信
有没有人找到一个使用WebAPI将应用程序中的SMS集成到三星Gear S的工作示例 我找到了tizen的两个示例,但没有一个与齿轮S一起使用。经过轻微调整后,它们看起来像这样: 第一次尝试:Sms 使用三星Gear S在WebAPI中发送短信,sms,tizen,Sms,Tizen,有没有人找到一个使用WebAPI将应用程序中的SMS集成到三星Gear S的工作示例 我找到了tizen的两个示例,但没有一个与齿轮S一起使用。经过轻微调整后,它们看起来像这样: 第一次尝试: function sendSMS(smsno) { if (bDebug) alert("Versuche SMS (sendSMS) zu senden an " + smsno); smsnumber = smsno; try { va
function sendSMS(smsno)
{
if (bDebug)
alert("Versuche SMS (sendSMS) zu senden an " + smsno);
smsnumber = smsno;
try
{
var appControl = new tizen.ApplicationControl(
'http://tizen.org/appcontrol/operation/compose', 'sms:'
+ smsnumber);
tizen.application.launchAppControl(appControl, null, function()
{
}, function(e)
{
alert("SMS konnte nicht gesendet werden: " + e.message);
},
{
onsuccess : function()
{
},
onfailure : function(er)
{
alert("SMS konnte nicht gesendet werden: " + er.message);
}
});
}
catch (e)
{
alert("http://tizen.org/appcontrol/operation - " + e.message);
}
}
第二次尝试:
// 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);
}
}
不幸的是,三星的文档在这方面非常不具体
欢迎有任何想法 这两种解决方案都来自Mobile profile。它在Gear S上不起作用。不幸的是,现在有了从Gear S上的web api发送sms的方法。这就是为什么没有关于此的文档;) 好的,谢谢。意味着为Gear S开发一个用于发送短信的本机应用程序。我还有一个坏消息:你不能在Gear S上编写本机应用程序。SDK不支持这一点(本机仅适用于手机)-我建议在Tizen论坛上搜索;)是的,同时我也意识到了这一点。太糟糕了。我真正想知道的是Gear S有一个“消息”应用程序,可以发送短信。也许有一种使用内置MessaginApp发送短信的方法?你找到使用内置应用程序的方法了吗?在Gear S中,可以找到com.samsung.message.appcontrol.compose的定义(与tizen.application.getAppsInfo(onListInstalledApps)核对)。但是没有可用的文档如何使用它。有人知道该功能吗?