Jump to content

[TOPIC: topicViewTemplate]
[GLOBAL: userSmallPhoto]
Photo

Save Captured Image/Video to sub-folder under PhotoLibrary ?
Started by altafr Jan 02 2015 03:33 AM

6 replies to this topic
display.capture() image/video photo gallery
[TOPIC CONTROLS]
This topic has been archived. This means that you cannot reply to this topic.
[/TOPIC CONTROLS]
[modOptionsDropdown]
[/modOptionsDropdown]
[reputationFilter]
[TOPIC: post.html]
#1

altafr

[GLOBAL: userInfoPane.html]
altafr
  • Contributor

  • 126 posts
  • Corona SDK

Hi All ,

 

Is it  possible to save image/video in a subfolder under the photo-gallery on both iOS and Android platform ?

 

Basically I want to save all the images/videos of my application in " PhotoLibrary/myapp " . Is this achievable   with Corona Sdk  new  media.captureVideo()  and media.capturePhoto() api ?

 

Thanks in advance.

 



[TOPIC: post.html]
#2

Rob Miracle

[GLOBAL: userInfoPane.html]
Rob Miracle
  • Moderator

  • 26,042 posts
  • Enterprise

For photo, it outputs it to your app's bundle directories (system.TemporaryDirectory, system.CachesDirectory, system.DocumentsDirectory).  You can put it in a subdirectory inside one of those.

 

For video, there are no controls to manage the output.  You get a URL where it is located.

 

Rob



[TOPIC: post.html]
#3

altafr

[GLOBAL: userInfoPane.html]
altafr
  • Contributor

  • 126 posts
  • Corona SDK

Thank You Rob for your quick response.

 

I am aware that we can put  the images in subfolders inside these three directories.

 

But is there a way we can create a folder in photoLibrary or camera roll of the device and put the captured images there ?

 

Thank you



[TOPIC: post.html]
#4

Rob Miracle

[GLOBAL: userInfoPane.html]
Rob Miracle
  • Moderator

  • 26,042 posts
  • Enterprise

Not with the Corona SDK APIs



[TOPIC: post.html]
#5

jbp1

[GLOBAL: userInfoPane.html]
jbp1
  • Contributor

  • 216 posts
  • Corona SDK

Is there any other way to share/link/copy a file to the gallery (or whatever path the gallery looks at by default) ?? 

 

I've seen other apps drop screenshots there, so it must be do-able (it's not totally prohibited, at least on Android).  Maybe use the LFS module to navigate the whole file system?  (though it seems like it is also locked down to just the app's directories)



[TOPIC: post.html]
#6

Rob Miracle

[GLOBAL: userInfoPane.html]
Rob Miracle
  • Moderator

  • 26,042 posts
  • Enterprise

I'm not familiar with the Android native side of things, but on iOS you have to use the iOS SDK to move photos in and out of the Camera Roll.  You can create albums and such and have photos save to an album.   But the tools built into Corona SDK will just let you save to the camera roll and not an album.  If you want to do this, you would need to either use Corona Enterprise or CoronaCards where you can access native SDK features.  Corona SDK itself cannot.

 

Rob



[TOPIC: post.html]
#7

jbp1

[GLOBAL: userInfoPane.html]
jbp1
  • Contributor

  • 216 posts
  • Corona SDK

Thanks Rob!




[topic_controls]
[/topic_controls]