Android Question HEX to byte array

Status
Not open for further replies.

Tayfur

Well-Known Member
Licensed User
Longtime User
With the ByteConverter library:
B4X:
Dim b As ByteConverter
bytes = b.HexToBytes(Data)

I want to things.

I convert to image file

B4X:
'****** THIS CODE VB.NET on PC ***********************
Dim bytes = My.Computer.FileSystem.ReadAllBytes("X:\image.jpg")
        path = ""
        For i = 0 To bytes.Length - 1
            If Conversion.Hex(bytes(i)).ToString.Length = 1 Then
                path = path & "0" & Conversion.Hex(bytes(i)) '.ToString
            Else
                path = path & Conversion.Hex(bytes(i)) '.ToString
            End If
            boy = path.Length
        Next i
        send_to_phone(path)

I recived HEx data from server.

After I save to phone image file "test.jpg"

I cant save image. (I revice all hex data from server "data ="FF25AB1678A1B5C5.......")

How can I save it image file
 
Upvote 0

BaGRoS

Active Member
Licensed User
Longtime User
I have similar problem
Now I have
B4X:
Private address(8) As Byte = Array As Byte(0x28, 0xFF, 0x8F, 0xB1, 0x68, 0x14, 0x03, 0x47)
how convert 28FF8FB168140347 to address()?
 
Upvote 0

OliverA

Expert
Licensed User
Longtime User
Upvote 0
Status
Not open for further replies.
Top