How to receive shared image and display it?

@bodymindpower Can you explain your point?

Thanks! :blush:
P.S. I am getting 2 as the type.

That’s strange.
Can you try this:
file:/// + value

1 Like

@vknow360

Nope, still nothing. These are my blocks -

image

Thanks! :blush:

No,not directly.
Use that block of FileTools and then use this as content uri:

P.s. if it does not works then you have to share some more information like app,android version,etc.

1 Like

@vknow360 Still nothing appears. These are the blocks I’ve used -


Some miscellaneous specifications -

Device : Samsung Galaxy A50
Storage : 4GB RAM, 64GB Storage.
Android Version : 9 (Pie)

Note : I am testing this app through an APK.

Thanks! :blush:

Which gallery app are you using?

1 Like

SharedImage (7).apk (4.8 MB)

My confusion is slowly increasing. :upside_down_face:
So what can we learn from this APK?

1 Like

The default one from Samsung’s One UI.


@Boban please explain to me too :upside_down_face:

Thanks! :blush:

1 Like

It is working for me.
Here is what I got:

P.S. I am also curious to know

2 Likes

As I’m working/driving, the easiest was to post a APK for you to test if it works

1 Like

Please show your blocks.
APK or Comanion, device / Android version?

The result from your APK is:
“Text for Label1” (nothing else is shown on Screen1)

I tried this apk:

Companion

Device: Memu Android Emulator
Android Version: 5.1

Hmm, and did you share a image to that App as that is what we are talking about here or trying to do

1 Like

Uri path is incomplete

SharedImage.aia (52.2 KB)

2 Likes

Thanks a lot, @Boban! :blush:

Thanks to @Boban’s method, and @vknow360’s FileTools , I now get the path to the image. These are my blocks -


The label displays -

/DCIM/Screenshots/20200229_10934.jpg

But, the image does not display anything. How should we display proper image from the path?
I want to display image on a image component.

Is this the perfect path to the file? -

file:///storage/DCIM/Screenshots/20200229_10934.jpg

Thanks! :blush:

1 Like

Actually FileTools is specially made to work together with File component. So it uses abstract file path not full path.
You have to use it like this:
/storage/emulated/0/ + path

Or you can use ‘GetPath’ or ‘GetFilePath’ method of FileTools.

2 Likes

Hi, @vknow360! :wave:
Thanks for your reply! :blush:

Do I need to attach " file:/// " before /storage … ?

Thanks! :blush:

1 Like

off-topic

@Boban you are spamming me in the notifications area here too! :joy:

image

1 Like