Hi,
I Have an app which runs ok on Samsung Galaxy 5
But on xCover3, when I try to use a web service, it randomly crashes (I use okHttp)
Any (good) idea?
Thanks
I Have an app which runs ok on Samsung Galaxy 5
But on xCover3, when I try to use a web service, it randomly crashes (I use okHttp)
Any (good) idea?
Thanks
B4X:
Sub GetDatafromWS
Dim job1 As HttpJob
Dim endPoint As String
Dim requestSoapXML As String
Dim cDate, NameToCall As String
DateTime.DateFormat="yyyy-MM-dd"
cDate = DateTime.date(DateTime.now)
ProgressDialogShow("Réception des données du serveur...")
NameToCall = WS_name
Dim WS_to_call As String
WS_to_call = WS_Getrdv_User
endPoint = WS_Url
requestSoapXML = _
"<soap:Envelope xmlns:xsi='http://www.w3.org/2001/XMLSchema-instance' xmlns:xsd='http://www.w3.org/2001/XMLSchema' xmlns:soap='http://schemas.xmlsoap.org/soap/envelope/'>" & _
"<soap:Body>" & _
"<" & WS_to_call & " xmlns='http://patrick.imbault.org/'>" & _
"<sId>" & NameToCall & "</sId>" & _
"<sPwd>" & WS_password & "</sPwd>" & _
"</" & WS_to_call & ">" & _
"</soap:Body>" & _
"</soap:Envelope>"
Log(requestSoapXML )
job1.Initialize("job1","Main")
job1.PostString ( endPoint, requestSoapXML)
job1.GetRequest.SetContentType("")
job1.GetRequest.SetHeader("SOAPAction", "http://patrick.imbault.org/" & WS_to_call)
job1.GetRequest.SetHeader("Content-Type", "text/xml; charset=utf-8")
job1.GetRequest.Timeout = 30000
Log("run ws")
End Sub
Sub JobDone (Job As HttpJob)
Log("jobdone")
Dim resultSoapXML As String
Dim sRet As String
Dim i,i2 As Int
Sub JobDone (Job As HttpJob)
Log("JobName = " & Job.JobName & ", Success = " & Job.Success)
If Job.Success = True Then
resultSoapXML = Job.GetString
i = resultSoapXML.IndexOf(">[")
Log(i)
If i = -1 Then
Msgbox("Pas de donnnées.", "Error")
Return
End If
Try
i2 = resultSoapXML.IndexOf2("]</retrdv_", i + 3)
sRet = resultSoapXML.substring2(i + 1, i2+1)
DB_update(sRet)
Catch
Log("pb in getjos")
End Try
Else
Log("Error: " & Job.ErrorMessage)
ToastMessageShow("Error: " & Job.ErrorMessage, True)
End If
ProgressDialogHide
Log("Job.Release")
Job.Release
End Sub
Gaining focus: Window{2b106d46 u0 pim_gss_ics.com/pim_gss_ics.com.main}
run ws
getFocusedUser
getFocusedUser: current uesr id is 0
Attempted to finish an input event but the input event receiver has already been disposed.
Fatal signal 11 (SIGSEGV), code 1, fault addr 0xc in tid 25012 (pim_gss_ics.com)
findFocusedWindow: Found new focus @ 6 = Window{2b106d46 u0 pim_gss_ics.com/pim_gss_ics.com.main}