Skip to content

Commit a62a85e

Browse files
committed
remove deprecations
1 parent ff81e16 commit a62a85e

1 file changed

Lines changed: 5 additions & 6 deletions

File tree

  • LogcatCountlyLib/src/main/java/info/hannes/countly

LogcatCountlyLib/src/main/java/info/hannes/countly/Analytics.kt

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -23,25 +23,25 @@ class Analytics : IAnalytics {
2323

2424
override fun recordEvent(event: String) {
2525
if (isInitialized()) {
26-
countlyInstance.recordEvent(event, segmentation, 1)
26+
countlyInstance.events().recordEvent(event, segmentation, 1)
2727
}
2828
}
2929

3030
override fun recordError(message: String) {
3131
if (isInitialized()) {
32-
countlyInstance.recordHandledException(RuntimeException(message))
32+
countlyInstance.crashes().recordHandledException(RuntimeException(message))
3333
}
3434
}
3535

3636
override fun recordError(throwable: Throwable) {
3737
if (isInitialized()) {
38-
countlyInstance.recordHandledException(throwable)
38+
countlyInstance.crashes().recordHandledException(throwable)
3939
}
4040
}
4141

4242
override fun recordWarning(message: String) {
4343
if (isInitialized()) {
44-
countlyInstance.recordHandledException(RuntimeException(message))
44+
countlyInstance.crashes().recordHandledException(RuntimeException(message))
4545
}
4646
}
4747

@@ -58,8 +58,7 @@ class Analytics : IAnalytics {
5858
}
5959

6060
companion object {
61-
62-
val segmentation = HashMap<String, String>()
61+
val segmentation = mutableMapOf<String, Any>()
6362

6463
@SuppressLint("HardwareIds")
6564
fun initAnalytics(context: Context, loggingEnabled: Boolean = false, countlyKey: String, countlyHost: String) {

0 commit comments

Comments
 (0)