Hi all,
Can we save photo to somewhere in local device instead of photo library?
Thank you!
Edwin
Hi all,
Can we save photo to somewhere in local device instead of photo library?
Thank you!
Edwin
Hi Edwin,
Yes, this is possible using the media.capturePhoto() API. Here is the documentation on that:
http://docs.coronalabs.com/api/library/media/capturePhoto.html
Best regards,
Brent
Thanks Brent!
I see. But seems like it will only works on Android not windows and iOS. Am I reading the doc right?
Best Regards,
Edwin
I have experience using iOS library photos in my apps - opening, manipulating and then re-saving to the app sandbox but I’ve never required fresh photos from the camera itself. As I understand it, you can summon the camera app from Corona then take a photo and capture it back to the sandbox. However I’m pretty sure you can’t stop the device from also placing the image into the native library (I’m guessing corona simply lets the device do it’s normal procedure and then sort of hijacks the image as it can ‘read’ but not directly delete/write to the library).
Maybe you could add a popup telling users that yes they have saved the image to the app and they can now freely delete any images from their iOS library without effecting the app…
If you need a hand let me know… there were some nuances I found with accessing the camera/library.
Hi Edwin,
This API works on both iOS and Android devices. For testing purposes, it also works in the Mac (OS X) Corona Simulator, but it doesn’t work in the Corona Simulator for Windows.
Brent
@craig thanks for your input. I am thinking to let system create an album and let the device put them in if it does that might be the alternative if the ios does save a file to its photo library.
@brent thank you for clarification. it is very helpful!!
Edwin
Hi Edwin,
Yes, this is possible using the media.capturePhoto() API. Here is the documentation on that:
http://docs.coronalabs.com/api/library/media/capturePhoto.html
Best regards,
Brent
Thanks Brent!
I see. But seems like it will only works on Android not windows and iOS. Am I reading the doc right?
Best Regards,
Edwin
I have experience using iOS library photos in my apps - opening, manipulating and then re-saving to the app sandbox but I’ve never required fresh photos from the camera itself. As I understand it, you can summon the camera app from Corona then take a photo and capture it back to the sandbox. However I’m pretty sure you can’t stop the device from also placing the image into the native library (I’m guessing corona simply lets the device do it’s normal procedure and then sort of hijacks the image as it can ‘read’ but not directly delete/write to the library).
Maybe you could add a popup telling users that yes they have saved the image to the app and they can now freely delete any images from their iOS library without effecting the app…
If you need a hand let me know… there were some nuances I found with accessing the camera/library.
Hi Edwin,
This API works on both iOS and Android devices. For testing purposes, it also works in the Mac (OS X) Corona Simulator, but it doesn’t work in the Corona Simulator for Windows.
Brent