Tizen Developers

Menu
Sites
Language
badges

Hi, did anyone get the badge guide up and running?

(currently at  https://developer.tizen.org/dev-guide/2.3.0/org.tizen.tutorials/html/web/tizen/ui/badge_tutorial_w.htm#manage)

 

The Tizen IDE builds my application just fine although the autocomplete does not find tizen.badge. I included the notification privilege in the config.xml, but when deploying the application to my samsung gear s, as well as in the emulator, the tizen.badge is undefined.

 

Any ideas?

 

 

 

Responses

6 Replies
Marco Buettner

Which SDK Version and Tizen version do u use on the device?

Vikram

Hello,

I think that currently Gear S doesn't support 2.3 yet and you need to check the help page of wearable SDK as below.

 

 - Managing the Badge Number-

Learning how to set and retrieve badge numbers is a basic badge management skill:

1.To set the badge number for a specific application, use the setBadgeCount() method:


     Note

    You can only set the badge number of those applications that are signed with the same author certificate as your own application.
 
    webapis.badge.setBadgeCount("AVbg1ZHu6l.BadgeSample", 3);

2.To get the current badge number of a specific application, use the getBadgeCount() method:
     var count = webapis.badge.getBadgeCount("AVbg1ZHu6l.BadgeSample");

 

Marco Buettner

If he use Tizen SDK 2.3, the autocomplete should well for tizen.badge, but it doesnt. So maybe some incorrect installed?
https://developer.tizen.org/dev-guide/2.3.0/org.tizen.web.apireference/html/device_api/wearable/tizen/badge.html

Do you use Tizen SDK 2.3 or Wearable SDK 1.0.0?

AVSukhov

Hello,

I think currently tizen wearable doen`t support this api on Gear s.

Try to use:

webapis.badge.setBadgeCount
Bert Vankeirsbilck

hello all,

thanks a lot for the replies!

I found that indeed, just replacing tizen.badge with the webapis.badge resolves my issue.

I'm working with the wearable SDK 1.0.0. and I was trying to find my way around with the Tizen SDK 2.3.0 documentation, which apparently doesn't work. This is kind of confusing for me, because I found on https://developer.tizen.org/profiles/wearable to follow a link to the 'Tizen wearable development guide' pointing to the 2.3.0 version.. 

 

So, I marked the answer from Vikram as the thread answer, but I do want to append that in fact, the help file included in the wearable SDK-1.0.0 points to the correct API. It turns out that this Badge structure was an extension by Samsung itself and hence wasn't documented in the Tizen documentation. In later Tizen versions (>2.3) this badge API was added to the Tizen specification. 

 

 

Marco Buettner

All documentations also available directly in the SDK (Help -> Help Content)