Taking a photo without native controls
Moderators: FourthWorld, heatherlaine, Klaus, kevinmiller, robinmiller
Taking a photo without native controls
Hi.
I have a student who is developing a simple Android app and is wanting to take a photo without the user knowing (don't worry - it's part of an art school degree show installation about privacy - not a sleazy app for public deployment). I was wondering if it was possible to bypass the OS controls and have Livecode take a shot and store it. I'm thinking no but came here to confirm or be convinced otherwise.
Anyone know?
Kind regards, Paul.
I have a student who is developing a simple Android app and is wanting to take a photo without the user knowing (don't worry - it's part of an art school degree show installation about privacy - not a sleazy app for public deployment). I was wondering if it was possible to bypass the OS controls and have Livecode take a shot and store it. I'm thinking no but came here to confirm or be convinced otherwise.
Anyone know?
Kind regards, Paul.
-
- Posts: 67
- Joined: Fri Jun 12, 2015 9:42 am
Re: Taking a photo without native controls
No this isn't possible via livecode only way would be to use a third party app and launch it via livecode
Re: Taking a photo without native controls
As far as I'm aware, both Android and iOS are very specifically designed for it to be difficult or impossible for an app to take a photo without the user being aware of it. I'd be curious to hear if you find a workaround -- and I expect Google/Apple would be quite interested too!
LiveCode Open Source Team — @PeterTBBrett — peter.brett@livecode.com
Re: Taking a photo without native controls
A potential workaround would be to create an off screen camera view instance with LiveCodes syntax and then take a picture via .
You could then setup and non-blocking send to take a picture at a specified interval (e.g. 5 seconds).
Please see the attached example which creates a camera control offscreen, take a picture every 5 secs and shows this image within an image control
Kind Regards,
Neil Roger
--
LiveCode Support Team ~ http://www.livecode.com
--
Code: Select all
cameraControlCreate
Code: Select all
cameraControlDo "camerainstancehere", "takePicture
You could then setup and non-blocking send to take a picture at a specified interval (e.g. 5 seconds).
Please see the attached example which creates a camera control offscreen, take a picture every 5 secs and shows this image within an image control
Kind Regards,
Neil Roger
--
LiveCode Support Team ~ http://www.livecode.com
--
Re: Taking a photo without native controls
Hi Neil,
I just searched the 7.1 release notes for "camera" and nothing was found!
I was heavily astonished to read about this new command cameracontrol... here to say the least!
According to the dictionary it was introduced in 7.1!?
A little example on how this can be used on desktop system would also not be bad!
Something shocking new like this should be emphasized in 72 point textsize!
Best
KLaus
I just searched the 7.1 release notes for "camera" and nothing was found!
I was heavily astonished to read about this new command cameracontrol... here to say the least!
According to the dictionary it was introduced in 7.1!?
A little example on how this can be used on desktop system would also not be bad!
Something shocking new like this should be emphasized in 72 point textsize!
Best
KLaus
Re: Taking a photo without native controls
Hi Klaus,
The documentation issues on the new Camera functionality are in our QC database and are waiting to be addressed. I agree that this is a great new addition to the LC platform and its a shame to see it not getting the love that it deserves
The syntax is the same across desktop/mobile (minus choosing the camera source of front/back) so the wee sample stack above should give you some leads with using the syntax.
With that being said, if I get the time I will create a short lesson on how to use the new syntax.
Kind Regards,
Neil Roger
--
LiveCode Support Team ~ http://www.livecode.com
--
The documentation issues on the new Camera functionality are in our QC database and are waiting to be addressed. I agree that this is a great new addition to the LC platform and its a shame to see it not getting the love that it deserves
The syntax is the same across desktop/mobile (minus choosing the camera source of front/back) so the wee sample stack above should give you some leads with using the syntax.
With that being said, if I get the time I will create a short lesson on how to use the new syntax.
Kind Regards,
Neil Roger
--
LiveCode Support Team ~ http://www.livecode.com
--
Re: Taking a photo without native controls
Hi Neil,
OK, thank you!
Best
Klaus
OK, thank you!
Best
Klaus
Re: Taking a photo without native controls
Hello all.
Just caught up with this - a flurry of posts after a quiet first few days! Thanks to all involved.
Neil - thanks especially for the lead. I tried the code in 7.1.1 but couldn't get any response from the camera on the Android device. I ensured I had the camera Requirements and Restrictions all set to Required, and Application Permissions on for the camera. I rewrote the code a little to instance the camera control on the preLoadCard handler and have a single button to take picture. But still nothing. I tried running it on the desktop and it chokes not knowing what cameraControlCreate is.
There is absolutely no documentation I can find on these controls! Any pointers to any way to proceed appreciated. Thanks.
Kind regards, Paul.
Just caught up with this - a flurry of posts after a quiet first few days! Thanks to all involved.
Neil - thanks especially for the lead. I tried the code in 7.1.1 but couldn't get any response from the camera on the Android device. I ensured I had the camera Requirements and Restrictions all set to Required, and Application Permissions on for the camera. I rewrote the code a little to instance the camera control on the preLoadCard handler and have a single button to take picture. But still nothing. I tried running it on the desktop and it chokes not knowing what cameraControlCreate is.
There is absolutely no documentation I can find on these controls! Any pointers to any way to proceed appreciated. Thanks.
Kind regards, Paul.
-
- Posts: 67
- Joined: Fri Jun 12, 2015 9:42 am
Re: Taking a photo without native controls
I also could not get this function to work ( tried on all versions up to the latest LiveCode 8.0.0 DP 14 and still no joy
Re: Taking a photo without native controls
Hi all,
The new camera controls are commercial only so if you are using the community version of LiveCode they will not work.
If you are using a commercial version (indy etc), what scripts are you using to start up the camera? Do you have a sample stack I could test with
Kind Regards,
Neil Roger
--
LiveCode Support Team ~ http://www.livecode.com
--
The new camera controls are commercial only so if you are using the community version of LiveCode they will not work.
If you are using a commercial version (indy etc), what scripts are you using to start up the camera? Do you have a sample stack I could test with
Kind Regards,
Neil Roger
--
LiveCode Support Team ~ http://www.livecode.com
--
-
- Posts: 67
- Joined: Fri Jun 12, 2015 9:42 am
Re: Taking a photo without native controls
Hi Neil,
I wasn't aware there were extra functions in the commercial version of live code, that will explain why I could not get it to work.
I wasn't aware there were extra functions in the commercial version of live code, that will explain why I could not get it to work.
Re: Taking a photo without native controls
Thanks for getting back.
Ah - I see. Students here are using non-commercial version as you may imagine. I'll explain this important detail to the student. We have a total hack workaround triggering another machine to take a shot from a hidden camera.nBut it would be much tidier conceptually and operationally if it was done on the mobile device.
Kind regards, Paul.
Ah - I see. Students here are using non-commercial version as you may imagine. I'll explain this important detail to the student. We have a total hack workaround triggering another machine to take a shot from a hidden camera.nBut it would be much tidier conceptually and operationally if it was done on the mobile device.
Kind regards, Paul.
Re: Taking a photo without native controls
Hi Paul,
Our educational licence might be of interest-
https://livecode.com/products/livecode- ... education/
This will give you a single commercial licence that you could use to build your students standalones. This would give them the chance to try out out new camera syntax.
Kind Regards,
Neil Roger
--
LiveCode Support Team ~ http://www.livecode.com
--
Our educational licence might be of interest-
https://livecode.com/products/livecode- ... education/
This will give you a single commercial licence that you could use to build your students standalones. This would give them the chance to try out out new camera syntax.
Kind Regards,
Neil Roger
--
LiveCode Support Team ~ http://www.livecode.com
--
Re: Taking a photo without native controls
Thanks. This may be possible. I would need confirmation that this camera syntax works though to be able to access the money to buy the license. Perhaps I could send you the student's stack to check?
Another important issue is that the image would need to be saved on to the Android device's SD card. The Android device would be attached via USB to a MacMini. An application on the MacMini would access the saved images on the mounted SD card of the Android device, and use these images to display. Can you foresee any problems in this workflow?
Kind regards, Paul.
Another important issue is that the image would need to be saved on to the Android device's SD card. The Android device would be attached via USB to a MacMini. An application on the MacMini would access the saved images on the mounted SD card of the Android device, and use these images to display. Can you foresee any problems in this workflow?
Kind regards, Paul.
-
- Posts: 641
- Joined: Tue Jul 29, 2014 12:52 am
- Location: Brazil
Re: Taking a photo without native controls
HI, it is working OK for me on iOS 10 but I can't get the image saved to the Photo Album, I have added the mobileExportImageToAlbum command after taking the picture but it isn't saving. Not sure what am I doing wrong...any hint?
Code: Select all
on mouseUp
cameraControlDo "myFirstCamera", "takePicture"
put the result into image 1
mobileExportImageToAlbum image 1
--send "mouseUp" to me in 5 seconds
end mouseUp
Simon
________________________________________
To ";" or not to ";" that is the question
________________________________________
To ";" or not to ";" that is the question