Skip to content
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

Release/6.1.1 #703

Merged
merged 2 commits into from
Jan 22, 2025
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
4 changes: 4 additions & 0 deletions CHANGELOG
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
Version 6.1.1 (2025-01-22)
--------------------------
Do not autotrack screen view events when app comes to foreground (#701)

Version 6.1.0 (2025-01-16)
--------------------------
Add new WebView interface (#700)
Expand Down
2 changes: 1 addition & 1 deletion VERSION
Original file line number Diff line number Diff line change
@@ -1 +1 @@
6.1.0
6.1.1
2 changes: 1 addition & 1 deletion build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ plugins {

subprojects {
group = 'com.snowplowanalytics'
version = '6.1.0'
version = '6.1.1'
repositories {
google()
maven {
Expand Down
2 changes: 1 addition & 1 deletion gradle.properties
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ systemProp.org.gradle.internal.http.socketTimeout=120000
SONATYPE_STAGING_PROFILE=comsnowplowanalytics
GROUP=com.snowplowanalytics
POM_ARTIFACT_ID=snowplow-android-tracker
VERSION_NAME=6.1.0
VERSION_NAME=6.1.1

POM_NAME=snowplow-android-tracker
POM_PACKAGING=aar
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,13 +24,18 @@ import com.snowplowanalytics.snowplow.event.ScreenView.Companion.buildWithActivi
@RestrictTo(RestrictTo.Scope.LIBRARY)
class ActivityLifecycleHandler private constructor(context: Context) :
Application.ActivityLifecycleCallbacks {
private var lastActivityHashCode: Int? = null

init {
val application = context.applicationContext as? Application
application?.registerActivityLifecycleCallbacks(this)
}

override fun onActivityResumed(activity: Activity) {
val sameActivity = lastActivityHashCode?.let { it == activity.hashCode() } ?: false
if (sameActivity) { return }
lastActivityHashCode = activity.hashCode()

Logger.d(TAG, "Auto screenview occurred - activity has resumed")
try {
val event = buildWithActivity(activity)
Expand Down
Loading