How can I save a photo in my gallery after taking it with the application I already create?

How can I save a photo in my gallery after taking it with the application I already create?

Hi! @Reza Can you explain what picture you create? I mean is it a type of drawing app or anything else ? Pls explain.

If it is a drawing app with a canvas you can do thisCapture