Languages

Menu
Sites
Language
ImageViewer AppControl Bug Or ..?

I can't open image using ImageViewer AppControl in sdk 2,2b on device

I am mograting one of my app and it used to work on 2.0

 

MyAppClass::VideoAppControlPlaySample(void)
{
    String uri = String(L"file://") + App::GetInstance()->GetAppDataPath() + "image.jpg";

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

// result Tizen::Io::FileEventManager::AddPath(const Tizen::Base::String&, long unsigned int)(71) > [E_FILE_NOT_FOUND] An entry for the specified path[/opt/apps/AppId/data/image.jpg] could not be found.
 

Is it only working for files located in MyFiles path or ... ?

 

 

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

Responses

10 Replies
john Smith
Hi, I have tested this, its working for me. you are migrating your app 2.0 to 2.2, then you need to do some modification manually. In manifest.xml, you need to change the API version 2.0 to 2.1 After that add privileges application.launch. for more info https://developer.tizen.org/help/index.jsp?topic=%2Forg.tizen.native.appprogramming%2Fhtml%2Fguide%2Fapp%2Fappcontrol_image.htm Try with that code snippet, which are available in SDK.
I have already changed the manifest API version and Application.Launch privilege was required since sdk 2.0 I am talking about images in app data folder not in the media folder The code snippet using "Environment::GetMediaPath()"!!
Bug reported and resolved by tizen team It used to work in sdk 2.0. I could view images but not anymore --------------------------------------------------------------------- Application's data folder cannot be shared with other applications. Because an appControl app is another one, the data folder cannot be accessed. Your application should store the file in shared folder to be accessed by imageviewer appcontrol. And the appcontrol call should be changed like below. String uri = String(L"file://") + App::GetInstance()->GetAppSharedPath() + "data/image.jpg"; For detailed info, please refer the help page's Tizen Native App Programming > Basics of Native App Programming > I/O Overview. ---------------------------------------------------------------------------------------
john Smith
Hi, Yes exactly, that is the issue. But thanks for updating Nour.
You are welcome But still I don't know how to view more than one image. In SDK 2.0 I used semicolon between every file path ...!
NOT POSSIBLE IN SDK 2.2B From Tizen dev team: Currently, this feature is not supported. We are now discussing about supporting this. Whether it is supported in SDK2.2 is not clear.
john Smith
Hi, Can you share little bit code snippet, actually i got confused.How you are doing that.
which one? I don't understand! This this the code from 2.2b documentation void MyAppClass::AppControlImageSample(void) { String uri = String(L"file://") + Environment::GetMediaPath() + L"Images/sample_image.jpg"; AppControl* pAc = AppManager::FindAppControlN(L"tizen.imageviewer", L"http://tizen.org/appcontrol/operation/view"); if (pAc) { pAc->Start(&uri, null, null, null); delete pAc; } } ---------------------------------------- If you want to use ImageViewer to view image located inside App data folder then you can't in 2.2b but it was possible in 2.0. The image must be placed in shared/data folder to be able to view it using ImageViewer AppControl so instead of String uri = String(L"file://") + Environment::GetMediaPath() + L"Images/sample_image.jpg"; use String uri = String(L"file://") + App::GetInstance()->GetAppSharedPath() + "data/image.jpg"; ----------------------------------------------- To view multiple images using ImageViewer in SDK 2.0, you could add semicolon after file path. Now in SDK 2.2b IS NOT POSSIBLE. Tizen team reported that in the bug tracker and they are discussing it .... but still not decided
john Smith
hi, ya i tried that, but i am also not able to view the multiple image. I also think, That is bug.
Tizen developers told me that viewing multiple images is not supported in 2.2b and the they are discussing it but still not decided