Languages

Menu
Sites
Language
Start another native UI app from service

Hi

 

I woud like to start my native UI app from my service and pass a few parameters.

I tried this code:

        AppId appID = L"gh13434dad"; // my UI app id 
    	ArrayList* pArgList = new ArrayList();
		pArgList->Construct();

		String * aArg_msg 	 = new String(text);
		String * aArg_address = new String(address);
		pArgList->Add(*aArg_msg);
		pArgList->Add(*aArg_address);

		r = pAppManager->LaunchApplication(appID pArgList, AppManager::LAUNCH_OPTION_DEFAULT);

this code doesn't start UI app. I got result: E_OBJ_NOT_FOUND. The UI app is installed correctly and can be launch by icon anytime.

I saw comment that this method is deprecated. Is that reason it can't start another app?

 

How to start another own native UI app from service app? And how to pass and read parameters in launched app ?

 

Regards

slaw

 

 

 

Responses

2 Replies
Alex Dem

Hi
In your code appId should be application ID.
As I know you can't use :AppManager::LaunchApplication with args list - this way is deprecated. You should use appControl functionality
Look at this article:
https://developer.tizen.org/dev-guide/2.2.1/org.tizen.native.appprogramming/html/guide/app/app_controls.htm
You should perform these steps consequentially (find below the page):
1) Exporting AppControl functionality (how to edit your UI application)
2) Resolving AppControls (how to launch from service your UI app)
3) Delivering launch arguments (how launch arguments from service will pass into OnAppControlRequestReceived of your UI app)
Alexey.

Slawek Kowalski

Thanks Alex. Works excellent. As you described.