Search code examples
iosactionscript-3airadobe

Adobe AIR : get user's video content on iOS


I have to develop an AIR app for a client, that reads the video folder content and can play any video in it. It's quite easy with Android, I can read any folder on the phone/tablet, but on iOS it's not that easy. I can't use applicationDirectory because the client wants to put videos himself later in the videos folder on iPad. (But if you have a solution to put files in applicationDirectory with iTunes or else, please share !)

I know there are some ane's that read the cameraroll content, but they display a native pickup screen, while I just need a list of the files.

I tried to use File.documentsDirectory to access content, but got no luck. If you have any idea, thanks in advance !


Solution

  • Ok I found a workaround : in my XML application file I added <key>UIFileSharingEnabled</key><true/> to the iPhone infoAdditions, so that I can access to app's documents through iTunes. I add files with iTunes, and I can read the content of the folder in AIR with File.documentsDirectory.getDirectoryListing() Hope it will help someone else !