From: Hawnkyu Jhun Date: Sat, 21 Jan 2017 03:02:47 +0000 (+0900) Subject: Support app group instance launch X-Git-Tag: accepted/tizen/common/20170203.161556~3 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=refs%2Fchanges%2F10%2F111510%2F2;p=platform%2Fcore%2Fapi%2Fapplication.git Support app group instance launch The caller app can get the instance id of the callee app in the reply callback. Change-Id: I0950f63d30e560e5f1fe53bf80f9dde98efc63cd Signed-off-by: Hawnkyu Jhun --- diff --git a/app_control/app_control.c b/app_control/app_control.c index 5a3f983..b63d7fc 100755 --- a/app_control/app_control.c +++ b/app_control/app_control.c @@ -28,6 +28,7 @@ #include #include +#include #ifdef LOG_TAG #undef LOG_TAG @@ -655,7 +656,8 @@ static void __handle_launch_result(int launched_pid, void *data) app_control_reply_cb reply_cb; void *user_data; char callee[255] = {0, }; - int ret = 0; + char instance_id[256] = {0,}; + int ret; if (data == NULL) return; @@ -674,6 +676,13 @@ static void __handle_launch_result(int launched_pid, void *data) app_control_set_app_id(reply, callee); LOGI("app control async result callback callee pid:%d", launched_pid); + ret = aul_app_get_instance_id_bypid(launched_pid, instance_id, + sizeof(instance_id)); + if (ret == AUL_R_OK) { + app_control_set_instance_id(reply, instance_id); + LOGI("instance id(%s)", instance_id); + } + result = APP_CONTROL_RESULT_APP_STARTED; request = request_context->app_control; user_data = request_context->user_data;