Skip to main content
garda86
Participating Frequently
October 18, 2015
Question

App for iOS: open image created with my app

  • October 18, 2015
  • 1 reply
  • 389 views

I'm building a mobile app with Adobe PRO CS6 for IOS. I need to create screenshots and save them in a different folders, that are in a specific tree. The real thing that I don't know how to achive is how can these images be opened through the standard apps of iOS (photos or FileManager).

Using class flash.media.CameraRoll I can save images inside the default Camera folder, but I cannot give neither a name nor a path to my images.

Using class flash.filesystem.FIle I can assign a name and a path, but folders/images are inside the memory space dedicated for the app, and this space cannot be accessed using other iOS apps (Photos, FileBrowser).

NOTE: the final purpose is being able to use sharing tools of other image readers to share images created with my app.

Any suggestion? Thank you very much!

This topic has been closed for replies.

1 reply

Inspiring
October 18, 2015

You can use the following directories and AIR's applicationStorageDirectory will automatically target these locations depending on which OS the application is running:

IOS

  • File.applicationDirectory (read-only)  /var/mobile/Applications/<uid>/<filename>.app
  • File.applicationStorageDirectory/var/mobile/Applications/<uid>/Library/Application Support/<applicationID>/Local Store
  • File.cacheDirectory/var/mobile/Applications/<uid>/Library/Caches
  • File.desktopDirectory - not accessible
  • File.documentsDirectory/var/mobile/Applications/<uid>/Documents
  • temporary - from createTempDirectory() and createTempFile()/private/var/mobile/Applications/<uid>/tmp/FlashTmp<randomString>
  • File.userDirectory - not accessible

Android

  • File.applicationDirectory(read-only)

    /data/data/

  • File.applicationStorageDirectory

    /data/data/<applicationID>/<filename>/Local Store

  • File.cacheDirectory

    /data/data/<applicationID>/cache

  • File.desktopDirectory

    /mnt/sdcard

  • File.documentsDirectory

    /mnt/sdcard

  • temporary - from File.createTempDirectory() and File.createTempFile()

    /data/data/<applicationID>/cache/FlashTmp.<randomString>

  • File.userDirectory

    /mnt/sdcard

That info applies to AIR 1.0 and later (ActionScript 3.0)