ziz
Member
Hello you all
When requesting to read data from FireBase that does not exist, the application closes and collapses with this line
Of course, this is normal
Is there a way to avoid this problem ?
When requesting to read data from FireBase that does not exist, the application closes and collapses with this line
B4X:
Dim root As Map = parser.NextObject
Of course, this is normal
Is there a way to avoid this problem ?
B4X:
Public Sub ReadData(LinkSuffix As String, Token As String,RequestTag As String)
Dim hj As HttpJob
hj.Initialize("readdata",Me)
hj.Tag = RequestTag
Dim RequestURL As String = BaseURL & LinkSuffix & ".json"
If Not(Token = "") Then
RequestURL = RequestURL & "?auth=" & Token
End If
hj.Download(RequestURL)
Wait For (hj) JobDone(hj As HttpJob)
If hj.Success Then
Dim parser As JSONParser
parser.Initialize(hj.GetString)
Dim root As Map = parser.NextObject
End Sub