Languages

Menu
Sites
Language
Callback not work after activating other apps in Recent Apps

Hi, I am writing an ui app with a callback registered for display state change. This callback can be triggered normally even when the app is paused and have another app running at foreground.

 

However, once another app is re-activated from Recent Apps, this callback will no longer be triggered. Tested using Ecore Timer function and have the same result.

 

Anyone knows if it is normal? Using Gear S3 with OS 2.3.2.4. Thanks in advance!

 

Edited by: V Wong on 03 Oct, 2017
View Selected Answer

Responses

5 Replies
Armaan-Ul- Islam

I would suggest you to place log print in app life cycle callbacks.

That would detect which state your application enters, when another app is re-activated from Recent Apps.

 

static void
app_pause(void *data)
{
    dlog_print(DLOG_INFO, LOG_TAG, "app_pause called");

}

static void
app_resume(void *data)
{
	dlog_print(DLOG_INFO, LOG_TAG, "app_resume called");

}

static void
app_terminate(void *data)
{
	dlog_print(DLOG_INFO, LOG_TAG, "app_terminate called");

}

 

Related documentation:

https://developer.tizen.org/development/guides/native-application/application-management/applications#state_change

V Wong
Thanks for the suggestion. Actually I did. My app changes to Paused state when return to home. However, the callback will not be triggered anymore if an app (e.g. calculator) is resumed from Recent App. However, if I run calculator directly, the callback will be triggered and app_resume() is called as well.
V Wong

Further tested.

 

1. Run my app with ecore timer added

2. Return to home; my app is PAUSED but timer still run

3. Run an app, e.g. calculator, and return to home; timer still run

4. Run another app, e.g. media browser, and return to home; timer STOP running

 

If reactivate my app from Recent Apps, it is RESUMED; timer resumes running.

:(

Mark as answer
V Wong

Finally, created and packaged a service app for the display state change callback. Works as expected so far.

Armaan-Ul- Islam

Good to Know. You're welcome.