pepocero
(Pepocero)
#1
When we use the activity starter component, sometimes we get the location of a file using the Result.Uri.
This Result.Uri looks like this:
content://media/external/images/media/23989
But as we see, this does not indicate the actual location of the file.
In order to obtain the real location of the file we use the Taifun file extension App Inventor Extensions: File | Pura Vida Apps
This extension has a block that allows to obtain the path of a file from Uri
With this block we will obtain the real location of the file.
We get something like this:
/storage/emulated/0/Pictures/IMG_20190912_213723.jpg
Sounds like a simple thing. But I’ve been trying for two days to get the real location of the file.
Now that I got it, I wanted to share it.
9 Likes
Fabio10
(Fabio)
#4
Hi.
If I only need the file name, how can I do it?
Thank you.
Rogerio_Rios
(Professional Support)
#5
Welcome, Divide your string by / and take the last part.
3 Likes
Peter
(Moderator)
#6
It seems you also asked the same question in the App Inventor community. only ask in the community of the builder you are using for your project.
1 Like
Fabio10
(Fabio)
#7
If so.
I have the same project in both constructors. I apologize if I break the rules, it won’t happen again. Thank you.
Si, es asi.
Tengo el mismo proyecto en ambos constructores. Pido disculpas si infrinjo las reglas, no volvera a suceder. Gracias.