Setting Crash SDK

IMQA Crash offers various options and enables the user to add custom settings for generating more detailed crash reports.

1. Custom crash occurrence

IMQA Crash Agent can collect the following user-defined errors. You can specify a specific tag and error rank together with the Exception object.

 try {
  ...
} catch (SomeException e) {
  IMQACrashAgent.SendException(e, "ERROR TAG", ErrorRank.Major);
}

There are no specific rules for error ranks. Error ranks can be changed according to the app configuration.

Rank
Description

ErrorRank.Unhandle

The default error rank used for an unhandled exception.

ErrorRank.Critical

A crash that affects the app significantly.

ErrorRank.Major

A crash that affects the app.

ErrorRank.Minor

A crash that does not affect the app significantly.

2. Custom Web Crash

IMQA WebAgent lets you collect custom errors by specifying the desired error messages for detailed web error analytics.

Create Custom Errors

IMQA WCrash detects and collects user-defined errors.

Custom Error Messages

You can change the default error messages to any error messages you want and collect them by WebAgent. We recommend specifying several error messages for detailed web error analytics.

You can view web crashes with detailed information in the IMQA WCrash service as shown below.

❶ Caught Error Instance Type Displays the name of the caught error instance of the error if it is generated on a web page.

❷ Custom Error Message Displays a user-specified message when a specific error-type error is generated.

❸ Error-type / Code line number You can check the type of webview error and the line number of the error.

Error-type
Description

Error

This is the error type set by the user.

EvalError

This error occurs in eval().

RangeError

This error is generated when a variable is outside its valid range.

ReferenceError

This error occurs when an incorrect reference is made.

SyntaxError

It is an error if incorrect syntax exists.

TypeError

If it is not a valid data type, it is a type error.

URIError

This error is generated when inappropriate parameters are passed to the encodeURI() or decodeURI() functions.

AggregateError

This is a type of error that wraps multiple errors into one error.

3. Registering EventPath

EventPath is a function used to check the path of the app launch in the user’s device. The EventPath tracking code should be inserted into the class to use this function. Enter the following details as shown under “STEP” and “LABEL” into the tracking code.

STEP
LABEL

Get the level of the call stack to collect, and the class name, function name, and call location of that level.

Alias of the collected EventPath. Shows each occurrence location of EventPath as an alias on the crash information window.

4. Registering a custom user ID

You can assign a custom ID to identify a user when a crash occurs. If user information is registered, the user information will also be displayed in crash occurrence information.

Class Name
Method Name
Description

IdentifierCollector

setUserId(STRING)

Register a user ID.

IdentifierCollector

setUserName(STRING)

Register a user name.

IdentifierCollector

setUserMail(STRING)

Register a user email.

5. Registering a custom user log/key

The developer can manually leave additional logs before a crash occurs (up to 100 logs.)

Class Name
Method Name
Description

CustomLogCollector

log(STRING)

Leaves the log as a plain string.

CustomLogCollector

log(KEY, VALUE)

Leaves the log in the form of key:value.

6. Adding initialization options

You can specify options when initializing IMQAController. You can change the IMQA Crash mode using parameters or options.

Class Name
Method Name
Description

IMQAOption

setDirectUploadFlag(BOOL)

Sets upload mode. If set to false, it will also work in debug mode.

IMQAOption

setPrintLog(BOOL)

Sets whether to output the log. If set to true, IMQA logs are output.

IMQAOption

setAnrOn(BOOL)

Sets whether to monitor ANR. If set to false, ANR will be excluded from crash collection.

IMQAOption

setAnrTimeoutIntercal(int)

Sets the time when ANR timeout occurs (in milliseconds.)

Last updated