Quantcast
Channel: Xojo Programming Forum - Latest topics
Viewing all articles
Browse latest Browse all 3894

MemoryBlock in Android not accepting string value

$
0
0

I have the following code verbatim in an iOS app in the URLConnection ContentReceived but trying to get this to work in Android

Dim mb As MemoryBlock = content

Var outputStream As BinaryStream = BinaryStream.Create(folPathQuestion, True)
outputStream.Write(mb)

When trying to test this in Android, I am getting the following errors

Type mismatch error. Expected class MemoryBlock, but got String
(this is on the “Dim mb As MemoryBlock = content” line)

Parameter “value” expects type String, but this is class MemoryBlock
(this is on the “outputStream.Write(mb)” line)

Do I need to handle a MemoryBlock differently on Android? When hovering over MemoryBlock in code in the iOS project, I see the tip “MemoryBlock.Constructor(bytes as Integer)”. And hovering over in the Android project I see the same but also “MemoryBlock.Constructor(data as String)”. So not sure if that’s something worth noting

Using Xojo 2024 R3

5 posts - 3 participants

Read full topic


Viewing all articles
Browse latest Browse all 3894

Trending Articles