Hi,
Firstly, I would like to tell that I am new with the share received feature…
Suppose, I captured a screenshot, and I am currently in Photo Gallery. Now, I would like to share the screenshot to my app, so it would just display it in an image component.
I read many topics, but couldn’t find one helpful. Your help would be very appreciated.
Thanks in advance!
Thanks!
Vishwas
(Vishwas Adiga)
March 2, 2020, 9:48am
#2
Hello
Setting up file-sharing is easy and takes only a few steps:
Select the file types you’d like your app to accept from other apps (Screen1 Properties)
Capture the shared file with this block:
You can then handle the file just like you’d treat any other variable (upload to a database, put a shared image in a canvas for editing, etc.)
2 Likes
Hi, @Vishwas !
Thanks a lot for your help!
I followed your given steps, and nothing showed up on the image component. These are my blocks -
Am I doing anything wrong?
Thanks!
Vishwas
(Vishwas Adiga)
March 2, 2020, 10:11am
#4
Hmm
I’m not sure. Perhaps @Mika will be able to help you out better as he’s the author of the feature
2 Likes
Mika
March 2, 2020, 10:45am
#6
Maybe you should first check the content of the “value” parameter as example inside a label.
Also you should first do a check which type the shared data is.
Example it does not make sense to receive text and your app tries to set it as image (Which will not work).
2 Likes
Hi, @Mika !
Thanks for your reply!
I tried to display both type
& value
parameters through these blocks -
The label displayed,
2 , /external/images/media/1219
I think the 2 indicates it’s an image, as this hint says -
What is that /external/ … thing?
Thanks a lot!
Mika
March 2, 2020, 11:00am
#8
That’s the path to the received image.
Maybe you need to add some other words in front of it that it works correct for the picture.
Can’t help you much. Iam at work.
I tried using Taifuns extension and that didn’t work, neither did the File component.
The result I got was:
content://com.android.providers.downloads.documents/document/1332
You’re supposed to choose an APK, and I would like to get the path of the file. It seems as though with anything I try, I can’t. I even tried making my own extension for it, and it doesn’t work.
You should look here.
Maybe there is the answer
1 Like
vknow360
(Sunny Gupta)
March 2, 2020, 11:03am
#9
@Taifun has already confirmed that it is content uri and you have to convert it to file path to make it work.
Mika
March 2, 2020, 11:05am
#11
I edited my answer above.
There are linked two topics now.
1 Like
vknow360
(Sunny Gupta)
March 2, 2020, 11:05am
#12
Either using TaifunFile or FileTools.
1 Like
Thanks @mika ! I’ll definitely read and let here know if it helped.
@vknow360 I am not familiar with TaifunFile extension, but with yours. Can you guide me?
Edit - Is this the appropriate block?
Thanks!
Mika
March 2, 2020, 11:12am
#14
Have you tried this (I dont talk about using a extension):
“file:///storage/emulated/0/” + value ?
2 Likes
Hi, @Mika !
I tried, still nothing appearing.
Thanks!
Mika
March 2, 2020, 11:25am
#16
Then you should try to use a extension for it.
Boban
(Boban Stojmenovic)
March 2, 2020, 11:29am
#17
Probably yes, attach value block to it and it should give you the path
1 Like
vknow360
(Sunny Gupta)
March 2, 2020, 11:29am
#18
Yes that is the block I was talking about.