언어 설정

Menu
Sites
Language
How to rescan media files from sdcard for the Gallery application?

Hi.

I have a question for Tizen native coding. 

My app has a function that it can save image to media folder in SD card. 

As we know, the app "Gallery" shows images from the media folder "Images". 

When my app saves a image to SD card, the Gallery image list does not include the save file. 

If I reboot the device, the Gallery image list includes the save file. 

How can I make the Gallery image list contain my save image files whenever my app saves images?


 

Thanks,

Daegeun.

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

Responses

5 댓글
Alex Dem

Hi
Images visible from Gallery are placed in '/opt/usr/media' folder. As I know to make your image visible from Gallery you should use Tizen::Content::ContentManager::CreateContent  method. Here is example presented in Tizen help:
https://developer.tizen.org/help/index.jsp?topic=%2Forg.tizen.native.apireference%2FclassTizen_1_1Content_1_1ContentManager.html
This method copies source file to destination file in appropriate folder.
You could try to save an image to SD card using ContentManager::CreateContent  method. But I don't sure that it will works.
I was not able to create content (but I did not check external storages) on Tizen file system in another location . Only inside '/opt/usr/media' folder.
Alexey.

You have to use the content manager save file to temp folder first and then move it to media folder using content manager CreateContent. Then delete the the temp file I have reported I bug in the method that delete the original temp file automatically but locks the destination folder bug report https://bugs.tizen.org/jira/browse/TDIST-437
Dinal Jivani

Hello  DAE LIM ,

 

i am working on the same type of project , i am not getting how to store image to sd card ,

can you please help me ?

 

i had already loaded the image in Evas Image Object from a URL but not getting how to download it to the device and store on Sd Card , so please help me out.

Shaswati Saha

Hi Dinal Jivani,

I guess you're looking for similar thing described into this link. You may have a look!

Dinal Jivani

Thank you Shaswati Saha

 

i got it properly , but now i am having the same problem, as  DAE LIM mentioned above

image downloaded and stored to DOWNLOADS folder but not showing in the gallery , and after rebooting the phone it is shown..

is there any solution you found for that ?