mysql image to json array

jayel

Active Member
Licensed User
Longtime User
Hello,

I've been searching around but can't find it.
I have a table with products and an image(foto) of that product.

I can get de product name & product code in a json array and put it on a listview.

But now when I click the product in de listview I want the picture of that product shown on my android .

Can somedy help please?

Greets,

John
 

jayel

Active Member
Licensed User
Longtime User
Thanks Erel,
B4X:
Dim m As Map
m = l.Get(0)
Dim b() As Byte   
Dim bmp As Bitmap
Dim s As StringUtils
Dim i As InputStream


b =s.DecodeBase64(m.Get("afbeelding"))

i.InitializeFromBytesArray(b,0,b.Length)
bmp.Initialize2(i)
i.Close
ImgAfbeelding.Bitmap = bmp

SOLVED !

greets,

John
 
Upvote 0

AJ Ramone

New Member
Licensed User
Longtime User
How must the php Script look like?
The php Script is like explained in the mysql database tutorial.
I have changed the Code like jayel posted but I am still getting an load image error.
 
Upvote 0
Cookies are required to use this site. You must accept them to continue using the site. Learn more…