语言

Menu
Sites
Language
Launch App within same package

Hi All,

I have two service apps. I have added one app to another by specifying project reference in Properties > Project References.

I want to send launch request from one app to another. 

It fails when both are in same package and works fine when I install both service app independently.

So how to launch services when they are packaged in single package ?

Thank you.

响应

6 回复
Alex Ashirov

Hi,

I don’t think that it’s good idea to pack 2 service apps in the single package without UI Web or Native apps. Usually, you should pack UI app with 1 or more service apps. Do you have no UI app?

BTW, how do you send the launch request?

Dharmesh Guna

Hi Alex,

I am sending launch request by following way. I have added necessory privileges too.

app_control_h app_control;

app_control_create(&app_control);
app_control_set_operation(app_control, APP_CONTROL_OPERATION_DEFAULT);
app_control_set_app_id(app_control, app_id.c_str()); // 

if (app_control_send_launch_request(app_control, NULL, NULL) == APP_CONTROL_ERROR_NONE)
{
   awlog_information("Succeeded to launch %s.",app_id.c_str());
}
else

{
    awlog_error("Failed to launch %s.",app_id.c_str());
 }

Alex Dem

Hi,
Looks like it is not possible in Tizen to pack 2 service apps (one into another). I have added reference and have created package (Build Package->TPK). No appropriate changes in 'tizen-manifest' and inside 'bin' folder inside 'tpk'.
It is possible to pack service into UI apps only (Web or Native).
Alexey.

Dharmesh Guna

Hi Alex,

In my entire package. I have 1 UI App and 4 service App.

UI App triggers one service app and service app will manage (Send launch request etc) all other services.

Dharmesh Guna

Hi  Alex AshirovAlex Dem,

I resolved this issue. My service apps are using shared libraries which I kept in lib folder in individual projects.

I manually copied all libs to parent project's lib folder and changed necessory library settings. 

It is working now.

Thank you.

Alex Ashirov

Hi,

Thank you for the explanation. Indeed, all projects from the same package use the same data, shared, lib etc folders.