public static class CaocConfig.Builder
extends java.lang.Object
| 构造器和说明 |
|---|
Builder() |
| 限定符和类型 | 方法和说明 |
|---|---|
void |
apply() |
CaocConfig.Builder |
backgroundMode(int backgroundMode)
Defines if the error activity must be launched when the app is on background.
|
static CaocConfig.Builder |
create() |
CaocConfig.Builder |
enabled(boolean enabled)
Defines if CustomActivityOnCrash crash interception mechanism is enabled.
|
CaocConfig.Builder |
errorActivity(java.lang.Class<? extends android.app.Activity> errorActivityClass)
Sets the error activity class to launch when a crash occurs.
|
CaocConfig.Builder |
errorDrawable(java.lang.Integer errorDrawable)
Defines which drawable to use in the default error activity image.
|
CaocConfig.Builder |
eventListener(CustomActivityOnCrash.EventListener eventListener)
Sets an event listener to be called when events occur, so they can be reported
by the app as, for example, Google Analytics events.
|
CaocConfig |
get() |
CaocConfig.Builder |
minTimeBetweenCrashesMs(int minTimeBetweenCrashesMs)
Defines the time that must pass between app crashes to determine that we are not
in a crash loop.
|
CaocConfig.Builder |
restartActivity(java.lang.Class<? extends android.app.Activity> restartActivityClass)
Sets the main activity class that the error activity must launch when a crash occurs.
|
CaocConfig.Builder |
showErrorDetails(boolean showErrorDetails)
Defines if the error activity must shown the error details button.
|
CaocConfig.Builder |
showRestartButton(boolean showRestartButton)
Defines if the error activity should show a restart button.
|
CaocConfig.Builder |
trackActivities(boolean trackActivities)
Defines if the activities visited by the user should be tracked
so they are reported when an error occurs.
|
public static CaocConfig.Builder create()
public CaocConfig.Builder backgroundMode(int backgroundMode)
public CaocConfig.Builder enabled(boolean enabled)
public CaocConfig.Builder showErrorDetails(boolean showErrorDetails)
public CaocConfig.Builder showRestartButton(boolean showRestartButton)
public CaocConfig.Builder trackActivities(boolean trackActivities)
public CaocConfig.Builder minTimeBetweenCrashesMs(int minTimeBetweenCrashesMs)
public CaocConfig.Builder errorDrawable(java.lang.Integer errorDrawable)
public CaocConfig.Builder errorActivity(java.lang.Class<? extends android.app.Activity> errorActivityClass)
public CaocConfig.Builder restartActivity(java.lang.Class<? extends android.app.Activity> restartActivityClass)
public CaocConfig.Builder eventListener(CustomActivityOnCrash.EventListener eventListener)
eventListener - The event listener.java.lang.IllegalArgumentException - if the eventListener is an inner or anonymous classpublic CaocConfig get()
public void apply()