Camera And Gallery

Saving Texture2D to the gallery.

You can specify gallery folder name setting in the plugin settings:

Window -> Stan's Assets -> Android Native -> Edit Settings


By default, folder name is the same  as the project name.



or you can save the app screenshot using



You can also find out image save result and image bath by subscribing on OnImageSaved event. Code Example:

AndroidCamera.instance.OnImageSaved += OnImageSaved;

void OnImageSaved (GallerySaveResult result) {
    AndroidCamera.instance.OnImageSaved -= OnImageSaved;
    if(result.IsSucceeded) {
        Debug.Log("Image saved to gallery \n" + "Path: " + result.imagePath);
    } else {
        Debug.Log("Image save to gallery failed");


Note: Texture Should be marked as readable.


Subscribe to the image load event:

AndroidCamera.instance.OnImagePicked += OnImagePicked;

Then retrieve the image with





Example if data retrieving when OnImagePicked action fired

private void OnImagePicked(AndroidImagePickResult result) {
	if (result.IsSucceeded) {
		AN_PoupsProxy.showMessage ("Image Pick Rsult", "Succeeded, path: " + result.ImagePath);
		image.GetComponent<Renderer> ().material.mainTexture = result.Image;
	} else {
		AN_PoupsProxy.showMessage ("Image Pick Rsult", "Failed");

	AndroidCamera.instance.OnImagePicked -= OnImagePicked;


When taking the image from the camera, you can also choose image taking mode between Thumbnail and FullSizePhoto.

Window -> Stan's Assets -> Android Native -> Edit Settings


When taking the image from the camera, you can also choose image resolution between jpg and png.

Window -> Stan's Assets -> Android Native -> Edit Settings

Note: Managing multiple full-sized images can be tricky with limited memory. If you find your application running out of memory after displaying just a few images, you can dramatically reduce the amount of dynamic heap used by expanding the JPEG into a memory, by setting low max image size.

API use example can be found under the AnOtherFeaturesPreview.cs script.