Absolute File Path

  • Replies:5
  • Answered
scottbelbin
  • Forum posts: 3

Jul 11, 2018, 4:42:30 PM via Website

Afternoon everyone,

I have an app that we can use our company logo on, and to display it, the app asks for the Image URI path. I have the image saved locally on our Samsung Galaxy Tab A6 within Internal Storage\Pictures. I have tried the following to no avail:

file:///mnt/internal_sd/Pictures/Picture.jpg (and all other variations)
\Internal Storage\ Pictures\Picture.jpg (and all other variations)

What is the correct file path to this location please? I'm sure I'm being a numpty, but I can't figure out the correct path.

Cheers,

Reply
Best answer
James Watson
  • Forum posts: 1,584

Jul 15, 2018, 10:54:01 AM via Website

scottbelbin

Hi James. Thanks, but that's not worked. The app works correctly, as I can display a test logo stored online. This has been supplied by the manufacturer, so we can't upload our logo to this location.

After several days studying, I made an app in my spare time in order to study uri and its real path.
I found that in fact, an uri is more complex than what we thought.

A screenshot of my studying app, just for your reference.
On my mobile phone, I selected the image file from 'Files - Internal storage - Pictures'.

image

— modified on Jul 15, 2018, 11:04:56 AM

Download size < 0.15 MB. But also accurate enough, ad-free & free.
The minimalist app available on Play Store: https://goo.gl/ws42fN
Blog: https://okblackcafe.blogspot.com Your 5-star is appreciated.

Helpful?
scottbelbin
Reply
James Watson
  • Forum posts: 1,584

Jul 12, 2018, 4:20:05 AM via Website

Try the below.
/storage/emulated/0/Pictures/Picture.jpg

Download size < 0.15 MB. But also accurate enough, ad-free & free.
The minimalist app available on Play Store: https://goo.gl/ws42fN
Blog: https://okblackcafe.blogspot.com Your 5-star is appreciated.

Helpful?
Reply
scottbelbin
  • Forum posts: 3

Jul 12, 2018, 10:21:59 AM via Website

Hi James. Thanks, but that's not worked. The app works correctly, as I can display a test logo stored online. This has been supplied by the manufacturer, so we can't upload our logo to this location.

Helpful?
Reply
Best answer
James Watson
  • Forum posts: 1,584

Jul 15, 2018, 10:54:01 AM via Website

scottbelbin

Hi James. Thanks, but that's not worked. The app works correctly, as I can display a test logo stored online. This has been supplied by the manufacturer, so we can't upload our logo to this location.

After several days studying, I made an app in my spare time in order to study uri and its real path.
I found that in fact, an uri is more complex than what we thought.

A screenshot of my studying app, just for your reference.
On my mobile phone, I selected the image file from 'Files - Internal storage - Pictures'.

image

— modified on Jul 15, 2018, 11:04:56 AM

Download size < 0.15 MB. But also accurate enough, ad-free & free.
The minimalist app available on Play Store: https://goo.gl/ws42fN
Blog: https://okblackcafe.blogspot.com Your 5-star is appreciated.

Helpful?
scottbelbin
Reply
scottbelbin
  • Forum posts: 3

Jul 16, 2018, 12:32:51 PM via Website

You're a gentleman James. Cheers!

Helpful?
Reply
James Watson
  • Forum posts: 1,584

Jul 17, 2018, 2:34:18 PM via Website

You are welcome.

Download size < 0.15 MB. But also accurate enough, ad-free & free.
The minimalist app available on Play Store: https://goo.gl/ws42fN
Blog: https://okblackcafe.blogspot.com Your 5-star is appreciated.

Helpful?
Reply