[app manager tutorial] Fix sample code.
authorhyunho kang <hhstark.kang@samsung.com>
Mon, 9 Nov 2015 00:03:20 +0000 (09:03 +0900)
committerhyunho kang <hhstark.kang@samsung.com>
Mon, 9 Nov 2015 00:05:06 +0000 (09:05 +0900)
Change-Id: Ie9f190483c6911995acb884eb0170cde99aa7b94
Signed-off-by: hyunho kang <hhstark.kang@samsung.com>
org.tizen.tutorials/html/native/app_framework/app_manager_tutorial_n.htm

index 0fa6139..29bbe2b 100644 (file)
@@ -161,21 +161,23 @@ ret = app_info_filter_add_string(app_info_filter, PACKAGE_INFO_PROP_APP_TYPE, &q
 <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)
 {
 &nbsp;&nbsp;&nbsp;int ret;
 
 &nbsp;&nbsp;&nbsp;char *app_id = NULL;
 
-&nbsp;&nbsp;&nbsp;app_info_get_app_id(app_info, &amp;app_id);
+&nbsp;&nbsp;&nbsp;if(app_info_get_app_id(app_info, &amp;app_id))
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;return false;
 
 &nbsp;&nbsp;&nbsp;dlog_print(DLOG_INFO, TAG, &quot;app_id \t= [%s]\n&quot;, app_id);
 
 &nbsp;&nbsp;&nbsp;free(app_id);
+
+&nbsp;&nbsp;&nbsp;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)
 {
 &nbsp;&nbsp;&nbsp;dlog_print(DLOG_ERROR, TAG, &quot;foreach_app_info_filter error : %d&quot;, ret);