Languages

Menu
Sites
Language
"app_ambient_tick" is not called.

Hello,

 

I am developing a native watch face, and I have a problem with implementing an ambient mode.

 

The problem is simple,

 

"app_ambient_tick" is not called by system.

 

I have tested that problem with my watchface, and tizen sample watch face(DIGITAL) on both a gear S2 and an emulator.

 

No call from the system, so I could not update the watch in the ambient mode.

 

It seems that the web project works well in the ambient mode, but native one did not.

 

Please check the problem,

 

Thanks.

 

 

Responses

23 Replies
Jeongsu Kim

Please check whether "Ambient support" is selected in tizen-manifest.xml -> Advanced tab.

 

And you have to wear Gear S2 to see ambient mode.

Song

Yes, sure, I checked that option.

 

Did you test on your device or emulator whether that API is called by system properly?  

 

I test on two desktop and one gear s2, and all the test were failed. 

 

Thank you..

 

woochan lee

Hello.

 

app_ambient_changed callback called successfully in my sample application on emulator.

 

I turn on the display mode as Always on before test it. (setting->display->check always on)

After that app_ambient_changed callback called at least once per minute or when the device enters the ambient mode.

 

I hope this helps.

Song

Hello, Thank you for your test.

 

I am also testing under same setting, but it is called at once right after ambient mode changed callback. 

 

It does not called at every minute. 

 

I am not sure what is wrong with my app or the sample app.

 

Did you test with the sample app? or did you make your own code??

 

Could you share the code snippet in relation with the ambient tick?

 

Thank you

 

 

woochan lee

Hello,

I do nothing for this. :(

I only added new watch sample project. then added some logs for test.

01-14 14:30:59.990 : ERROR / watchsample1 ( 2366 : 2366 ) : ambient tick!

01-14 14:31:59.990 : ERROR / watchsample1 ( 2366 : 2366 ) : ambient tick!

01-14 14:32:59.990 : ERROR / watchsample1 ( 2366 : 2366 ) : ambient tick!

 

As you can see above logs, the callback is called well in my emulator at least every one minute.

 

why don't you update your sdk to get latest version?

 If you already do that... i really have no idea to solve  your problem.

Um... How about make a new sample application and test it? actually very sometimes i got a weird bug on emulator. :(

 

 

My SDK information below.

Tizen SDKVersion : 2.4.0 Rev2

Build id : 20151116-1230

 

I hope you got solution.

Song

Hello, 

I already tested with the latest SDK, and also failed to get the ambient tick.

 

Did you test with native code? In my case only the native one failed to get the callback.

 

Thank you.

 

 

woochan lee

Hello, 

 

Oops, i missed my guide for that;;;;(This site CSS is broken in explorer)

You should turn on the display mode to Always on

(setting->display->Check Always on)

 

I did that before callback test :)

And i test on the native watch sample that provided by sdk.

 

Thanks.

Song

It is very intereting problem,

 

This problem is not only reproduced by my face, it is also reproduced a watch face on the market.

 

On my device, Gear S2, SM-r730S, R730SKSU1AOKE, 

the face downloaded from market, named "Gear O'Clock:December", 

Just failed to update the time under the ambient mode, NOT only for my app.

 

I have tested the API throughout my app and sample app, and downloaded others app,

on my device and emulators. 

 

All of them just failed. It seems that only the web project can receive the callback.

 

Please share your code to test, 

 

woochan lee
static void
app_time_tick(watch_time_h watch_time, void *data)
{
	/* Called at each second while your app is visible. Update watch UI. */
	dlog_print(DLOG_ERROR, LOG_TAG, "ambient tick!");
	appdata_s *ad = data;
	update_watch(ad, watch_time, 0);
}

I only added this dlog_print there... there is no other changes.

Um... sounds weird.

 

Even you build a new watch sample project. is that issue still there?

 

Song

I am very stressed with this problem :(

 

It seems that you attached wrong part of the project, because the app_time_tick is a callback for active mode.

 

and the answer for your question is, YEP! still there.

 

You may test with the app on the market,  "Gear O'Clock:December". Which is developed by other developer.

 

 

woochan lee

Oops;;; Sorry again.. i got a lot of stuff to do. i attached wrong part of project. 

 

static void
app_ambient_tick(watch_time_h watch_time, void *data)
{
    /* Called at each minute while the device is in ambient mode. Update watch UI. */
    dlog_print(DLOG_ERROR, LOG_TAG, "ambient tick!");

    appdata_s *ad = data;
    update_watch(ad, watch_time, 1);
}

yea this is what you want...

 

test with eh app on the market?? 

New->Tizen Native project->Templete->Watch Application.

That's what i tesed. 

 

Um...did you turn on the display mode to always on? 

If i didn't do that. i also can't get a ambient_tick callback.

woochan lee

Oops;;; Sorry again.. i got a lot of stuff to do. i attached wrong part of project. 

 

static void
app_ambient_tick(watch_time_h watch_time, void *data)
{
    /* Called at each minute while the device is in ambient mode. Update watch UI. */
    dlog_print(DLOG_ERROR, LOG_TAG, "ambient tick!");

    appdata_s *ad = data;
    update_watch(ad, watch_time, 1);
}

yea this is what you want...

 

test with eh app on the market?? 

New->Tizen Native project->Templete->Watch Application.

That's what i tesed. 

 

Um...did you turn on the display mode to always on? 

If i didn't do that. i also can't get a ambient_tick callback.

woochan lee

Oops;;; Sorry again.. i got a lot of stuff to do. i attached wrong part of project. 

 

static void
app_ambient_tick(watch_time_h watch_time, void *data)
{
    /* Called at each minute while the device is in ambient mode. Update watch UI. */
    dlog_print(DLOG_ERROR, LOG_TAG, "ambient tick!");

    appdata_s *ad = data;
    update_watch(ad, watch_time, 1);
}

yea this is what you want...

 

test with eh app on the market?? 

New->Tizen Native project->Templete->Watch Application.

That's what i tesed. 

 

Um...did you turn on the display mode to always on? 

If i didn't do that. i also can't get a ambient_tick callback.

Song

Yep Sure, I am watching an ambient mode face while on testing.

 

Thank you for your support, I will try on other computer...

Song

Hello,

 

Please see my latest reply,

 

Thank you.

Jeongsu Kim

Did you wear your Gear S2 when you test ambient mode?

It is not working when you don't wear the device to reduce power consumtion.

Song

Hello, sure, I did.

Please check my latest reply.

 

Thank you.

 

woochan lee

how can i delete wrong attached comment;;;;;I hate this board

even i can't modify;;;

 

Sorry,,, i made it dirty.

Song

Hello, this is reminder for my question.

 

Please check my latest reply.

 

Song

Dear, All,

 

I found a difference between Mr. Lee and me. 

 

I could receive THE CALLBACK based on the Mr. Lee's code.

 

Mr. Lee's code is tested based on a pre-installed sample project of the SDK 4.0 Rev.0.2, let's call it as "A".

However, my apps are builed based on a online-sample-project of the SDK 4.0.Rev.0.2 or a pre-installed sample project of the SDK 2.3.1, let's call is as "B"

 

When I try to test with "A", I could get the callback, ambient_tick, HOWEVER, still I can't receive the callback with "B".

So I investigate "A" and "B" to find a main reason for the problem.

 

I think that "A" does not use an edc file but "B" use an edc file. That's only difference between them I could found.

However, I think that difference should not make the problem. 

 

Please, test based on "B", the online-sample-app which you can download using SDK 2.4 or the preinstalled-digital-watch-sample of SDK 2.3.1.

 

Thank you.

 

 

 

 

 

Song

By the way, anyone did test the watchface  "Gear O'Clock:December" which can download from market.

 

If the problem only occurs on my gear S2, I should refund my gear S2.

 

Thank you.

Sukwon Suh

Ambient mode will work on your wrist only. I think your gear is not on your wrist.

Vladyslav Prysiazhnyi

Hello,

I have faced with the same problem and realized that your app should use http://tizen.org/privilege/alarm.set previlege to be able use ambient_tick