app_control_h request;
int ret;
bool running = false;
+ int nTimeoutId = 0;
app_manager_is_running(TEST_APPID, &running);
if(!running)
{
app_control_create(&request);
if (!request)
+ {
+ FPRINTF("[Line : %d][%s] app_control_create failed \\n", __LINE__, API_NAMESPACE);
return;
-
+ }
ret = app_control_set_app_id(request, TEST_APPID);
if (ret != APP_ERROR_NONE)
+ {
+ FPRINTF("[Line : %d][%s] app_control_set_app_id failed \\n", __LINE__, API_NAMESPACE);
return;
-
+ }
ret = app_control_send_launch_request(request, ReplyCB, NULL);
if (ret != APP_ERROR_NONE)
+ {
+ FPRINTF("[Line : %d][%s] app_control_send_launch_request failed \\n", __LINE__, API_NAMESPACE);
return;
+ }
+ g_pNotificationMainLoop = g_main_loop_new(NULL, false);
+ nTimeoutId = g_timeout_add(5000, Timeout, g_pNotificationMainLoop);
+ g_main_loop_run(g_pNotificationMainLoop);
+ g_source_remove(nTimeoutId);
+ g_pNotificationMainLoop = NULL;
}
return;
}