언어 설정

Menu
Sites
Language
Watch face (Countdown Timer)

I would like to build a wearable gear S2 watch face using native programming instead of web. I need to add a countdown timer (showing xxx seconds to actual pre-configured alarm time) just below the time on the watch. Something like a pre-configured alarms built in to the watch. Is that possible using Tizen SDK native?

Please assist, thanks!

Responses

4 댓글
SRPOL Wearables

Could you clarify what you are asking for ?

You want to know how to develop countdown timer?

Or if Tizen SDK provides functionality for time countdowning ?

I think you can just develop your own counter. Just google for "countdown timer c"

Nafisul Islam Kiron

Hello, you can use alarm api "alarm_get_scheduled_date(alarm_id, &date)" to get the "alarm id" and date/time.

Then use "alarm_time = mktime(&date)" to get the time. Then find time difference from this time with current time.

The time difference is the time remaining before your alarm triggers.

Now you can put that value on your watchface and update it with time.

 

You can check this link for managing alarm and retrieving alarm info.

https://developer.tizen.org/development/tutorials/native-application/application-framework/application/alarm

Tizen is me

Hi, thanks for the tip, do you know how to wake up after alarm called ? If the watchface in ambient mode, how to change to bright mode ?

 

 

Safwan

@Tizen is me

 

A way to achieve that functionality would be to add an appControl with the alarm to launch Gear Home app (& that is: Wathface)

Gear Home/ Wathface app id for Samsung wearable: "com.samsung.w-home"

 

Links related:

https://developer.tizen.org/zh-hans/development/guides/native-application/application-management/application-controls

https://developer.tizen.org/zh-hans/development/api-references/native-application?redirect=/dev-guide/3.0.0/org.tizen.native.wearable.apireference/group__CAPI__ALARM__MODULE.html#ga7482fbe871f22215170c8cb1013fb8d6