Page 1 of 1

CameraControl - Android

Posted: Fri Jul 20, 2018 11:01 am
by Googie85
Hi Guys,

I am trying to take a photo from within android. The following code doesn't seem to work.

Code: Select all

cameraControlCreate "myFirstCamera"
      cameraControlSet "myFirstCamera", "visible", true
      cameraControlSet "myFirstCamera", "rect", "50,50,100,100"
      cameraControlSet "myFirstCamera", "device", "rear"
      cameraControlDo "myFirstCamera", "takePicture"
Any ideas are warmly welcomed!!

Thanks,

Googie.

Re: CameraControl - Android

Posted: Fri Jul 20, 2018 11:14 am
by Googie85

Code: Select all

      cameraControlCreate "myFirstCamera"
      cameraControlSet "myFirstCamera", "visible", true
      cameraControlSet "myFirstCamera", "rect", "50,50,100,100"
      cameraControlSet "myFirstCamera", "device", "rear"
      cameraControlDo "myFirstCamera", "takePicture"
      set defaultfolder to "/mnt/sdcard/"
      put the result into url ("file:snapshot.jpg")

Re: CameraControl - Android

Posted: Fri Jul 20, 2018 11:21 am
by Klaus
Hi Googie,

try this:

Code: Select all

...
cameraControlDo "myFirstCamera", "takePicture"
put specialfolderpath("external documents") & "/snapshot.jpg" into tImageFile
put the result into url ("file:" & tImageFile)
...
I think -> specialfolderpath("external documents") IS in fact -> mnt/sdcard/
but this is official syntax and surely worth a try.


Best

Klaus

Re: CameraControl - Android

Posted: Fri Jul 20, 2018 11:28 am
by Googie85
Thanks for your reply!!!

I cant even view what the camera is focused on. Any ideas with that?

Thanks Klaus!!

Googie.

Re: CameraControl - Android

Posted: Fri Jul 20, 2018 12:19 pm
by Klaus
Hi Googie,

no, sorry, no idea.
I do not own a cellphone or tablet, so my knowledge is just theoretical... 8)

Why not use:

Code: Select all

...
mobilepickphoto "camera"
...
?


Best

Klaus