2017년 3월 27일 월요일

LOAD IMAGES FROM DEVICE DIRECTORY


I already readed this discussion and many other:
 How to to display an image referring to a file name on the SD card?

Problem:  get images loaded into a phone.

Simple layout:



Simple code:

Image loaded from assets is ok:




Image I tried to load:



Negative result:




--
Try using file:///mnt/sdcard/nota1.jpgThis path should work fine.

This is already answered by Taifun.See the answer by Taifun in the same thread you linked :
How to to display an image referring to a file name on the SD card?

-- 
Thanks for your help , but....   nothing....





-- 
what is the image name?


as Sivagiri already said...
generally see here:
PS: to take a screenshot of your device see here https://www.google.com/search?q=android+take+screenshot

-- 
The image name is   "nota1.jpg"

I will try with the "screen initialize" suggestion.

-- 
the code now...

and the same result....




-- 
oh well...
only one of the paths is the correct one and not all together, that was only an example to demonstrate the different path types!
you should use file:///mnt/sdcard/nota1.jpg, assuming your image name is correct...
see test project attached



-- 
Many many thanks for your time...

I used your aia project, obviously everything work fine !

The file after launch of your apk:


And the image :



I tried to load the same image with my apk using the same path  "file:///mnt/sdcard/logo.jpg" and....   nothing

The result:




The code:


-- 
Ok ok ok I've found where i was wrong !
I must use your extension in my apk....   fine !




Tell me, where I must send a couple of bottle of fine prosecco ?

-- 
keep the bottles well cooled and next time when I'm in Italy we can drink them together...

-- 

댓글 없음:

댓글 쓰기