Page 1 of 1

Is it possible?

Posted: Wed Jan 18, 2017 9:44 pm
by simon.schvartzman
I would like to develop an iOS App to perform the following:

1 - open the Camera (doesn't matter which one...)
2 - take a picture without human intervention
3 - save to the photo album
4 - close the camera and go to sleep
5 - wait X minutes, wake up and go back to step 1

Main challenge is how to deal with Step 2, any hints?

As discussed in this post http://forums.livecode.com/viewtopic.php?f=9&t=28647 I have plaied around with "export snapshot ..." but it doesn't help because what I really need is to be able to take a picture with the camera...

Many thanks in advance for any help.

Best

Re: Is it possible?

Posted: Wed Jan 18, 2017 10:41 pm
by Klaus
Hi Simon,

1 and 4:
Check the "cameracontrol..." commands in the dictionary.

2:
"cameracontroldo" can do what you need.

3:
See "mobileExportImageToAlbum" in the dictionary.

5:
Check the "send >handler_name> to xyz in X seconds/milliseconds".

:-)


Best

Klaus

Re: Is it possible?

Posted: Thu Jan 19, 2017 1:12 am
by simon.schvartzman
Klaus, many thanks, as usual your inputs are extremely valuable...

Re: Is it possible?

Posted: Tue Jan 24, 2017 7:20 pm
by simon.schvartzman
Hi Klaus (or anybody else that could help), your suggestion of step #5
5:
Check the "send >handler_name> to xyz in X seconds/milliseconds".
Which I have code like this:

Code: Select all

  send "mouseUp" to me in field TickInSeconds seconds
works fine as long as the device is always on.

Just to make myself clear, this is what I have on mind:

- I would have an iPhone powered by a Solar panel,
- my App is the only one that is going to be running on the device
- I would like to take one picture per day.
- The loop should repeat for at least two year

In order to save battery, once the picture is taken I would like the cell to go to sleep (display off) until the next day when is time to take the next picture.

I have tried with localNotifications with no luck...

Once again, many thanks for any help to solve it

Re: Is it possible?

Posted: Tue Jan 24, 2017 7:38 pm
by Klaus
Hi Simon,
In order to save battery, once the picture is taken I would like the cell to go to sleep (display off)
until the next day when is time to take the next picture.
sorry, I don't develop for mobile, don't even own a cellphone or something, so I don't know if this is possible
at all from within Livecode.


Best

Klaus