Android Question Upload Error on Server When App Crash

Kiran Raotole

Active Member
Licensed User
Can I upload Crash Log on mysql server when App Crash?

I tried like this :::
Code:
Sub Application_Error (Error As Exception, StackTrace As String) As Boolean
    Dim http As HttpJob
    http.Initialize("temp",Me)
    
    Dim post As String
    post = "errorlog=" & "testing"
    http.PostString(url & "app_crash_new_entry.php",post)
    Log("aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa")
    Return True
End Sub

Not working.


Any IDEAS?
 

Erel

B4X founder
Staff member
Licensed User
Longtime User
This cannot work as the app will crash and end before the request is sent.

Simplest solution is to use Crashlytics and let them do the job for you. It saves the logs locally and sends them when the app starts.

You can try to call another sub and make the request there.
Return False from this sub and call ExitApplication after the error was sent.
 
Upvote 0
Top