public final class XCrash
extends java.lang.Object
| Modifier and Type | Class and Description |
|---|---|
static class |
XCrash.InitParameters
An initialization parameter set.
|
| Modifier and Type | Field and Description |
|---|---|
static java.lang.String |
nativeLibDir |
| Modifier and Type | Method and Description |
|---|---|
static java.lang.String |
getLogDir() |
static int |
init(android.content.Context ctx)
Initialize xCrash with default parameters.
|
static int |
init(android.content.Context ctx,
XCrash.InitParameters params)
Initialize xCrash with custom parameters.
|
static void |
testJavaCrash(boolean runInNewThread)
Force a java exception.
|
static void |
testNativeCrash(boolean runInNewThread)
Force a native crash.
|
public static int init(android.content.Context ctx)
Note: This is a synchronous operation.
ctx - The context of the application object of the current process.Errno.public static int init(android.content.Context ctx,
XCrash.InitParameters params)
Note: This is a synchronous operation.
ctx - The context of the application object of the current process.params - An initialization parameter set.Errno.public static java.lang.String getLogDir()
public static void testJavaCrash(boolean runInNewThread)
throws java.lang.RuntimeException
Warning: This method is for testing purposes only. Don't call it in a release version of your APP.
runInNewThread - Whether it is triggered in the current thread.java.lang.RuntimeException - This exception will terminate current process.public static void testNativeCrash(boolean runInNewThread)
Warning: This method is for testing purposes only. Don't call it in a release version of your APP.
runInNewThread - Whether it is triggered in the current thread.