Sub Application_Error (Error As Exception, StackTrace As String) As Boolean
'wait for 500ms to allow the logs to be updated.
Dim jo As JavaObject
Dim l As Long = 500
jo.InitializeStatic("java.lang.Thread").RunMethod("sleep", Array(l))
logcat.LogCatStop
logs.Append(StackTrace)
SendLogs(StackTrace)
Return False
End Sub
Private SendLogs(Message As String)
'send the message with OkHttpUtils2
'Call ExitApplication after the job completes if you like the program to end
End Sub