Languages

Menu
Sites
Language
Tizen notification SDK version 2.2

Hi, I'm using a Samsung Gear S and I want to use a notification when the Gear S receives a message from the server. I've found the notification api (https://developer.tizen.org/dev-guide/latest/org.tizen.web.apireference/html/device_api/wearable/tizen/notification.html#Notification) but this only works for a SDK version of 2.3.1 or higher. Since the Gear S only supports version 2.2, I can not use this functionality. How can this be done for the Gear S? I would like to let it vibrate and light up the screen with a message. Thanks

Responses

5 Replies
Nafisul Islam Kiron

Hello, notification api is available since 2.0 according to this link

https://developer.tizen.org/dev-guide/2.4/org.tizen.web.apireference/html/device_api/mobile/tizen/notification.html

 

You can check this link for rich notifications

http://developer.samsung.com/galaxy#rich-notification

Tim Deweert

Yeah but I get the following error:

TypeError: 'undefined' is not a constructor (evaluating 'new tizen.StatusNotification("SIMPLE", "Simple notification", notificationDict)') 

I'm using version 2.2. Could it perhaps be that this is not supported for the Gear S but for other devices?

Nafisul Islam Kiron

Please try like this

 try {
      var notificationDict = {
                  content : "This is a simple notification.",
                  iconPath : "images/image1.jpg",
                  soundPath : "music/Over the horizon.mp3",
                  vibration : true,
                  ledColor : "#FFFF00",
                  ledOnPeriod: 1000,
                  ledOffPeriod : 500 };

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

      tizen.notification.post(notification);
 } catch (err) {
      console.log (err.name + ": " + err.message);
 }

According to https://developer.tizen.org/dev-guide/2.4/org.tizen.web.apireference/html/device_api/mobile/tizen/notification.html

this is available since 2.2
 

Marco Buettner

He use Gear S, a wearable device with WEARABLE PROFILE. On wearable profile NOTIFICATION API was added with Tizen 2.3.1! So Gear S with Tizen 2.2 DOESN'T SUPPORT the NOTIFICATION API.

See: https://developer.tizen.org/dev-guide/2.3.1/org.tizen.web.apireference/html/device_api/wearable/index.html#User%20Interface

Marco Buettner

I never use Rich Notification, but I think it could be helps you

http://developer.samsung.com/galaxy#rich-notification