Hi all, i have this code that work without problem into android:
In B4i DecodeBase64 give me result "Empty String" also if server response same thing that in android:
Any suggestion ?
Thank you very much
Marco
B4X:
Sub decode(texto As String) As String
Dim strResult As String
Dim cs As CompressedStreams
Dim su As StringUtils
Dim bt() As Byte
Dim bc As ByteConverter
Try
'Response from server: eJxVj8EKwjAQRH+l9CySmqrgLaiHgKUgxYtIKMlaAm22JClCxX93Ix70tPBmdpi5PnNr1BTBRch3ecHLfJHIaOcZvG0TWxHSGCIqjS5A5xJlS8aIRzuiMvZPIexwgJ8MN/X9F2rs0iVfJc77OhOV3Mv0MQ3gUUXo4Y7OaiQH5yXnm23B1qmUM9ZTYhIuUmSH4ymrRNOIppY16WMbwgO9+TMmGa/bG6g7RVU=
bt = su.DecodeBase64(texto)
Dim xx As String = bc.StringFromBytes(bt, "UTF8")
Log(xx) 'Empty String <----- Why ???
bt = cs.DecompressBytes(bt, "zlib")
strResult = bc.StringFromBytes(bt, "UTF8")
Return strResult
Catch
Log(LastException)
Return ""
End Try
End Sub
In B4i DecodeBase64 give me result "Empty String" also if server response same thing that in android:
'Response from server: eJxVj8EKwjAQRH+l9CySmqrgLaiHgKUgxYtIKMlaAm22JClCxX93Ix70tPBmdpi5PnNr1BTBRch3ecHLfJHIaOcZvG0TWxHSGCIqjS5A5xJlS8aIRzuiMvZPIexwgJ8MN/X9F2rs0iVfJc77OhOV3Mv0MQ3gUUXo4Y7OaiQH5yXnm23B1qmUM9ZTYhIuUmSH4ymrRNOIppY16WMbwgO9+TMmGa/bG6g7RVU=
Any suggestion ?
Thank you very much
Marco