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)
' Dim email As Email
' email.To.Add(emailAddress)
' email.Subject = "Error report: " & Application.LabelName & " (" & Application.VersionName & ", build " & Main.glAutoVersion & ")"
' email.Body = logs
' StartActivity(email.GetIntent)
Return True ' Will prevent the "continue" dialog and log the error to Google Play
End Sub