Android Question How to send custom Exception with Firebase Analitics?

ivan.tellez

Active Member
Licensed User
Longtime User
Should be possible. Please start a new thread in the questions forum and I'll show you how.


One of the best features of the Firebase integration are the automated Crash Reports for unhandled exceptions, but, if the error is traped and handled, Analitics no longer send the Crash Report.

Firebase provides a way to send custom exceptions, how can we do this in B4A?

B4X:
FirebaseCrash.report(new Exception("My first Android non-fatal error"));
 

Erel

B4X founder
Staff member
Licensed User
Longtime User
You can call this method with JavaObject:
B4X:
Dim FirebaseCrash As JavaObject 'make it a process global variable
FirebaseCrash.InitializeStatic("com.google.firebase.crash.FirebaseCrash")
FirebaseCrash.RunMethod("report", Array(LastException))

You can use ExceptionEx from the Threading library to create new exceptions if you like.
 
Upvote 0
Top