Languages

Menu
Sites
Language
Programmatically taking a photo

Hi!

On Tizen 2.4 web app I see no way to take a photo from my web app.

All sample camera apps can only take screenshot from camera preview.

 

Even on Gear web app we can access camera capabilities by using navigator.tizCamera.createCameraControl.

I.e., on Tizen 2.4 there is no navigator.tizCamera for web app.

Any solution ?

Responses

3 Replies
Armaan-Ul- Islam

Hello,

I deployed the sample app & it worked fine for me. Add the 'mediacapture' privilege in the config.xml file.

<tizen:privilege name="http://tizen.org/privilege/mediacapture"/>

You may check the Camera Guide.

navigator.tizCamera.createCameraControl(stream, gotCameraCallback, noCameraCallback); 
function gotCameraCallback(cameraControl){
    ..
    }
cameraControl.image.takePicture(takePictureSuccess, takePictureError);    
Serhii Kolomiiets

Hi!

You deployed it to which device ?

It worked fine for me on Sasung Gear but there is no such API for Samsung Z1+ on SDK 2.4 ...

Armaan-Ul- Islam

I deployed on Samsung Z1. You might like to start from:

 

New > Project > Tizen Web Project > Online Sample > Multimedia > Self Camera

 

Please check this Tip & Tech document, Taking a photo using Samsung Z1 is described step by step here. 

Using Rear Camera in Tizen Web Application