-
public class EmbraceSamplesHelps to verify and test embrace SDK integration. it allows users to execute code that automatically verifies the integration by calling the verifyIntegration method. It also provides example code to generate ANR and JVM/NDK crashes
-
-
Field Summary
Fields Modifier and Type Field Description public final static EmbraceSamplesINSTANCE
-
Method Summary
Modifier and Type Method Description final static UnitverifyIntegration()Starts an automatic verification of the following Embrace features: Log a Breadcrumb
Set user data
Add info, warning and error logs
Start and end a moment
Executes a GET request
Add the trace id to the request (default or the one specified in the local config)
Check the current and the latest SDK version
Execute a POST request
Execute a bad request
Trigger an ANR
Throw an Exception (yep, the application will be relaunch)
final static UnitthrowJvmException()Throw a custom JVM crash to be part of current session. final static UnittriggerAnr()Force a short ANR that lasts 4 seconds final static UnittriggerLongAnr()Force a long ANR that lasts 30 seconds final static UnitcauseNdkIllegalInstruction()Throws a ndk SigIllegalInstruction -
-
Method Detail
-
verifyIntegration
final static Unit verifyIntegration()
Starts an automatic verification of the following Embrace features:
Log a Breadcrumb
Set user data
Add info, warning and error logs
Start and end a moment
Executes a GET request
Add the trace id to the request (default or the one specified in the local config)
Check the current and the latest SDK version
Execute a POST request
Execute a bad request
Trigger an ANR
Throw an Exception (yep, the application will be relaunch)
Then, that information can be verified in user sessions dashboard
-
throwJvmException
final static Unit throwJvmException()
Throw a custom JVM crash to be part of current session.
It is recommended to implement this method call via a button press once the app has loaded.
After a crash is sent, the app should be restarted in order to see the error in the dashboard.
-
triggerAnr
final static Unit triggerAnr()
Force a short ANR that lasts 4 seconds
-
triggerLongAnr
final static Unit triggerLongAnr()
Force a long ANR that lasts 30 seconds
-
causeNdkIllegalInstruction
final static Unit causeNdkIllegalInstruction()
Throws a ndk SigIllegalInstruction
-
-
-