Save to Gallery

You may save any Texture2D to the gallery. The only limitation, that texture has to be readable.

See the example below, of how to save Texture2D instance to the device gallery.

using SA.CrossPlatform.App;
...

Texture2D tex = GetImage();// Your image. Image should be redeable.
var gallery = UM_Application.GalleryService;
gallery.SaveImage(tex, "MyImage", (result) => {
    if(result.IsSucceeded) {
        Debug.Log("Saved");
    } else {
        Debug.Log("Failed: " + result.Error.FullMessage);
    }
});

Save Screenshot

In most cases, developers ask how to take and then save a screenshot, so we decided to make a simplified method that allows you to save the current app screen screenshot to the gallery. See the example below:

using SA.CrossPlatform.App;
...

var gallery = UM_Application.GalleryService;
gallery.SaveScreenshot("MySceeen", (result) => {
    if (result.IsSucceeded) {
        Debug.Log("Saved");
    } else {
        Debug.Log("Failed: " + result.Error.FullMessage);
    }
});