How can i share image using activity

i have image in my app assets , and i want to share the image using activity , but i am getting the runtime error , i tested the blow aia after installing the apk
image_sharing.aia (12.8 KB)
blocks


@Taifun

io.mohamed.WhatsApp.aix (7.8 KB)

you can use this extension

already i used two different whatsapp extensions , but i want to share ther image with activity only ,
So i need the solution for image sharing with activity only

direct sharing file from assets is not possible you need to copy file to storage than try to share

here is some reference

i have tried to copy the image from assets to external storage , then i got the path of the image saved in external storage ,

but the issue i am getting is image is not copying to external storage

It would really help if you provided a screenshot your relevant blocks, so we can see what you are trying to do, and where the problem may be.

To get an image of your blocks, right click in the Blocks Editor and select “Download Blocks as Image”. You might want to use an image editor to crop etc. if required. Then post it here in the community.

Taifun

this is my blocks and aia

blocks
image_sharing.aia (45.3 KB)

@Taifun

Copy the file to shared storage and share it from there

From file name
//A.jpg

To file name
/Download/A.jpg

Taifun

i tried

From file name
//A.jpg

To file name
/Download/A.jpg

but no result , please check my aia file what is wrong in this

image_sharing.aia (45.4 KB)

If you are asking for help, I recommend you to make it as easy for others to be able to help you …

You probably will get more feedback then…

which means in your case post a screenshot of your relevant blocks…

To download the aia file, upload it to Kodular, open it, do some bug hunting for you, etc… this takes time, and most people will not do that…

Thank you.

Taifun

1 Like

i used this method to copy the image
From file name
//A.jpg

To file name
/Download/A.jpg

but getting run time error



image_sharing.aia (45.4 KB)

@Taifun

No, you didn‘t

please can you check my aia , what is wrong in this
image_sharing.aia (45.4 KB)

Why don‘t you setup the filepath as Taifun told you?
Change file:///A.jpg to //A.jpg and file:// Download/A.jpg to /Download/A.jpg

i am getting this error , when i open app

how to solve this error

You may try this. What Android version are you using?

1 Like

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.