Go to console

CrashlyticsCore

public class CrashlyticsCore extends Kit<Void>

Nested Class Summary

class CrashlyticsCore.Builder Fluent API for creating CrashlyticsCore instances. 

Constant Summary

String TAG

Public Constructor Summary

Public Method Summary

void
crash()
The easiest way to cause a crash - great for testing!
String
getIdentifier()
Must be implemented by Kit to allow plugin on-boarding
static CrashlyticsCore
PinningInfoProvider
String
void
log(int priority, String tag, String msg)
Add text logging that will be sent with your next report, using log(String).
void
log(String msg)
Add text logging that will be sent with your next report.
void
logException(Throwable throwable)
Logs a non-fatal Throwable on the Crashlytics servers.
void
setBool(String key, boolean value)
Sets a value to be associated with a given key for your crash data.
void
setDouble(String key, double value)
Sets a value to be associated with a given key for your crash data.
void
setFloat(String key, float value)
Sets a value to be associated with a given key for your crash data.
void
setInt(String key, int value)
Sets a value to be associated with a given key for your crash data.
synchronized void
setListener(CrashlyticsListener listener)
This method was deprecated. use listener(CrashlyticsListener) instead
void
setLong(String key, long value)
Sets a value to be associated with a given key for your crash data.
void
setString(String key, String value)
Set a value to be associated with a given key for your crash data.
void
setUserEmail(String email)
Optionally set a end-user's name or username for display within the Crashlytics UI.
void
setUserIdentifier(String identifier)
Many of our customers have requested the ability to tie crashes to specific end-users of their application in order to facilitate responses to support requests or permit the ability to reach out for more information.
void
setUserName(String name)
Optionally set a end-user's name or username for display within the Crashlytics UI.
boolean
verifyPinning(URL url)
Helper method to verify SSL pinning is properly configured.

Protected Method Summary

Void
doInBackground()
For heavy work to be done in initialization process on a background thread.
boolean
onPreExecute()
Called before initialization on the UI thread

Inherited Method Summary

Constants

public static final String TAG

Constant Value: "CrashlyticsCore"

Public Constructors

public CrashlyticsCore ()

Public Methods

public void crash ()

The easiest way to cause a crash - great for testing!

public String getIdentifier ()

Must be implemented by Kit to allow plugin on-boarding

Returns
  • unique identifier

public static CrashlyticsCore getInstance ()

Returns
  • the CrashlyticsCore singleton.

public PinningInfoProvider getPinningInfoProvider ()

public String getVersion ()

Returns
  • Kit Version

public void log (int priority, String tag, String msg)

Add text logging that will be sent with your next report, using log(String). The message will also be printed to LogCat using android.util.Log.println(priority, tag, msg).

Parameters
priority The priority/type constant of this log message, as defined in android.util.Log. One of: ERROR, WARN, INFO, DEBUG, VERBOSE.
tag Used to identify the source of a log message. It usually identifies the class or activity where the log call occurs.
msg The message you would like logged.

public void log (String msg)

Add text logging that will be sent with your next report. This logging will only be visible in your Crashlytics dashboard, and will be associated with the next crash or logged exception for this app execution. Newline characters ('\n') will be stripped from msg. The log is rolling with a maximum size of 64k, such that messages are removed (oldest first) if the max size is exceeded.

Parameters
msg

public void logException (Throwable throwable)

Logs a non-fatal Throwable on the Crashlytics servers. Crashlytics will analyze the Throwable and create a new issue or add it to an existing issue, as appropriate. To ensure accurate reporting, this method must be invoked from the thread on which the Throwable was thrown. The Throwable will always be processed on a background thread, so it is safe to invoke this method from the main thread.

Parameters
throwable

public void setBool (String key, boolean value)

Sets a value to be associated with a given key for your crash data.

Parameters
key
value

public void setDouble (String key, double value)

Sets a value to be associated with a given key for your crash data.

Parameters
key
value

public void setFloat (String key, float value)