Canvas Into Image

Scroll to the end of the page provided above and you will be able to see the links

Image taken from PuraVida Apps

Thanks a lot

1 Like

It does not work. Please give me more suggestions.

You need to do better than that!

Tell us what does not work, show your relevant blocks and any other images of the app or designer.


This is the code I tried.

It depends on the android version, see

btw button6 means the save button :grin:
This worked for me

Is the image saved in gallery? Please reply fast.

yes. It saved

In this app, Save and Share button did not working.

As a starting point, try like this:

image

Will the image save in gallery?

To display the image in the gallery see the advice provided above.

I followed the advice but I am unable to save the image in gallery.

You have the path to the file, why do you need the gallery ?

You could save your file paths to a list, and recall these, displaying the image in an image component (one at a time) for selection

It's best to hold off on this app until a new version of AppInventor is released. There will be new blocks that will allow writing to shared folders.

How could I do that? Please help in that.

Learn about using lists:

General Tutorials

@Sarthak

Save canvas, then view in Gallery
viewCanvasInGallery.aia (57.3 KB)

Find here an aia project that "currently" works for me on Android 10 and Android 11 in companion mode. This will probably "break" once AI2 targets API 30 (next update n187). You need two extensions from Taifun: File and Tools .

The canvas image is saved to its default location, then copied to the shared/common Pictures folder. The gallery is refreshed for the canvas file name.

Blocks

When n187 arrives, you should be able to use the new File component to place the canvas image in a Shared folder.

1 Like

I know a way to save the image in gallery.
Step 1 : Click on the main Screen of your project (by default it is Screen1)
Step 2 : Click the option FileScope and change its value to shared.
Step 3 go to blocks Editor and join the following piece of code before your file name

DCIM/Camera/

Make sure to join this before the file name.

Now add a Callnotifier block and add the Canvas .saveas block to it.
Next join the file name.
This will save it to your device's Camera Folder.
You may create a different folder too but saving it in the camera folder will be better.

Btw, I program in my android. so pls manage from the image.

You have no need to add any extension for this. Sometimes, the Gallery doesn't update. If that happens, just remove both the app and gallery from your device background. But if it still doesn't load, the only thing you can do is restart your phone ( cuz that's a problem in your Gallery ). I face this actually but when I reatart my device, the image comes in my Gallery.

Also, I have provided you with the share option. You may share images from there.

Thank you.