Monitoring Visibility Changes of Other Applications in Tizen

Original Created Dec 25, 2016 | Regeneration Apr 22, 2026

How can I receive a callback when the visibility of any application changes on Tizen? Specifically, I want to be notified in my service when a new app is launched, including the app ID, so I can track application visibility. The current documentation is unclear about this functionality. Could someone provide guidance on implementing this?

Problem Understanding

The user wants to monitor visibility changes of all applications running on a Tizen device, particularly when applications become visible to the user (foreground state). This requires a mechanism to receive callbacks with application IDs when other apps' visibility states change.

Solution Methods

  1. Application State Monitoring:

    • While Tizen doesn't provide direct callbacks for other apps' visibility changes, you can monitor application state changes using the Application Manager API.
    • The available states are: READY, CREATED, RUNNING, PAUSED, and TERMINATED.
    • Note that service applications don't have a PAUSED state since they lack UI.
  2. Task Manager Sample Application:

    • Review the Task Manager sample app that demonstrates how to track running applications.
    • This sample shows how to get application IDs and monitor their states.
    • Location: New Project → Sample → Mobile → Native Application → AppFw → Taskmanager

Code Examples

// Example of setting up application state change callback
void app_state_changed(app_control_h app_control, app_state_changed_e state, void *user_data) {
    char *app_id = NULL;
    app_control_get_app_id(app_control, &app_id);
    
    if (state == APP_STATE_RUNNING) {
        dlog_print(DLOG_INFO, "APP_STATE", "App %s is now visible", app_id);
    }
    // Handle other states as needed
}

// Register the callback
app_manager_set_app_state_changed_cb(app_state_changed, NULL);

Additional Tips

  • The Task Manager sample provides practical implementation details for tracking application states.
  • Be aware of privacy and security restrictions when monitoring other applications.
  • For service applications, focus on the RUNNING state as they don't have UI-related states.

Customize your cookie preferences

You can enable or disable non-essential cookies. Essential cookies are always on to ensure the site works properly and to keep you signed in.

Necessary

These cookies are necessary for the website to function properly and cannot be switched off. They help with things like logging in and setting your privacy preferences.

Always on

Analytics

These cookies help us improve the site by tracking which pages are most popular and how visitors move around the site.

Enable analytics cookies
Public Forum Public Forum
Employees only. Please sign in with your company account.