Is it possible?

Anything beyond the basics in using the LiveCode language. Share your handlers, functions and magic here.

Moderators: FourthWorld, heatherlaine, Klaus, kevinmiller, robinmiller

Post Reply
simon.schvartzman
Posts: 665
Joined: Tue Jul 29, 2014 12:52 am

Is it possible?

Post by simon.schvartzman » Wed Jan 18, 2017 9:44 pm

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

Klaus
Posts: 14208
Joined: Sat Apr 08, 2006 8:41 am
Contact:

Re: Is it possible?

Post by Klaus » Wed Jan 18, 2017 10:41 pm

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

simon.schvartzman
Posts: 665
Joined: Tue Jul 29, 2014 12:52 am

Re: Is it possible?

Post by simon.schvartzman » Thu Jan 19, 2017 1:12 am

Klaus, many thanks, as usual your inputs are extremely valuable...
Simon
________________________________________
To ";" or not to ";" that is the question

simon.schvartzman
Posts: 665
Joined: Tue Jul 29, 2014 12:52 am

Re: Is it possible?

Post by simon.schvartzman » Tue Jan 24, 2017 7:20 pm

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
Simon
________________________________________
To ";" or not to ";" that is the question

Klaus
Posts: 14208
Joined: Sat Apr 08, 2006 8:41 am
Contact:

Re: Is it possible?

Post by Klaus » Tue Jan 24, 2017 7:38 pm

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

Post Reply