Languages

Menu
Sites
Language
How to call file system, camera, gallery

 

Hi, gues. Please help me to call file system, camera, gallery from my Web Application.

Explain in detail. I create Web Application. It has some buttons (for example 'Open Gallery'). How to open Gallery (or camera, file sys) in Tizen Emulator from my app using Web API.

Thanks in advance.

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

Responses

9 Replies
Lakshmi Grandhi
Before using the code below please privileges inside config file To call gallery use the below code var appControl = new tizen.ApplicationControl("http://tizen.org/appcontrol/operation/pick", null, "image/*"); tizen.application.launchAppControl(appControl, null, function(){console.log("launch appControl succeeded");}, function(e){console.log("launch appControl failed. Reason: " + e.name);}, ); To call filesystem you have decide which folder to access tizen.filesystem.resolve( 'documents', function(dir){ documentsDir = dir; dir.listFiles(onSuccessFilesList,onerrorFiles); }, function(e){ console.log("Error" + e.message); }, "rw" ); For camera use the below code tizen.application.launch("hdufar9ycj.Camera", sucess());
Enjo
Thank you, Lakshmi Grandhi. But to the camera ReferenceError: Can't find variable: success. I noticed some problem: not always work well Web API (not in camera, filesys, gallery).
Enjo
file sys does not start, but privileges inside config file filesystem read/write. And in your example hdufar9ycj.Camera. hdufar9ycj - id of application?
Lakshmi Grandhi
you want to get contents of folder or you want to launch "my Files" App?? Yes "hdufar9ycj.Camera" id of Camera Application.
Enjo
yes, i want to launch app "my files" (were folders tree). camera was start when i del succes() func
Lakshmi Grandhi
you can use myfiles application id to launch it App if for MyFiles App is "0pnxz8hbsr.MyFiles"
Enjo
Thank you, Lakshmi Grandhi, it works. Where did you get this objects: hdufar9ycj and 0pnxz8hbsr?
Lakshmi Grandhi
Hi Enjo, In Emulator under /opt/apps folder you will get the ids of all installed applications.
Enjo
Very hepful, thank you very math!