Skip to main content
Version: 8.9.x

bfgreporting.bfgCrashlytics Class

Crashlytics allows you to associate arbitrary key/value pairs with your crash reports, which are viewable right from the Crashlytics dashboard. More...

Public Member Functions

void log (@NonNull String message)
 Logs a message that's included in the next fatal or non-fatal report. More...
 
void recordCustomException (@NonNull String title, String message)
 Records a non-fatal custom exception to send to Crashlytics. More...
 
void recordException (@NonNull Exception exception)
 Records a non-fatal exception to send to Crashlytics. More...
 
void setBoolean (@NonNull String key, boolean value)
 Set boolean value in Crashlytics to be reported with any crashes from the game. More...
 
void setCustomKey (@NonNull String key, @NonNull Object value)
 Records a custom key and value to be associated with subsequent fatal and non-fatal reports. More...
 
void setDouble (@NonNull String key, double value)
 Set double value in Crashlytics to be reported with any crashes from the game. More...
 
void setFloat (@NonNull String key, float value)
 Set float value in Crashlytics to be reported with any crashes from the game. More...
 
void setInt (@NonNull String key, int value)
 Set int value in Crashlytics to be reported with any crashes from the game. More...
 
void setString (@NonNull String key, @Nullable String value)
 Set string value in Crashlytics to be reported with any crashes from the game. More...
 

Static Public Member Functions

static bfgCrashlytics getInstance ()
 Get singleton instance. More...
 
static bfgCrashlytics sharedInstance ()
 Get singleton instance. More...
 

Detailed Description

Crashlytics allows you to associate arbitrary key/value pairs with your crash reports, which are viewable right from the Crashlytics dashboard. This class facilitates the setting of these key/value pairs for informative crash reporting on the dashboard.Note: Re-setting the same key will update the value.Crashlytics supports a maximum of 64 key/value pairs. Once you reach this threshold, additional values are not saved. Each key/value pair can be up to 1 KB in size–anything past that will be truncated.
Since
6.1

Member Function Documentation

◆ getInstance()

static bfgCrashlytics com.bigfishgames.bfglib.bfgreporting.bfgCrashlytics.getInstance ()
inlinestatic
Get singleton instance.
Returns
non-null Singleton instance
Since
7.1.3

◆ log()

void com.bigfishgames.bfglib.bfgreporting.bfgCrashlytics.log (@NonNull String message)
inline
Logs a message that's included in the next fatal or non-fatal report.
Parameters
messageMessage to include in the log
Since
7.1.3

◆ recordCustomException()

void com.bigfishgames.bfglib.bfgreporting.bfgCrashlytics.recordCustomException (@NonNull String title,
String message 
)
inline
Records a non-fatal custom exception to send to Crashlytics. receiving String as a message and convert it to exception to force a report to Crashlytics

◆ recordException()

void com.bigfishgames.bfglib.bfgreporting.bfgCrashlytics.recordException (@NonNull Exception exception)
inline
Records a non-fatal exception to send to Crashlytics.
Parameters
exceptionEvent to throw to force a report to Crashlytics
Since
7.1.3

◆ setBoolean()

void com.bigfishgames.bfglib.bfgreporting.bfgCrashlytics.setBoolean (@NonNull String key,
boolean value 
)
inline
Set boolean value in Crashlytics to be reported with any crashes from the game. Re-setting the same key will update the value.
Parameters
key- String key of the key/value pair
value- boolean value of the key/value pair
Deprecated:\n Use setCustomKey instead

◆ setCustomKey()

void com.bigfishgames.bfglib.bfgreporting.bfgCrashlytics.setCustomKey (@NonNull String key,
@NonNull Object value 
)
inline
Records a custom key and value to be associated with subsequent fatal and non-fatal reports. Multiple calls to this method with the same key will update the value for that key.The value of any key at the time of a fatal or non-fatal event will be associated with that event.Keys and associated values are visible in the session view on the Firebase Crashlytics console.A maximum of 64 key/value pairs can be written, and new keys added beyond that limit will be ignored. Keys or values that exceed 1024 characters will be truncated.
Parameters
keyA unique key
valueA value to be associated with the given key. This can be any of the following data types: String, int or Integer, boolean or Boolean, float or Float, double or Double, or long or Long
Since
7.1.3

◆ setDouble()

void com.bigfishgames.bfglib.bfgreporting.bfgCrashlytics.setDouble (@NonNull String key,
double value 
)
inline
Set double value in Crashlytics to be reported with any crashes from the game. Re-setting the same key will update the value.
Parameters
key- String key of the key/value pair
value- double value of the key/value pair
Deprecated:\n Use setCustomKey instead

◆ setFloat()

void com.bigfishgames.bfglib.bfgreporting.bfgCrashlytics.setFloat (@NonNull String key,
float value 
)
inline
Set float value in Crashlytics to be reported with any crashes from the game. Re-setting the same key will update the value.
Parameters
key- String key of the key/value pair
value- float value of the key/value pair
Deprecated:\n Use setCustomKey instead

◆ setInt()

void com.bigfishgames.bfglib.bfgreporting.bfgCrashlytics.setInt (@NonNull String key,
int value 
)
inline
Set int value in Crashlytics to be reported with any crashes from the game. Re-setting the same key will update the value.
Parameters
key- String key of the key/value pair
value- int value of the key/value pair
Deprecated:\n Use setCustomKey instead

◆ setString()

void com.bigfishgames.bfglib.bfgreporting.bfgCrashlytics.setString (@NonNull String key,
@Nullable String value 
)
inline
Set string value in Crashlytics to be reported with any crashes from the game. Re-setting the same key will update the value.
Parameters
key- String key of the key/value pair
value- String value of the key/value pair
Deprecated:\n Use setCustomKey instead

◆ sharedInstance()

static bfgCrashlytics com.bigfishgames.bfglib.bfgreporting.bfgCrashlytics.sharedInstance ()
inlinestatic
Get singleton instance.
Returns
Non-null Singleton instance
Deprecated:\n Use getInstance() instead