Cannot display Base64 image in ListView

Malky

Active Member
Licensed User
Longtime User
Hi, I'm new to this software and possibly trying to run before I can walk, so apologies beforehand.

I have a php server with blob files for images which I would like to display them in the listview alongside the details.

I seem to have a problem with the AddTwoLinesAndBitmap function as I don't know what parameter it wants next?

Any help would be very much appreciated.

Malky
 

Malky

Active Member
Licensed User
Longtime User
Come on guys, I just need a pointer here.

Error after another option I found was

Compiling code. Error
Error parsing program.
Error description: Undeclared variable 'decodebase64' is used before it was assigned any value.
Occurred on line: 63
tl.Third = DecodeBase64(m.Get("flag"))


Code is

Sub hc_ResponseSuccess (Response As HttpResponse, TaskId As Int)
Dim res As String
res = Response.GetString("UTF8")
Log("Response from server: " & res)
Dim parser As JSONParser
parser.Initialize(res)
Select TaskId
Case LANG_LIST
'add the langs to the ListView
Dim langs As List
langs = parser.NextArray 'returns a list with maps
For i = 0 To langs.Size - 1
Dim m As Map
m = langs.Get(i)
'We are using a custom type named TwoLines (declared in Sub Globals).
'It allows us to later get the two values when the user presses on an item.
Dim tl As ThreeLines
tl.First = m.Get("abbrev")
tl.Second = m.Get("lang")
tl.Third = DecodeBase64(m.Get("flag"))
ListView1.AddTwoLinesAndBitmap2(tl.Second,tl.First, tl.Third,tl)
Next
ProgressDialogHide
End Select
Response.Release
End Sub
 
Upvote 0

Malky

Active Member
Licensed User
Longtime User
Hi Erel, ok will do. As I said I'm a newbie here, but I do code.

Can you explain a little more as regards "adding a reference to StringUtils" please?

All I need is a way to store my MySQL data offline on the app and retrieve it, displaying a few images. (Not sure if it uses more resources in a DB though, rather than downloading the files).

Would be nice if I could filter a list as well, but that's another matter.

Cheers,

Malky
 
Upvote 0

Malky

Active Member
Licensed User
Longtime User
Hi Erel thanks for that.

I may just add the files to the SD/Storage card, so want to add httputils2, but I can't see that one there. Every link I have been to leads me to the demo. Can you tell me where to download these please? I've been about 2 hours looking for this. I know haw to add additional libraries and have my path set etc.

Cheers,

Malky
 
Upvote 0
Top