<li>Call the <span style="font-family: Courier New,Courier,monospace">app_info_filter_foreach_appinfo()</span> function and use its callback to retrieve all filtered applications and print their information:
<pre class="prettyprint">
-void
-app_info_filter_cb(app_info_filter_h app_info, void *user_data)
+bool filter_cb(app_info_filter_h app_info, void *user_data)
{
int ret;
char *app_id = NULL;
- app_info_get_app_id(app_info, &app_id);
+ if(app_info_get_app_id(app_info, &app_id))
+ return false;
dlog_print(DLOG_INFO, TAG, "app_id \t= [%s]\n", app_id);
free(app_id);
+
+ return true;
}
-ret = app_info_filter_foreach_appinfo(app_info_filter_cb, NULL);
+ret = app_info_filter_foreach_appinfo(filter_cb, NULL);
if (ret != APP_MANAGER_ERROR_NONE)
{
dlog_print(DLOG_ERROR, TAG, "foreach_app_info_filter error : %d", ret);