Crashlytics

public class Crashlytics extends Kit<Void>
implements KitGroup

Nested Class Summary

class Crashlytics.Builder Fluent API for creating Crashlytics instances. 

Constant Summary

String TAG

Field Summary

public final Answers answers
public final Beta beta
public final CrashlyticsCore core
public final Collection<? extends Kit> kits

Public Constructor Summary

Public Method Summary

void
crash()
The easiest way to cause a crash - great for testing!
boolean
getDebugMode()
This method was deprecated. use isDebuggable() instead.
String
getIdentifier()
Must be implemented by Kit to allow plugin on-boarding
static Crashlytics
getInstance()
Gets the Crashlytics singleton object initialized with Fabric.with().
Collection<? extends Kit>
static PinningInfoProvider
getPinningInfoProvider()

Static convenience method which delegates to getPinningInfoProvider()

For testability, direct use of Crashlytics.getInstance().core.getPinningInfoProvider() is recommended.

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

Static convenience method which delegates to log(int, String, String)

For testability, direct use of Crashlytics.getInstance().core.log(priority, tag, message) is recommended.

static void
log(String msg)

Static convenience method which delegates to log(String)

For testability, direct use of Crashlytics.getInstance().core.log(msg) is recommended.

static void
logException(Throwable throwable)

Static convenience method which delegates to logException(Throwable)

For testability, direct use of Crashlytics.getInstance().core.logException(throwable) is recommended.

static void
setBool(String key, boolean value)

Static convenience method which delegates to setBool(String, boolean)

For testability, direct use of Crashlytics.getInstance().core.setBool(key, value) is recommended.

void
setDebugMode(boolean debug)
This method was deprecated. use debuggable(boolean) instead.
static void
setDouble(String key, double value)

Static convenience method which delegates to setDouble(String, double)

For testability, direct use of Crashlytics.getInstance().core.setDouble(key, value) is recommended.

static void
setFloat(String key, float value)

Static convenience method which delegates to setFloat(String, float)

For testability, direct use of Crashlytics.getInstance().core.setFloat(key, value) is recommended.

static void
setInt(String key, int value)

Static convenience method which delegates to setInt(String, int)

For testability, direct use of Crashlytics.getInstance().core.setInt(key, value) is recommended.

synchronized void
static void
setLong(String key, long value)

Static convenience method which delegates to setLong(String, long)

For testability, direct use of Crashlytics.getInstance().core.setLong(key, value) is recommended.

static void
setPinningInfoProvider(PinningInfoProvider pinningInfo)
This method was deprecated. Setting a PinningInfoProvider to use for sending crash reports has been deprecated.
static void
setString(String key, String value)

Static convenience method which delegates to setString(String, String)

For testability, direct use of Crashlytics.getInstance().core.setString(key, value) is recommended.

static void
setUserEmail(String email)

Static convenience method which delegates to setUserEmail(String)

For testability, direct use of Crashlytics.getInstance().core.setUserEmail(email) is recommended.

static void
setUserIdentifier(String identifier)

Static convenience method which delegates to setUserIdentifier(String)

For testability, direct use of Crashlytics.getInstance().core.setUserIdentifier(identifier) is recommended.

static void
setUserName(String name)

Static convenience method which delegates to setUserName(String)

For testability, direct use of Crashlytics.getInstance().core.setUserName(name) is recommended.

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.

Inherited Method Summary

Constants

public static final String TAG

Constant Value: "Crashlytics"

Fields

public final Answers answers

public final Beta beta

public final CrashlyticsCore core

public final Collection<? extends Kit> kits

Public Constructors

public Crashlytics ()

Public Methods

public void crash ()

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

public boolean getDebugMode ()

This method was deprecated.
use isDebuggable() instead.

public String getIdentifier ()

Must be implemented by Kit to allow plugin on-boarding

Returns
  • unique identifier

public static Crashlytics getInstance ()

Gets the Crashlytics singleton object initialized with Fabric.with().

public Collection<? extends Kit> getKits ()

public static PinningInfoProvider getPinningInfoProvider ()

Static convenience method which delegates to getPinningInfoProvider()

For testability, direct use of Crashlytics.getInstance().core.getPinningInfoProvider() is recommended.

public String getVersion ()

Returns
  • Kit Version

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

Static convenience method which delegates to log(int, String, String)

For testability, direct use of Crashlytics.getInstance().core.log(priority, tag, message) is recommended.

Parameters
priority
tag
msg

public static void log (String msg)

Static convenience method which delegates to log(String)

For testability, direct use of Crashlytics.getInstance().core.log(msg) is recommended.

Parameters
msg

public static void logException (Throwable throwable)

Static convenience method which delegates to logException(Throwable)

For testability, direct use of Crashlytics.getInstance().core.logException(throwable) is recommended.

Parameters
throwable

public static void setBool (String key, boolean value)

Static convenience method which delegates to setBool(String, boolean)

For testability, direct use of Crashlytics.getInstance().core.setBool(key, value) is recommended.

Parameters
key
value

public void setDebugMode (boolean debug)

This method was deprecated.
use debuggable(boolean) instead.

Parameters
debug

public static void setDouble (String key, double value)

Static convenience method which delegates to setDouble(String, double)

For testability, direct use of Crashlytics.getInstance().core.setDouble(key, value) is recommended.

Parameters
key
value

public static void setFloat (String key, float value)

Static convenience method which delegates to setFloat(String, float)

For testability, direct use of Crashlytics.getInstance().core.setFloat(key, value) is recommended.

Parameters
key
value

public static void setInt (String key, int value)

Static convenience method which delegates to setInt(String, int)

For testability, direct use of Crashlytics.getInstance().core.setInt(key, value) is recommended.

Parameters
key
value

public synchronized void setListener (CrashlyticsListener listener)

public static void setLong (String key, long value)

Static convenience method which delegates to setLong(String, long)

For testability, direct use of Crashlytics.getInstance().core.setLong(key, value) is recommended.

Parameters
key
value

public static void setPinningInfoProvider (PinningInfoProvider pinningInfo)

This method was deprecated.
Setting a PinningInfoProvider to use for sending crash reports has been deprecated.

Parameters
pinningInfo

public static void setString (String key, String value)

Static convenience method which delegates to setString(String, String)

For testability, direct use of Crashlytics.getInstance().core.setString(key, value) is recommended.

Parameters
key
value

public static void setUserEmail (String email)

Static convenience method which delegates to setUserEmail(String)

For testability, direct use of Crashlytics.getInstance().core.setUserEmail(email) is recommended.

Parameters
email

public static void setUserIdentifier (String identifier)

Static convenience method which delegates to setUserIdentifier(String)

For testability, direct use of Crashlytics.getInstance().core.setUserIdentifier(identifier) is recommended.

Parameters
identifier

public static void setUserName (String name)

Static convenience method which delegates to setUserName(String)

For testability, direct use of Crashlytics.getInstance().core.setUserName(name) is recommended.

Parameters
name

public boolean verifyPinning (URL url)

Helper method to verify SSL pinning is properly configured. This method is most appropriately used during testing and not production, as Fabric.with must be invoked prior to executing.

Parameters
url
Returns
  • true if PinningInfoProvider is assigned and a GET to the given URL returns a 200-range response, false otherwise. It will not throw an exception although the exception will be logged as an error.

Protected Methods

protected Void doInBackground ()

For heavy work to be done in initialization process on a background thread. The thread is run on the ExecutorService

发送以下问题的反馈:

此网页
需要帮助?请访问我们的支持页面