API reference
API reference
Select your platform
No SDKs available
No versions available

CrashMonitor Object

Crash and exception monitoring utilities for AI debug tools.
Provides capabilities to:
  • Monitor for crashes via logcat
  • Capture stack traces
  • Detect ANRs (Application Not Responding)
  • Export crash reports

Signature

object CrashMonitor

Functions

captureAllThreadStackTraces ()
Signature
fun captureAllThreadStackTraces(): Map<String, List<String>>
Returns
Map
captureCurrentStackTrace ()
Signature
fun captureCurrentStackTrace(): List<String>
Returns
List
clearHistory ()
Signature
fun clearHistory()
exportCrashReport ()
Signature
fun exportCrashReport(): JSONObject
Returns
JSONObject
getCrashHistory ()
Signature
fun getCrashHistory(): List<CrashMonitor.CrashInfo>
Returns
List
getFirstCrash ()
Signature
fun getFirstCrash(): CrashMonitor.CrashInfo?
Returns
CrashMonitor.CrashInfo?
getLastCrash ()
Signature
fun getLastCrash(): CrashMonitor.CrashInfo?
Returns
CrashMonitor.CrashInfo?
install ( packageName )
Signature
fun install(packageName: String)
Parameters
packageName: String
uninstall ()
Signature
fun uninstall()

Inner Class

CrashInfo Class

Modifiers: final

Signature

data class CrashInfo(val timestamp: Long, val exceptionType: String, val message: String, val stackTrace: List<String>, val threadName: String)

Constructors

CrashInfo ( timestamp , exceptionType , message , stackTrace , threadName )
Signature
constructor(timestamp: Long, exceptionType: String, message: String, stackTrace: List<String>, threadName: String)
Parameters
timestamp: Long
exceptionType: String
message: String
stackTrace: List
threadName: String
Returns
CrashMonitor.CrashInfo

Properties

exceptionType : String
[Get]
Signature
val exceptionType: String
message : String
[Get]
Signature
val message: String
stackTrace : List
[Get]
Signature
val stackTrace: List<String>
threadName : String
[Get]
Signature
val threadName: String
timestamp : Long
[Get]
Signature
val timestamp: Long

Functions

toJson ()
Signature
fun toJson(): JSONObject
Returns
JSONObject
Did you find this page helpful?