Android Question access picture using jRDC

T.T Wang

Member
Licensed User
Longtime User
could some kind man show a sample that upload or dowload from MySQL by jRDC?
 

Erel

B4X founder
Staff member
Licensed User
Longtime User
There are three helper subs in DBRequestManager: FileToBytes (not really needed as you can now use File.ReadBytes), ImageToBytes and BytesToImage.

The image should be stored in a blob field in the database. You should retrieve it and then do something like:
B4X:
Dim bytes() As Byte = Row(1) 'assuming that the image is in the second column.
Dim img As Bitmap = req.BytesToImage(bytes)
 
Upvote 0
Top