public final class CustomActivityOnCrash
extends java.lang.Object
| Modifier and Type | Class and Description |
|---|---|
static interface |
CustomActivityOnCrash.EventListener
Interface to be called when events occur, so they can be reported
by the app as, for example, Google Analytics events.
|
| Constructor and Description |
|---|
CustomActivityOnCrash() |
| Modifier and Type | Method and Description |
|---|---|
static void |
closeApplication(android.app.Activity activity,
CaocConfig config)
Closes the app.
|
static java.lang.String |
getActivityLogFromIntent(android.content.Intent intent)
Given an Intent, returns the activity log extra from it.
|
static java.lang.String |
getAllErrorDetailsFromIntent(android.content.Context context,
android.content.Intent intent)
Given an Intent, returns several error details including the stack trace extra from the intent.
|
static CaocConfig |
getConfig()
INTERNAL method that returns the current configuration of the library.
|
static CaocConfig |
getConfigFromIntent(android.content.Intent intent)
Given an Intent, returns the config extra from it.
|
static java.lang.String |
getStackTraceFromIntent(android.content.Intent intent)
Given an Intent, returns the stack trace extra from it.
|
static void |
install(android.content.Context context)
Installs CustomActivityOnCrash on the application using the default error activity.
|
static void |
restartApplication(android.app.Activity activity,
CaocConfig config) |
static void |
restartApplicationWithIntent(android.app.Activity activity,
android.content.Intent intent,
CaocConfig config)
Given an Intent, restarts the app and launches a startActivity to that intent.
|
static void |
setConfig(CaocConfig config)
INTERNAL method that sets the configuration of the library.
|
public static void install(android.content.Context context)
context - Context to use for obtaining the ApplicationContext. Must not be null.public static java.lang.String getStackTraceFromIntent(android.content.Intent intent)
intent - The Intent. Must not be null.public static CaocConfig getConfigFromIntent(android.content.Intent intent)
intent - The Intent. Must not be null.public static java.lang.String getActivityLogFromIntent(android.content.Intent intent)
intent - The Intent. Must not be null.public static java.lang.String getAllErrorDetailsFromIntent(android.content.Context context,
android.content.Intent intent)
context - A valid context. Must not be null.intent - The Intent. Must not be null.public static void restartApplicationWithIntent(android.app.Activity activity,
android.content.Intent intent,
CaocConfig config)
activity - The current error activity. Must not be null.intent - The Intent. Must not be null.config - The config object as obtained by calling getConfigFromIntent.public static void restartApplication(android.app.Activity activity,
CaocConfig config)
public static void closeApplication(android.app.Activity activity,
CaocConfig config)
activity - The current error activity. Must not be null.config - The config object as obtained by calling getConfigFromIntent.public static CaocConfig getConfig()
public static void setConfig(CaocConfig config)
config - the configuration to use