Android Question Loading Bitmap on network

Chianca

Member
Licensed User
Longtime User
Hello, I'm using smb library to list all images placed on my file server, and load any image when it's necessary. So, I dont want to download them before showing it... There is any possibility to use LoadBitmap with the network path, instead using the local file path?

Sample:

Local use:
B4X:
ImageView_Product.Bitmap = LoadBitmap(File.DirAssets,"image.jpg")

Network use:
B4X:
ImageView_Product.Bitmap = LoadBitmap("smb://192.168.25.200/share/images","image.jpg")


Thanks!
 

Linostar

Member
Licensed User
Longtime User
Even if there is a way with LoadBitmap to show them without downloading them, it's still the same. I mean that, for example, when you decide to open a remote file in a browser or view an image without downloading it, what's really happening is that the browser downloaded the file/image to a temporary directory on your local hard disk and opened it from there.

You can do the same in your case: create am temporary directory, download your images there so you can view them locally, and (optionally) delete them when you're done with them.
 
Upvote 0
Top