sdcard issues

dbergusa

Member
Licensed User
Longtime User
I have no difficulty using the following in code when testing using an avd with a mounted sdcard (from an eclipse .img file) that contains a folder named foldername which then contains a file named filename.png

Code is as follows:
btmp = LoadBitmap(File.DirRootExternal,"/foldername/filename.png")

However when trying to access this with a tablet (Toshiba Thrive), I get a java.io.FileNotFoundExcepton: /mnt/sdcard/foldername/filename.png (No such file or directory) even though foldername with the filename.png file exists at the root of the inserted sdcard. Any thoughts as to why this is happening or how to resolve it. The Toshiba Thrive has internal storage, sdcard, and usb storage. I've tried using the usb drive as well with a simialr error.

Thanks for any help you may be able to provide
 

stevel05

Expert
Licensed User
Longtime User
Try:

B4X:
btmp = LoadBitmap(File.Combine(File.DirRootExternal,"foldername"),"filename.png")

may be semantics but worth a shot.
 
Upvote 0

Brendon

Member
Licensed User
Longtime User
Are you sure that /mnt/sdcard does not stands for internal storage card? Have you tryed to create your folder and image in internal storage, and then test your code?

Hope this helps
 
Upvote 0

dbergusa

Member
Licensed User
Longtime User
Resolved

After a bit of work and some tips from several helpful people, it looks like the Thrive uses the internal memory as sdcard. It shows an sdcard2, which is most likely the sd card and there is likely a third memory folder for the usb.


Hope that helps anyone else who runs into this wall
 
Upvote 0
Top