Android Question Load image from web

RUNO

Active Member
Licensed User
Longtime User
My application reads data from an SQL database, including one image for each record, so how to load the image and display it in ImageView
 
Last edited:

KZero

Active Member
Licensed User
Longtime User
use InputStream

assuming the image saved as Base64 String
B4X:
  'Convert blob Base64 to bitmap
                       Dim buffer() As Byte
                       Dim b As Bitmap
                       Dim su As StringUtils
                       buffer = su.DecodeBase64(t1)
                       Dim In As InputStream
                       In.InitializeFromBytesArray(buffer, 0, buffer.Length)
                       b.Initialize2(In)
                     
                       Image_bitmap = b 'bitmap image
 
Upvote 0
Top