diff --git a/android/nativebrik/src/main/java/com/nativebrik/sdk/data/track.kt b/android/nativebrik/src/main/java/com/nativebrik/sdk/data/track.kt index ce21ef6..ca61ad7 100644 --- a/android/nativebrik/src/main/java/com/nativebrik/sdk/data/track.kt +++ b/android/nativebrik/src/main/java/com/nativebrik/sdk/data/track.kt @@ -6,6 +6,7 @@ import com.nativebrik.sdk.data.user.formatISO8601 import com.nativebrik.sdk.data.user.getCurrentDate import com.nativebrik.sdk.schema.ListDecoder import com.nativebrik.sdk.schema.StringDecoder +import com.nativebrik.sdk.schema.TriggerEventNameDefs import kotlinx.coroutines.CoroutineScope import kotlinx.coroutines.Dispatchers import kotlinx.coroutines.launch @@ -200,12 +201,12 @@ internal class TrackRepositoryImpl: TrackRepository { crashRecord.reason?.contains("com.nativebrik.sdk") == true this.buffer.add(TrackEvent.UserEvent(TrackUserEvent( - name = "N_CRASH_RECORD" + name = TriggerEventNameDefs.N_ERROR_RECORD.name ))) if (causedByNativebrik) { buffer.add(TrackEvent.UserEvent(TrackUserEvent( - name = "N_CRASH_IN_SDK_RECORD" + name = TriggerEventNameDefs.N_ERROR_IN_SDK_RECORD.name ))) } diff --git a/android/nativebrik/src/main/java/com/nativebrik/sdk/schema/generated.kt b/android/nativebrik/src/main/java/com/nativebrik/sdk/schema/generated.kt index 3a339f3..cd3e992 100644 --- a/android/nativebrik/src/main/java/com/nativebrik/sdk/schema/generated.kt +++ b/android/nativebrik/src/main/java/com/nativebrik/sdk/schema/generated.kt @@ -1153,6 +1153,8 @@ internal enum class TriggerEventNameDefs { USER_ENTER_TO_APP, USER_ENTER_TO_APP_FIRSTLY, USER_ENTER_TO_FOREGROUND, + N_ERROR_RECORD, + N_ERROR_IN_SDK_RECORD, UNKNOWN,; companion object { @@ -1179,6 +1181,8 @@ internal enum class TriggerEventNameDefs { "USER_ENTER_TO_APP" -> USER_ENTER_TO_APP "USER_ENTER_TO_APP_FIRSTLY" -> USER_ENTER_TO_APP_FIRSTLY "USER_ENTER_TO_FOREGROUND" -> USER_ENTER_TO_FOREGROUND + "N_ERROR_RECORD" -> N_ERROR_RECORD + "N_ERROR_IN_SDK_RECORD" -> N_ERROR_IN_SDK_RECORD else -> UNKNOWN } }