通知不在实际硬件(齿轮s3)上显示,但在模拟器上显示

时间:2019-08-08 06:06:03

标签: web-applications notifications tizen

我想用计时器发出通知。 我的代码可以在模拟器上运行,但不能在真正的硬件上运行。

我拥有电源,互联网,通知,应用程序。我的应用程序具有启动特权。

为什么不起作用?

var appControl = new tizen.ApplicationControl(           “ http://tizen.org/appcontrol/operation/create_content”,为空,“ image / jpg”,为空);       var notificationDict =       {         内容:“这是一个简单的通知。”,         iconPath:“ ./ logo_STEMS.jpg”,         soundPath:“ ./ sound_noti.wav”,         振动:是的,         appControl:appControl       };

  var notification =
      new tizen.StatusNotification("SIMPLE", "Simple notification", notificationDict);

  tizen.notification.post(notification);

1 个答案:

答案 0 :(得分:0)

您正在使用不赞成使用的API。改用UserNotification:

请参阅https://developer.tizen.org/ko/development/guides/web-application/notifications?langredirect=1上的“注释”