Launching a service_app from gui_app?

47 Views Asked by At

I have created a Tizen 5.5 Wearable native GUI, and native service app.

Both are working fine standalone. GUI app has appmanager.launch privilege.

I wish to start the service app from the gui app:

if (APP_CONTROL_ERROR_NONE != (error_code = app_control_set_app_id(app_control, SERVICEAPP_ID))) {
    dlog_print(DLOG_ERROR, LOG_TAG, "app_control_set_app_id failed (%d)!", error_code);
    return;
}
if (APP_CONTROL_ERROR_NONE != (error_code = app_control_set_operation(app_control, APP_CONTROL_OPERATION_DEFAULT))) {
    dlog_print(DLOG_ERROR, LOG_TAG, "app_control_set_operation failed (%d)!", error_code);
    return;
}
if (APP_CONTROL_ERROR_NONE != (error_code = app_control_send_launch_request(app_control, app_control_result, ad))) {
    dlog_print(DLOG_ERROR, LOG_TAG, "app_control_send_launch_request failed (%d)!", error_code);
    return;
}

Now when this code runs, it logs

app_control_send_launch_request failed (-17825757)!

I have dig myself into the Tizen code, and this result is APP_CONTROL_ERROR_LAUNCH_REJECTED, which has some references here: https://docs.tizen.org/application/native/api/wearable/5.5/group__CAPI__APP__CONTROL__MODULE.html#gaeeb755a791bdbc5a6fc6d41614e80c1b

Remarks: The function returns APP_CONTROL_ERROR_LAUNCH_REJECTED if the operation value is APP_CONTROL_OPERATION_LAUNCH_ON_EVENT which is only for handling the event from the platform or other application, refer to the Event module. Since Tizen 3.0, the launch request of the service application over out of packages is restricted by the platform. Also, implicit launch requests are NOT delivered to service applications since 3.0. To launch a service application, an explicit launch request with application ID given by the app_control_set_app_id() must be sent.

Okay, so let's find out how to create an "in-package" service app:

So I wanted to create this so-called multi package however Tizen Studio let me down:

enter image description here

How can I create multi-packaged native apps with Tizen5.5?

1

There are 1 best solutions below

0
Sangwook Lee On

Thanks for updating it here. In my case of me, I tested it on TizenStduio 5.0 It works fine. I can make multi-package of wearable 5.5(basicui + service app). When I see your image, I think that you did not install the fully sdk. Could you install the sdk again? Thanks