ane-device-file-util is a native extension that allows an application to open files with registered application on iOS (e.g Dropbox). Using the extension an application can provide the user with a link or button to open a file, such as a PDF. When the user clicks that button a native system dialog shows a list of applications able to open that file.

The extension has no control over the list of applications able to open the file, since that is controlled by the system. All it can do is inform that the application wants to open a specific file type.

Sample

package
{
import com.debokeh.anes.utils.DeviceFileUtil;

import flash.display.Sprite;
import flash.events.MouseEvent;
import flash.text.TextField;
import flash.text.TextFieldAutoSize;

public class Main extends Sprite
{
	public function Main()
	{
		// for determine ready state
		var tf:TextField;
		addChild(tf = new TextField);
		tf.autoSize = TextFieldAutoSize.LEFT;
		tf.text = "click me!";

		// wait for click
		stage.addEventListener(MouseEvent.CLICK, function():void
		{
			// Example #1 : You will need foo.pdf in document directory
			DeviceFileUtil.openWith("foo.pdf");

			// Example #2 : You will need foo.pdf in document directory
			// DeviceFileUtil.openWith("foo.pdf", DeviceFileUtil.DOCUMENTS_DIR);

			// Example #3 : You will need foo.pdf in application directory
			// DeviceFileUtil.openWith("foo.pdf", DeviceFileUtil.BUNDLE_DIR);
		});
	}
}
}
Air Native Extension, iOS . URL.