Sharing photos and gifs to the social media

I’d like to do an app just to share stickers, images, and gifs through social media. Is it possible to do that using the sharing component? If so, could you explain to me how? Thank you.

you might want to try this snippet
How to take a picture or pick an image and share it

Taifun


Trying to push the limits! Snippets, Tutorials and Extensions from Pura Vida Apps by Taifun.

Thank you Taifun! I’m trying to assemble the components but I didn’t find “btn share” component . When btnShare - click, etc. Do you know where’s it?

it is a button...
see also the naming conventions here

see also

Taifun


Trying to push the limits! Snippets, Tutorials and Extensions from Pura Vida Apps by Taifun.

Hello everyone,

How can I share photos that i upload to my app throw "Sharing" function ?

thank you in advance !

Have you tried using the Sharing blocks?

It should be as simple as setting a message / file, then selecting the app you want to send it to/with.

You will need to do this on a real device with the apps loaded.

Thank you so much for your response.

I used the sharing blocs but it doesn't works !
I'm trying to make a basic app : It consists on uploading images to the app & then share it throw social media apps :

I download the images to my app and then i use the blocs of sharing but it doesn't works. When I try the app on my phone, it tells me that the image doesn't exist on my phone !

Capture

Show your relevant blocks, tell us your android version, and where you are saving your image files.

Version 10 of Android.

I'm using only those blocks :

The sharing component does not convert the helper block for an asset to a file path.

You will need to drag in the file component, then set your blocks like this:

image

(Tested using companion with Android 13)

1 Like

I try to put the same blocks as you did, but i still always have the same problem :

i think that i should put something in the text area ?! how can i put "call getASD block" i can't find it !

thank you in advance !

please what i should put in these 3 areas :

What happens when you press the button? Error message ? Nothing? Something else?
You did not say how you were testing or your android version....

As I have shown in my blocks

This is the message when i press "share" button :

I have ANDROID V10.

I download "GetASD.aix" to have the GetASD1. I have noticed that you have another block "getASD". Could you share it with me please ?

In this block should I write "file://" or the full path of the image (C:/wallpaper/...../01.jpg) ? :

image

Where is the file 01.jpg?

In your assets or in your ASD (/storage/emulated/0/Android/data/edu.mit.appinventor.aicompanion3/files/01.jpg)?

The getASD I show is just the name of a procedure.

The file 01.jpg is in my project, i download it from my computer.

Is 01.jpg in your assets? Did you upload it to the Media folder, like I have here

image

yes, exactly.

OK then, back to the blocks I first showed you

image

Do not use the GetASD extension, you do not need it for this.

There is a new error :

This is what i use :

image

image