ANE-ImagePicker is a native extension that allows you to display native UI to pick an image from the gallery or take a picture with the camera on iOS and Android. After the UI pick dialog is fired, the user can choose an image. When the user picks an image, a callback is invoked with the selected file data (a BitmapData and a ByteArray).

The extension has a set of advanced features, such as square cropping, custom positioning for the gallery image picker on iPad and custom overlay to avoid white screen when loosing Stage3D context.

Sample

// Take a picture with the camera
if (AirImagePicker.getInstance().isCameraAvailable())
{
    AirImagePicker.getInstance().displayCamera(function(image:BitmapData, data:ByteArray):void {
        // Do something with the BitmapData or the JPEG-encoded ByteArray
    });
}

// Pick an image from the gallery
if (AirImagePicker.getInstance().isImagePickerAvailable())
{
    AirImagePicker.getInstance().displayImagePicker(function(image:BitmapData, data:ByteArray):void {
        // Do something with the BitmapData or the JPEG-encoded ByteArray
    });
}
Air Native Extension, Android, iOS . URL.