Sub Application_Error (Error As Exception, StackTrace As String) As Boolean
Dim jo As JavaObject
Dim l As Long = 500
jo.InitializeStatic("java.lang.Thread").RunMethod("sleep", Array(l))
logcat.LogCatStop
CrashLog.Append(StackTrace)
CrashLog.Append(CRLF & CRLF & "Crashreport created " & DateTime.Date(DateTime.Now))
Dim ll As Map
ll.Initialize
ll.Put("DeviceID",Main.DeviceID)
ll.Put("Type", "AND")
ll.Put("Manufacturer",Main.DeviceManufacturer)
ll.Put("Model", Main.DeviceModel)
ll.Put("Log",CrashLog)
Dim j As HttpJob
j.Initialize("j", Me)
Dim pm As PackageManager
Dim Reflector1 As Reflector
ll.Put("ApiLevel", Reflector1.GetStaticField("android.os.Build$VERSION", "SDK_INT"))
Dim ps As String="clientid=" & Main.DeviceID _
& "&type=2" & "&msgtype=CrashReport" & "&cmdbody=" & MySub.MapToString(ll) & "&apilevel=" & Reflector1.GetStaticField("android.os.Build$VERSION", "SDK_INT")
j.PostString ("http://" & MySub.EBServerAddress & ":" & MySub.EBServerPort & "/devicecommand", ps)
Return True
End Sub