I receive the following string frm Sigfox Callback:
B4X:
00786d653fb7da0123000000
I then parse the required data from the string with:
B4X:
Log("Got Sense01")
Dim ProductType As String = cFrame.SubString2(0,2)
Dim beaconmac As String = cFrame.SubString2(2,14)
Dim messageStatus As String = cFrame.SubString2(14,2)
Dim BattLevel As String = cFrame.SubString2(16,2)
However, I receive the following error at line "Dim messageStatus As String = cFrame.SubString2(14,2)":
B4X:
An error occurred:
(Line: 122) Dim messageStatus As String = cFrame.SubString2(
java.lang.StringIndexOutOfBoundsException: String index out of range: -12
SubString2 (BeginIndex As Int, EndIndex As Int) As String
Returns a new string which is a substring of the original string.
The new string will include the character at BeginIndex and will extend to the character at EndIndex, not including the last character.
SubString2 (BeginIndex As Int, EndIndex As Int) As String
Returns a new string which is a substring of the original string.
The new string will include the character at BeginIndex and will extend to the character at EndIndex, not including the last character.