언어 설정

Menu
Sites
Language
Error launching browser with AppControl

I'm trying to launch the browser from within my native app. I use the code below, taken directly from the Native App Programming Guide in the IDE. I have the privelige http://tizen.org/privilege/application.launch in my manifest. However, if fails with the following error -

E/Tizen::App(10938): result Tizen::App::_AppControlManager::LaunchPkg(Tizen::App::_AppMessageImpl&, const char*, const char*, const char*, const char*, void (*)(void*, int, service_result_e, void*), void*) (313). > [E_SYSTEM] Launching service com.samsung.browser failure with -4

- does anyone why I am getting this error, or where I am going wrong?

 

 HashMap extraData;
   extraData.Construct();
   String urlKey = L"url";
   String urlVal = L"http://www.tizen.org";
   extraData.Add(&urlKey, &urlVal);

   AppControl* pAc = AppManager::FindAppControlN(L"tizen.internet",
                                                 L"http://tizen.org/appcontrol/operation/view");
   if (pAc)
   {
      pAc->Start(null, null, &extraData, null);
      delete pAc;
   }

Edited by: Brock Boland on 17 3월, 2014 Reason: Paragraph tags added automatically from tizen_format_fix module.

Responses

4 댓글
kavish
Hi Alan, Just add these two privilege and check if it is working or not. http://tizen.org/privilege/web.privacy http://tizen.org/privilege/web.service To launch browser need to add above privileges.
Alan Savage
Thanks for the quick response. I added these privileges to the manifest, but unfortunately the result is the same, I still get "Launching service com.samsung.browser failure with -4"
kavish
There is no issue with code which you have share. The issue with be some other piece of code . Any way there is one sample native application (WebViewer) to launch browser. Just build and run this application and see if it will launch this application or not.
Alan Savage
Thanks for the info. The WebViewer sample does indeed work. I really want to launch the external browser rather than embed a web view in my app however. I know that the application control api for web applications works perfectly for this purpose on the same device. I will check I have up to date firmware image and try again.