Skip to content

Update the smaple kotlin app for the new logging changes. #145

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Mar 10, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,7 @@ class EventFragment(val type: EventType, val analytics: Analytics) : Fragment()
EventType.Identify -> sendIdentify(userId = input, traits = properties)
EventType.Screen -> sendScreen(screenName = input, props = properties)
EventType.Group -> sendGroup(groupId = input, traits = properties)
else -> println("Type not supported: $type")
}
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ class AndroidAdvertisingIdPlugin(private val androidContext: Context) : Plugin {
if (isLimitAdTrackingEnabled) {
analytics.log(
"Not collecting advertising ID because isLimitAdTrackingEnabled (Google Play Services) is true.",
kind = LogFilterKind.WARNING
kind = LogKind.WARNING
)
return Result.Err(Exception("LimitAdTrackingEnabled (Google Play Services) is true"))
}
Expand All @@ -65,7 +65,7 @@ class AndroidAdvertisingIdPlugin(private val androidContext: Context) : Plugin {
if (limitAdTracking) {
analytics.log(
"Not collecting advertising ID because limit_ad_tracking (Amazon Fire OS) is true.",
kind = LogFilterKind.WARNING
kind = LogKind.WARNING
)
return Result.Err(Exception("limit_ad_tracking (Amazon Fire OS) is true."))
}
Expand All @@ -91,7 +91,7 @@ class AndroidAdvertisingIdPlugin(private val androidContext: Context) : Plugin {
} catch (e: Exception) {
Analytics.segmentLog(
message = "${e.message}: Unable to collect advertising ID from Google Play Services.",
kind = LogFilterKind.ERROR
kind = LogKind.ERROR
)
}
try {
Expand All @@ -111,12 +111,12 @@ class AndroidAdvertisingIdPlugin(private val androidContext: Context) : Plugin {
} catch (e: Exception) {
Analytics.segmentLog(
"${e.message}: Unable to collect advertising ID from Amazon Fire OS.",
kind = LogFilterKind.WARNING
kind = LogKind.WARNING
)
}
analytics.log(
"Unable to collect advertising ID from Amazon Fire OS and Google Play Services.",
kind = LogFilterKind.WARNING
kind = LogKind.WARNING
)
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ class AndroidRecordScreenPlugin : Plugin, AndroidLifecycle {
} catch (e: Exception) {
Analytics.segmentLog(
"Unable to track screen view for ${activity.toString()}",
kind = LogFilterKind.ERROR
kind = LogKind.ERROR
)
}
}
Expand Down