From a4ff351e07496cbeca0d2098209108ae6ae944c0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Matu=CC=81s=CC=8C=20Tomlein?= Date: Wed, 29 Nov 2023 18:04:10 +0100 Subject: [PATCH 01/21] Flush events only when the buffer is full (close #648) --- .../snowplow/tracker/EmitterTest.kt | 23 +++++++++++++++++++ .../snowplowanalytics/core/emitter/Emitter.kt | 16 +++++++------ 2 files changed, 32 insertions(+), 7 deletions(-) diff --git a/snowplow-tracker/src/androidTest/java/com/snowplowanalytics/snowplow/tracker/EmitterTest.kt b/snowplow-tracker/src/androidTest/java/com/snowplowanalytics/snowplow/tracker/EmitterTest.kt index f10425c12..9eb1d156d 100755 --- a/snowplow-tracker/src/androidTest/java/com/snowplowanalytics/snowplow/tracker/EmitterTest.kt +++ b/snowplow-tracker/src/androidTest/java/com/snowplowanalytics/snowplow/tracker/EmitterTest.kt @@ -429,6 +429,29 @@ class EmitterTest { emitter.flush() } + @Test + fun testDoesntMakeRequestUnlessBufferSizeIsReached() { + val networkConnection = MockNetworkConnection(HttpMethod.GET, 200) + val emitter = getEmitter(networkConnection, BufferOption.SmallGroup) + + for (payload in generatePayloads(9)) { + emitter.add(payload) + } + Thread.sleep(1000) + + // all events waiting in queue + Assert.assertEquals(0, networkConnection.previousResults.size) + Assert.assertEquals(9, emitter.eventStore!!.size()) + + emitter.add(generatePayloads(1)[0]) + Thread.sleep(1000) + + // all events sent + Assert.assertEquals(0, emitter.eventStore!!.size()) + Assert.assertEquals(1, networkConnection.previousResults.size) + emitter.flush() + } + // Emitter Builder private fun getEmitter(networkConnection: NetworkConnection?, option: BufferOption?): Emitter { val builder = { emitter: Emitter -> diff --git a/snowplow-tracker/src/main/java/com/snowplowanalytics/core/emitter/Emitter.kt b/snowplow-tracker/src/main/java/com/snowplowanalytics/core/emitter/Emitter.kt index 7cf995ef9..b847b4152 100755 --- a/snowplow-tracker/src/main/java/com/snowplowanalytics/core/emitter/Emitter.kt +++ b/snowplow-tracker/src/main/java/com/snowplowanalytics/core/emitter/Emitter.kt @@ -422,13 +422,15 @@ class Emitter(context: Context, collectorUri: String, builder: ((Emitter) -> Uni */ fun add(payload: Payload) { Executor.execute(TAG) { - eventStore?.add(payload) - if (isRunning.compareAndSet(false, true)) { - try { - attemptEmit(networkConnection) - } catch (t: Throwable) { - isRunning.set(false) - Logger.e(TAG, "Received error during emission process: %s", t) + eventStore?.let { eventStore -> + eventStore.add(payload) + if (eventStore.size() >= bufferOption.code && isRunning.compareAndSet(false, true)) { + try { + attemptEmit(networkConnection) + } catch (t: Throwable) { + isRunning.set(false) + Logger.e(TAG, "Received error during emission process: %s", t) + } } } } From bf8eeae4a5fb7bc9341b753d91611fec901e3e65 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Matu=CC=81s=CC=8C=20Tomlein?= Date: Wed, 29 Nov 2023 18:06:29 +0100 Subject: [PATCH 02/21] Change default buffer option to single (close #649) --- .../snowplowtrackerdemojava/Demo.java | 1 - .../snowplowdemokotlin/Demo.kt | 2 +- .../snowplow/tracker/EmitterTest.kt | 22 ++++++------- .../core/emitter/EmitterDefaults.kt | 2 +- .../configuration/EmitterConfiguration.kt | 9 +++--- .../snowplow/emitter/BufferOption.kt | 31 ++++++++++++++----- 6 files changed, 40 insertions(+), 27 deletions(-) diff --git a/snowplow-demo-java/src/main/java/com/snowplowanalytics/snowplowtrackerdemojava/Demo.java b/snowplow-demo-java/src/main/java/com/snowplowanalytics/snowplowtrackerdemojava/Demo.java index 3ea06bc70..968d8d8f3 100644 --- a/snowplow-demo-java/src/main/java/com/snowplowanalytics/snowplowtrackerdemojava/Demo.java +++ b/snowplow-demo-java/src/main/java/com/snowplowanalytics/snowplowtrackerdemojava/Demo.java @@ -295,7 +295,6 @@ private boolean setupWithLocalConfig() { NetworkConfiguration networkConfiguration = new NetworkConfiguration(uri, method); EmitterConfiguration emitterConfiguration = new EmitterConfiguration() .requestCallback(getRequestCallback()) - .bufferOption(BufferOption.DefaultGroup) .threadPoolSize(20) .emitRange(500) .byteLimitPost(52000); diff --git a/snowplow-demo-kotlin/src/main/java/com/snowplowanalytics/snowplowdemokotlin/Demo.kt b/snowplow-demo-kotlin/src/main/java/com/snowplowanalytics/snowplowdemokotlin/Demo.kt index 9acb2dce4..5a28d29c9 100644 --- a/snowplow-demo-kotlin/src/main/java/com/snowplowanalytics/snowplowdemokotlin/Demo.kt +++ b/snowplow-demo-kotlin/src/main/java/com/snowplowanalytics/snowplowdemokotlin/Demo.kt @@ -260,7 +260,7 @@ class Demo : Activity(), LoggerDelegate { val networkConfiguration = NetworkConfiguration(uri, method) val emitterConfiguration = EmitterConfiguration() .requestCallback(requestCallback) - .bufferOption(BufferOption.DefaultGroup) + .bufferOption(BufferOption.SmallGroup) .threadPoolSize(20) .emitRange(500) .byteLimitPost(52000) diff --git a/snowplow-tracker/src/androidTest/java/com/snowplowanalytics/snowplow/tracker/EmitterTest.kt b/snowplow-tracker/src/androidTest/java/com/snowplowanalytics/snowplow/tracker/EmitterTest.kt index 9eb1d156d..3ab0c8c7c 100755 --- a/snowplow-tracker/src/androidTest/java/com/snowplowanalytics/snowplow/tracker/EmitterTest.kt +++ b/snowplow-tracker/src/androidTest/java/com/snowplowanalytics/snowplow/tracker/EmitterTest.kt @@ -45,12 +45,12 @@ class EmitterTest { var builder = { emitter: Emitter -> emitter.bufferOption = BufferOption.Single } var emitter = Emitter(context, "com.acme", builder) Assert.assertEquals(BufferOption.Single, emitter.bufferOption) - builder = { emitter1: Emitter -> emitter1.bufferOption = BufferOption.DefaultGroup } + builder = { emitter1: Emitter -> emitter1.bufferOption = BufferOption.SmallGroup } emitter = Emitter(context, "com.acme", builder) - Assert.assertEquals(BufferOption.DefaultGroup, emitter.bufferOption) - builder = { emitter2: Emitter -> emitter2.bufferOption = BufferOption.HeavyGroup } + Assert.assertEquals(BufferOption.SmallGroup, emitter.bufferOption) + builder = { emitter2: Emitter -> emitter2.bufferOption = BufferOption.LargeGroup } emitter = Emitter(context, "com.acme", builder) - Assert.assertEquals(BufferOption.HeavyGroup, emitter.bufferOption) + Assert.assertEquals(BufferOption.LargeGroup, emitter.bufferOption) } @Test @@ -76,7 +76,7 @@ class EmitterTest { var emitter = Emitter(context, uri, builder) Assert.assertEquals("http://$uri/i", emitter.emitterUri) builder = { emitter1: Emitter -> - emitter1.bufferOption = BufferOption.DefaultGroup + emitter1.bufferOption = BufferOption.SmallGroup emitter1.httpMethod = HttpMethod.POST emitter1.requestSecurity = Protocol.HTTP } @@ -86,14 +86,14 @@ class EmitterTest { emitter.emitterUri ) builder = { emitter2: Emitter -> - emitter2.bufferOption = BufferOption.DefaultGroup + emitter2.bufferOption = BufferOption.SmallGroup emitter2.httpMethod = HttpMethod.GET emitter2.requestSecurity = Protocol.HTTPS } emitter = Emitter(context, uri, builder) Assert.assertEquals("https://$uri/i", emitter.emitterUri) builder = { emitter3: Emitter -> - emitter3.bufferOption = BufferOption.DefaultGroup + emitter3.bufferOption = BufferOption.SmallGroup emitter3.httpMethod = HttpMethod.POST emitter3.requestSecurity = Protocol.HTTPS } @@ -173,8 +173,8 @@ class EmitterTest { Assert.assertEquals("https://$uri/i", emitter.emitterUri) emitter.emitterUri = "com.acme" Assert.assertEquals("https://com.acme/i", emitter.emitterUri) - emitter.bufferOption = BufferOption.HeavyGroup - Assert.assertEquals(BufferOption.HeavyGroup, emitter.bufferOption) + emitter.bufferOption = BufferOption.LargeGroup + Assert.assertEquals(BufferOption.LargeGroup, emitter.bufferOption) emitter.flush() emitter.flush() Thread.sleep(500) @@ -189,8 +189,8 @@ class EmitterTest { "https://com.foo/com.snowplowanalytics.snowplow/tp2", emitter.emitterUri ) - emitter.bufferOption = BufferOption.DefaultGroup - Assert.assertEquals(BufferOption.HeavyGroup, emitter.bufferOption) + emitter.bufferOption = BufferOption.SmallGroup + Assert.assertEquals(BufferOption.LargeGroup, emitter.bufferOption) emitter.shutdown() builder = { emitter1: Emitter -> emitter1.bufferOption = BufferOption.Single diff --git a/snowplow-tracker/src/main/java/com/snowplowanalytics/core/emitter/EmitterDefaults.kt b/snowplow-tracker/src/main/java/com/snowplowanalytics/core/emitter/EmitterDefaults.kt index 4d073ab21..a31ca5ed4 100644 --- a/snowplow-tracker/src/main/java/com/snowplowanalytics/core/emitter/EmitterDefaults.kt +++ b/snowplow-tracker/src/main/java/com/snowplowanalytics/core/emitter/EmitterDefaults.kt @@ -21,7 +21,7 @@ import java.util.concurrent.TimeUnit object EmitterDefaults { var httpMethod = HttpMethod.POST - var bufferOption = BufferOption.DefaultGroup + var bufferOption = BufferOption.Single var httpProtocol = Protocol.HTTPS var tlsVersions: EnumSet = EnumSet.of(TLSVersion.TLSv1_2) var emitRange: Int = 150 diff --git a/snowplow-tracker/src/main/java/com/snowplowanalytics/snowplow/configuration/EmitterConfiguration.kt b/snowplow-tracker/src/main/java/com/snowplowanalytics/snowplow/configuration/EmitterConfiguration.kt index 79e8c64ff..48a07f872 100644 --- a/snowplow-tracker/src/main/java/com/snowplowanalytics/snowplow/configuration/EmitterConfiguration.kt +++ b/snowplow-tracker/src/main/java/com/snowplowanalytics/snowplow/configuration/EmitterConfiguration.kt @@ -23,7 +23,7 @@ import org.json.JSONObject * Configure how the tracker should send the events to the collector. * * Default values: - * - bufferOption: [BufferOption.DefaultGroup] + * - bufferOption: [BufferOption.Single] * - serverAnonymisation: false * - emitRange: 150 - maximum number of events to process at a time * - threadPoolSize: 15 @@ -45,7 +45,7 @@ open class EmitterConfiguration() : Configuration, EmitterConfigurationInterface private var _bufferOption: BufferOption? = null override var bufferOption: BufferOption - get() = _bufferOption ?: sourceConfig?.bufferOption ?: BufferOption.DefaultGroup + get() = _bufferOption ?: sourceConfig?.bufferOption ?: EmitterDefaults.bufferOption set(value) { _bufferOption = value } private var _emitRange: Int? = null @@ -96,8 +96,7 @@ open class EmitterConfiguration() : Configuration, EmitterConfigurationInterface // Builders /** - * How many events to send in each request. By default, this is set to [BufferOption.DefaultGroup], - * a maximum of 10 events per request. + * How many events to send in each request. By default, this is set to [BufferOption.Single]. */ fun bufferOption(bufferOption: BufferOption): EmitterConfiguration { this.bufferOption = bufferOption @@ -205,7 +204,7 @@ open class EmitterConfiguration() : Configuration, EmitterConfigurationInterface */ constructor(jsonObject: JSONObject) : this() { if (jsonObject.has("bufferOption")) { - _bufferOption = BufferOption.valueOf(jsonObject.getString("bufferOption")) + _bufferOption = BufferOption.fromString(jsonObject.getString("bufferOption")) } if (jsonObject.has("emitRange")) { _emitRange = jsonObject.getInt("emitRange") } if (jsonObject.has("threadPoolSize")) { _threadPoolSize = jsonObject.getInt("threadPoolSize") } diff --git a/snowplow-tracker/src/main/java/com/snowplowanalytics/snowplow/emitter/BufferOption.kt b/snowplow-tracker/src/main/java/com/snowplowanalytics/snowplow/emitter/BufferOption.kt index 4305c16b2..58be82ee6 100755 --- a/snowplow-tracker/src/main/java/com/snowplowanalytics/snowplow/emitter/BufferOption.kt +++ b/snowplow-tracker/src/main/java/com/snowplowanalytics/snowplow/emitter/BufferOption.kt @@ -17,20 +17,35 @@ package com.snowplowanalytics.snowplow.emitter */ enum class BufferOption(val code: Int) { /** - * Sends both GET and POST requests with only a single event. Can cause a spike in - * network traffic if used in correlation with a large amount of events. + * Sends both GET and POST requests with only a single event. + * This is the default setting. + * Can cause a spike in network traffic if used in correlation with a large amount of events. */ Single(1), /** - * Sends POST requests in groups of 10 events. This is the default amount of events to - * package into a POST. All GET requests will still emit one at a time. + * Sends POST requests in groups of 10 events. + * All GET requests will still emit one at a time. */ - DefaultGroup(10), + SmallGroup(10), /** - * Sends POST requests in groups of 25 events. Useful for situations where many events - * need to be sent. All GET requests will still emit one at a time. + * Sends POST requests in groups of 25 events. + * Useful for situations where many events need to be sent. + * All GET requests will still emit one at a time. */ - HeavyGroup(25); + LargeGroup(25); + + companion object { + fun fromString(string: String): BufferOption? { + return when (string) { + "Single" -> Single + "SmallGroup" -> SmallGroup + "DefaultGroup" -> SmallGroup + "LargeGroup" -> LargeGroup + "HeavyGroup" -> LargeGroup + else -> null + } + } + } } From 701086e51c0bcd6cab753ab1d22eedd74faeaf8e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Matu=CC=81s=CC=8C=20Tomlein?= Date: Thu, 30 Nov 2023 14:07:47 +0100 Subject: [PATCH 03/21] Make network requests serially in network connection (close #646) --- .../snowplowtrackerdemojava/Demo.java | 1 - .../snowplowdemokotlin/Demo.kt | 1 - .../snowplow/tracker/EmitterTest.kt | 73 ++++++++++++++++-- .../snowplow/tracker/MockNetworkConnection.kt | 5 ++ .../tracker/integration/EventSendingTest.kt | 1 + .../snowplowanalytics/core/emitter/Emitter.kt | 77 +++++++++---------- .../core/emitter/EmitterControllerImpl.kt | 4 +- .../core/emitter/EmitterDefaults.kt | 3 +- .../core/tracker/ServiceProvider.kt | 2 +- .../configuration/EmitterConfiguration.kt | 2 +- 10 files changed, 113 insertions(+), 56 deletions(-) diff --git a/snowplow-demo-java/src/main/java/com/snowplowanalytics/snowplowtrackerdemojava/Demo.java b/snowplow-demo-java/src/main/java/com/snowplowanalytics/snowplowtrackerdemojava/Demo.java index 968d8d8f3..345c7d964 100644 --- a/snowplow-demo-java/src/main/java/com/snowplowanalytics/snowplowtrackerdemojava/Demo.java +++ b/snowplow-demo-java/src/main/java/com/snowplowanalytics/snowplowtrackerdemojava/Demo.java @@ -296,7 +296,6 @@ private boolean setupWithLocalConfig() { EmitterConfiguration emitterConfiguration = new EmitterConfiguration() .requestCallback(getRequestCallback()) .threadPoolSize(20) - .emitRange(500) .byteLimitPost(52000); TrackerConfiguration trackerConfiguration = new TrackerConfiguration(appId) .logLevel(LogLevel.VERBOSE) diff --git a/snowplow-demo-kotlin/src/main/java/com/snowplowanalytics/snowplowdemokotlin/Demo.kt b/snowplow-demo-kotlin/src/main/java/com/snowplowanalytics/snowplowdemokotlin/Demo.kt index 5a28d29c9..1df596488 100644 --- a/snowplow-demo-kotlin/src/main/java/com/snowplowanalytics/snowplowdemokotlin/Demo.kt +++ b/snowplow-demo-kotlin/src/main/java/com/snowplowanalytics/snowplowdemokotlin/Demo.kt @@ -262,7 +262,6 @@ class Demo : Activity(), LoggerDelegate { .requestCallback(requestCallback) .bufferOption(BufferOption.SmallGroup) .threadPoolSize(20) - .emitRange(500) .byteLimitPost(52000) val trackerConfiguration = TrackerConfiguration(appId) .logLevel(LogLevel.VERBOSE) diff --git a/snowplow-tracker/src/androidTest/java/com/snowplowanalytics/snowplow/tracker/EmitterTest.kt b/snowplow-tracker/src/androidTest/java/com/snowplowanalytics/snowplow/tracker/EmitterTest.kt index 3ab0c8c7c..e2264408a 100755 --- a/snowplow-tracker/src/androidTest/java/com/snowplowanalytics/snowplow/tracker/EmitterTest.kt +++ b/snowplow-tracker/src/androidTest/java/com/snowplowanalytics/snowplow/tracker/EmitterTest.kt @@ -127,9 +127,9 @@ class EmitterTest { @Test fun testSendLimitSet() { - val builder = { emitter: Emitter -> emitter.sendLimit = 200 } + val builder = { emitter: Emitter -> emitter.emitRange = 200 } val emitter = Emitter(context, "com.acme", builder) - Assert.assertEquals(200, emitter.sendLimit.toLong()) + Assert.assertEquals(200, emitter.emitRange.toLong()) } @Test @@ -156,7 +156,7 @@ class EmitterTest { emitter.requestSecurity = Protocol.HTTP emitter.emitterTick = 250 emitter.emptyLimit = 5 - emitter.sendLimit = 200 + emitter.emitRange = 200 emitter.byteLimitGet = 20000 emitter.byteLimitPost = 25000 emitter.eventStore = MockEventStore() @@ -198,9 +198,9 @@ class EmitterTest { emitter1.requestSecurity = Protocol.HTTP emitter1.emitterTick = 250 emitter1.emptyLimit = 5 - emitter1.sendLimit = 200 + emitter1.emitRange = 200 emitter1.byteLimitGet = 20000 - emitter1.byteLimitPost = 25000 + emitter1.byteLimitPost = 50000 emitter1.eventStore = MockEventStore() emitter1.timeUnit = TimeUnit.MILLISECONDS emitter1.customPostPath = "com.acme.company/tpx" @@ -452,14 +452,71 @@ class EmitterTest { emitter.flush() } + @Test + fun testNumberOfRequestsMatchesEmitRangeAndOversize() { + val networkConnection = MockNetworkConnection(HttpMethod.POST, 200) + val emitter = getEmitter(networkConnection, BufferOption.Single) + emitter.emitRange = 20 + + emitter.pauseEmit() + for (payload in generatePayloads(20)) { + emitter.add(payload) + } + Thread.sleep(500) + Assert.assertEquals(20, emitter.eventStore!!.size()) + emitter.resumeEmit() + Thread.sleep(500) + + // made a single request + Assert.assertEquals(1, networkConnection.sendingCount()) + Assert.assertEquals(1, networkConnection.previousResults.first().size) + + networkConnection.clear() + + emitter.pauseEmit() + for (payload in generatePayloads(40)) { + emitter.add(payload) + } + Thread.sleep(500) + Assert.assertEquals(40, emitter.eventStore!!.size()) + emitter.resumeEmit() + + Thread.sleep(500) + + // made two requests one after the other + Assert.assertEquals(2, networkConnection.sendingCount()) + Assert.assertEquals(1, networkConnection.previousResults.map { it.size }.max()) + + networkConnection.clear() + + // test with oversize requests + emitter.byteLimitPost = 5 + + emitter.pauseEmit() + for (payload in generatePayloads(2)) { + emitter.add(payload) + } + Thread.sleep(500) + Assert.assertEquals(2, emitter.eventStore!!.size()) + emitter.resumeEmit() + + Thread.sleep(500) + + // made two requests at once + Assert.assertEquals(1, networkConnection.sendingCount()) + Assert.assertEquals(2, networkConnection.previousResults.first().size) + + emitter.flush() + } + // Emitter Builder - private fun getEmitter(networkConnection: NetworkConnection?, option: BufferOption?): Emitter { + private fun getEmitter(networkConnection: NetworkConnection, option: BufferOption): Emitter { val builder = { emitter: Emitter -> emitter.networkConnection = networkConnection - emitter.bufferOption = option!! + emitter.bufferOption = option emitter.emitterTick = 0 emitter.emptyLimit = 0 - emitter.sendLimit = 200 + emitter.emitRange = 200 emitter.byteLimitGet = 20000 emitter.byteLimitPost = 25000 emitter.eventStore = MockEventStore() diff --git a/snowplow-tracker/src/androidTest/java/com/snowplowanalytics/snowplow/tracker/MockNetworkConnection.kt b/snowplow-tracker/src/androidTest/java/com/snowplowanalytics/snowplow/tracker/MockNetworkConnection.kt index f29cc26ba..5f2a41665 100644 --- a/snowplow-tracker/src/androidTest/java/com/snowplowanalytics/snowplow/tracker/MockNetworkConnection.kt +++ b/snowplow-tracker/src/androidTest/java/com/snowplowanalytics/snowplow/tracker/MockNetworkConnection.kt @@ -59,4 +59,9 @@ class MockNetworkConnection(override var httpMethod: HttpMethod, var statusCode: fun countRequests(): Int { return allRequests.size } + + fun clear() { + previousRequests.clear() + previousResults.clear() + } } diff --git a/snowplow-tracker/src/androidTest/java/com/snowplowanalytics/snowplow/tracker/integration/EventSendingTest.kt b/snowplow-tracker/src/androidTest/java/com/snowplowanalytics/snowplow/tracker/integration/EventSendingTest.kt index cfe366d6f..09e4a138d 100644 --- a/snowplow-tracker/src/androidTest/java/com/snowplowanalytics/snowplow/tracker/integration/EventSendingTest.kt +++ b/snowplow-tracker/src/androidTest/java/com/snowplowanalytics/snowplow/tracker/integration/EventSendingTest.kt @@ -202,6 +202,7 @@ class EventSendingTest { emitter.requestSecurity = Protocol.HTTP emitter.emitterTick = 0 emitter.emptyLimit = 0 + emitter.emitRange = 1 } val emitter = Emitter(InstrumentationRegistry.getInstrumentation().targetContext, uri, builder) val subject = Subject(InstrumentationRegistry.getInstrumentation().targetContext, null) diff --git a/snowplow-tracker/src/main/java/com/snowplowanalytics/core/emitter/Emitter.kt b/snowplow-tracker/src/main/java/com/snowplowanalytics/core/emitter/Emitter.kt index b847b4152..b2264e0c7 100755 --- a/snowplow-tracker/src/main/java/com/snowplowanalytics/core/emitter/Emitter.kt +++ b/snowplow-tracker/src/main/java/com/snowplowanalytics/core/emitter/Emitter.kt @@ -117,7 +117,7 @@ class Emitter(context: Context, collectorUri: String, builder: ((Emitter) -> Uni /** * The maximum amount of events to grab for an emit attempt. */ - var sendLimit: Int = EmitterDefaults.sendLimit + var emitRange: Int = EmitterDefaults.emitRange /** * The GET byte limit @@ -556,7 +556,7 @@ class Emitter(context: Context, collectorUri: String, builder: ((Emitter) -> Uni } emptyCount = 0 - val events = eventStore.getEmittableEvents(sendLimit) + val events = eventStore.getEmittableEvents(emitRange) val requests = buildRequests(events, networkConnection.httpMethod) val results = networkConnection.sendRequests(requests) @@ -639,47 +639,44 @@ class Emitter(context: Context, collectorUri: String, builder: ((Emitter) -> Uni } } } else { - var i = 0 - while (i < events.size) { - var reqEventIds: MutableList = ArrayList() - var postPayloadMaps: MutableList = ArrayList() - - var j = i - while (j < i + bufferOption.code && j < events.size) { - val event = events[j] - val payload = event?.payload - val eventId = event?.eventId - if (payload != null && eventId != null) { - addSendingTimeToPayload(payload, sendingTime) - if (isOversize(payload, httpMethod)) { - val request = Request(payload, eventId, true) - requests.add(request) - } else if (isOversize(payload, postPayloadMaps, httpMethod)) { - val request = Request(postPayloadMaps, reqEventIds) - requests.add(request) - - // Clear collections and build a new POST - postPayloadMaps = ArrayList() - reqEventIds = ArrayList() - - // Build and store the request - postPayloadMaps.add(payload) - reqEventIds.add(eventId) - } else { - postPayloadMaps.add(payload) - reqEventIds.add(eventId) - } - j++ - } - - } + var eventIds: MutableList = ArrayList() + var eventPayloads: MutableList = ArrayList() - // Check if all payloads have been processed - if (postPayloadMaps.isNotEmpty()) { - val request = Request(postPayloadMaps, reqEventIds) + for (event in events) { + if (event == null) { continue } + val payload = event.payload + val eventId = event.eventId + addSendingTimeToPayload(payload, sendingTime) + + // Oversize event -> separate requests + if (isOversize(payload, httpMethod)) { + val request = Request(payload, eventId, true) requests.add(request) } - i += bufferOption.code + // Events up to this one are oversize -> create request for them + else if (isOversize(payload, eventPayloads, httpMethod)) { + val request = Request(eventPayloads, eventIds) + requests.add(request) + + // Clear collections and build a new POST + eventPayloads = ArrayList() + eventIds = ArrayList() + + // Build and store the request + eventPayloads.add(payload) + eventIds.add(eventId) + } + // Add to the list of events for the request + else { + eventPayloads.add(payload) + eventIds.add(eventId) + } + } + + // Check if there are any remaining events not in a request + if (eventPayloads.isNotEmpty()) { + val request = Request(eventPayloads, eventIds) + requests.add(request) } } return requests diff --git a/snowplow-tracker/src/main/java/com/snowplowanalytics/core/emitter/EmitterControllerImpl.kt b/snowplow-tracker/src/main/java/com/snowplowanalytics/core/emitter/EmitterControllerImpl.kt index 30c8312ff..e86025a53 100644 --- a/snowplow-tracker/src/main/java/com/snowplowanalytics/core/emitter/EmitterControllerImpl.kt +++ b/snowplow-tracker/src/main/java/com/snowplowanalytics/core/emitter/EmitterControllerImpl.kt @@ -40,10 +40,10 @@ class EmitterControllerImpl(serviceProvider: ServiceProviderInterface) : } override var emitRange: Int - get() = emitter.sendLimit + get() = emitter.emitRange set(emitRange) { dirtyConfig.emitRange = emitRange - emitter.sendLimit = emitRange + emitter.emitRange = emitRange } override val threadPoolSize: Int diff --git a/snowplow-tracker/src/main/java/com/snowplowanalytics/core/emitter/EmitterDefaults.kt b/snowplow-tracker/src/main/java/com/snowplowanalytics/core/emitter/EmitterDefaults.kt index a31ca5ed4..5eec3de99 100644 --- a/snowplow-tracker/src/main/java/com/snowplowanalytics/core/emitter/EmitterDefaults.kt +++ b/snowplow-tracker/src/main/java/com/snowplowanalytics/core/emitter/EmitterDefaults.kt @@ -24,9 +24,8 @@ object EmitterDefaults { var bufferOption = BufferOption.Single var httpProtocol = Protocol.HTTPS var tlsVersions: EnumSet = EnumSet.of(TLSVersion.TLSv1_2) - var emitRange: Int = 150 + var emitRange: Int = BufferOption.LargeGroup.code var emitterTick = 5 - var sendLimit = 250 var emptyLimit = 5 var byteLimitGet: Long = 40000 var byteLimitPost: Long = 40000 diff --git a/snowplow-tracker/src/main/java/com/snowplowanalytics/core/tracker/ServiceProvider.kt b/snowplow-tracker/src/main/java/com/snowplowanalytics/core/tracker/ServiceProvider.kt index 00b5a610c..6336948d7 100644 --- a/snowplow-tracker/src/main/java/com/snowplowanalytics/core/tracker/ServiceProvider.kt +++ b/snowplow-tracker/src/main/java/com/snowplowanalytics/core/tracker/ServiceProvider.kt @@ -234,7 +234,7 @@ class ServiceProvider( emitter.client = networkConfiguration.okHttpClient emitter.cookieJar = networkConfiguration.okHttpCookieJar emitter.emitTimeout = networkConfiguration.timeout - emitter.sendLimit = emitterConfiguration.emitRange + emitter.emitRange = emitterConfiguration.emitRange emitter.bufferOption = emitterConfiguration.bufferOption emitter.eventStore = emitterConfiguration.eventStore emitter.byteLimitPost = emitterConfiguration.byteLimitPost diff --git a/snowplow-tracker/src/main/java/com/snowplowanalytics/snowplow/configuration/EmitterConfiguration.kt b/snowplow-tracker/src/main/java/com/snowplowanalytics/snowplow/configuration/EmitterConfiguration.kt index 48a07f872..8fba66395 100644 --- a/snowplow-tracker/src/main/java/com/snowplowanalytics/snowplow/configuration/EmitterConfiguration.kt +++ b/snowplow-tracker/src/main/java/com/snowplowanalytics/snowplow/configuration/EmitterConfiguration.kt @@ -25,7 +25,7 @@ import org.json.JSONObject * Default values: * - bufferOption: [BufferOption.Single] * - serverAnonymisation: false - * - emitRange: 150 - maximum number of events to process at a time + * - emitRange: 25 - maximum number of events to process at a time * - threadPoolSize: 15 * - byteLimitGet: 40000 bytes * - byteLimitPost: 40000 bytes From dd9f1afc84a6b5f83dc9b8894be363f9d1fa28c5 Mon Sep 17 00:00:00 2001 From: Matus Tomlein Date: Fri, 12 Jan 2024 11:00:47 +0100 Subject: [PATCH 04/21] Add screen engagement tracking of time spent and list items scrolled on a screen (close #654) PR #656 --- .../snowplowdemocompose/data/Tracking.kt | 14 +- .../ui/SchemaDetailScreen.kt | 3 +- .../ui/SchemaListScreen.kt | 8 +- .../internal/tracker/StateManagerTest.kt | 7 + .../ScreenSummaryStateMachineTest.kt | 172 ++++++++++++++++++ .../snowplow/util/EventSink.kt | 23 +++ .../snowplow/util/TimeTraveler.kt | 4 + .../core/constants/TrackerConstants.kt | 8 + .../snowplowanalytics/core/event/ScreenEnd.kt | 30 +++ .../{tracker => screenviews}/ScreenState.kt | 2 +- .../ScreenStateMachine.kt | 9 +- .../core/screenviews/ScreenSummaryState.kt | 106 +++++++++++ .../screenviews/ScreenSummaryStateMachine.kt | 104 +++++++++++ .../core/statemachine/DeepLinkStateMachine.kt | 7 + .../statemachine/LifecycleStateMachine.kt | 7 + .../core/statemachine/PluginStateMachine.kt | 7 + .../statemachine/StateMachineInterface.kt | 2 + .../core/statemachine/StateManager.kt | 30 +++ .../core/tracker/ServiceProvider.kt | 1 + .../snowplowanalytics/core/tracker/Tracker.kt | 57 ++++-- .../tracker/TrackerConfigurationInterface.kt | 6 + .../core/tracker/TrackerControllerImpl.kt | 7 + .../core/tracker/TrackerDefaults.kt | 1 + .../configuration/TrackerConfiguration.kt | 17 ++ .../snowplow/event/ListItemView.kt | 40 ++++ .../snowplow/event/ScrollChanged.kt | 52 ++++++ 26 files changed, 702 insertions(+), 22 deletions(-) create mode 100644 snowplow-tracker/src/androidTest/java/com/snowplowanalytics/snowplow/screenviews/ScreenSummaryStateMachineTest.kt create mode 100644 snowplow-tracker/src/androidTest/java/com/snowplowanalytics/snowplow/util/EventSink.kt create mode 100644 snowplow-tracker/src/main/java/com/snowplowanalytics/core/event/ScreenEnd.kt rename snowplow-tracker/src/main/java/com/snowplowanalytics/core/{tracker => screenviews}/ScreenState.kt (98%) rename snowplow-tracker/src/main/java/com/snowplowanalytics/core/{tracker => screenviews}/ScreenStateMachine.kt (94%) create mode 100644 snowplow-tracker/src/main/java/com/snowplowanalytics/core/screenviews/ScreenSummaryState.kt create mode 100644 snowplow-tracker/src/main/java/com/snowplowanalytics/core/screenviews/ScreenSummaryStateMachine.kt create mode 100644 snowplow-tracker/src/main/java/com/snowplowanalytics/snowplow/event/ListItemView.kt create mode 100644 snowplow-tracker/src/main/java/com/snowplowanalytics/snowplow/event/ScrollChanged.kt diff --git a/snowplow-demo-compose/src/main/java/com/snowplowanalytics/snowplowdemocompose/data/Tracking.kt b/snowplow-demo-compose/src/main/java/com/snowplowanalytics/snowplowdemocompose/data/Tracking.kt index 0d77c32b0..e155c5ac8 100644 --- a/snowplow-demo-compose/src/main/java/com/snowplowanalytics/snowplowdemocompose/data/Tracking.kt +++ b/snowplow-demo-compose/src/main/java/com/snowplowanalytics/snowplowdemocompose/data/Tracking.kt @@ -10,6 +10,7 @@ import com.snowplowanalytics.snowplow.configuration.NetworkConfiguration import com.snowplowanalytics.snowplow.configuration.TrackerConfiguration import com.snowplowanalytics.snowplow.controller.TrackerController import com.snowplowanalytics.snowplow.emitter.BufferOption +import com.snowplowanalytics.snowplow.event.ListItemView import com.snowplowanalytics.snowplow.event.ScreenView import com.snowplowanalytics.snowplow.network.HttpMethod import com.snowplowanalytics.snowplow.payload.SelfDescribingJson @@ -20,7 +21,10 @@ object Tracking { fun setup(namespace: String) : TrackerController { // Replace this collector endpoint with your own val networkConfig = NetworkConfiguration("https://23a6-82-26-43-253.ngrok.io", HttpMethod.POST) - val trackerConfig = TrackerConfiguration("appID").logLevel(LogLevel.DEBUG) + val trackerConfig = TrackerConfiguration("appID") + .logLevel(LogLevel.DEBUG) + .screenViewAutotracking(false) + .lifecycleAutotracking(true) val emitterConfig = EmitterConfiguration().bufferOption(BufferOption.Single) return Snowplow.createTracker( @@ -48,4 +52,12 @@ object Tracking { Snowplow.defaultTracker?.track(event) }) } + + @Composable + fun TrackListItemView(index: Int, itemsCount: Int?) { + LaunchedEffect(Unit, block = { + val event = ListItemView(index, itemsCount) + Snowplow.defaultTracker?.track(event) + }) + } } diff --git a/snowplow-demo-compose/src/main/java/com/snowplowanalytics/snowplowdemocompose/ui/SchemaDetailScreen.kt b/snowplow-demo-compose/src/main/java/com/snowplowanalytics/snowplowdemocompose/ui/SchemaDetailScreen.kt index 75b00c3ef..103af2810 100644 --- a/snowplow-demo-compose/src/main/java/com/snowplowanalytics/snowplowdemocompose/ui/SchemaDetailScreen.kt +++ b/snowplow-demo-compose/src/main/java/com/snowplowanalytics/snowplowdemocompose/ui/SchemaDetailScreen.kt @@ -36,8 +36,7 @@ fun SchemaDetailScreen( "iglu:com.snowplowanalytics.iglu/anything-a/jsonschema/1-0-0", hashMapOf("name" to schemaParts.name, "vendor" to schemaParts.vendor) ) - Tracking.ManuallyTrackScreenView("schema_detail", entities = listOf(entity)) - + Scaffold( topBar = { TopAppBar( diff --git a/snowplow-demo-compose/src/main/java/com/snowplowanalytics/snowplowdemocompose/ui/SchemaListScreen.kt b/snowplow-demo-compose/src/main/java/com/snowplowanalytics/snowplowdemocompose/ui/SchemaListScreen.kt index 77fd61d85..e0f96b2f1 100644 --- a/snowplow-demo-compose/src/main/java/com/snowplowanalytics/snowplowdemocompose/ui/SchemaListScreen.kt +++ b/snowplow-demo-compose/src/main/java/com/snowplowanalytics/snowplowdemocompose/ui/SchemaListScreen.kt @@ -4,6 +4,7 @@ import androidx.compose.foundation.clickable import androidx.compose.foundation.layout.* import androidx.compose.foundation.lazy.LazyColumn import androidx.compose.foundation.lazy.items +import androidx.compose.foundation.lazy.itemsIndexed import androidx.compose.material.* import androidx.compose.material.icons.Icons import androidx.compose.material.icons.filled.ArrowForward @@ -16,6 +17,7 @@ import androidx.compose.ui.text.style.TextOverflow import androidx.compose.ui.unit.dp import com.snowplowanalytics.snowplowdemocompose.R import com.snowplowanalytics.snowplowdemocompose.data.SchemaUrlParts +import com.snowplowanalytics.snowplowdemocompose.data.Tracking @Composable fun SchemaListScreen( @@ -38,7 +40,11 @@ fun SchemaListScreen( if (vm.errorMessage.isEmpty()) { Column(modifier = Modifier.padding(contentPadding)) { LazyColumn(modifier = Modifier.fillMaxHeight()) { - items(vm.schemaPartsList) { schema -> + itemsIndexed(vm.schemaPartsList) { index, schema -> + Tracking.TrackListItemView( + index = index, + itemsCount = vm.schemaPartsList.size + ) SchemaCard(schema = schema, onClick = onSchemaClicked) } } diff --git a/snowplow-tracker/src/androidTest/java/com/snowplowanalytics/snowplow/internal/tracker/StateManagerTest.kt b/snowplow-tracker/src/androidTest/java/com/snowplowanalytics/snowplow/internal/tracker/StateManagerTest.kt index c159d0459..43e1fb49c 100644 --- a/snowplow-tracker/src/androidTest/java/com/snowplowanalytics/snowplow/internal/tracker/StateManagerTest.kt +++ b/snowplow-tracker/src/androidTest/java/com/snowplowanalytics/snowplow/internal/tracker/StateManagerTest.kt @@ -454,6 +454,9 @@ internal open class MockStateMachine( ) : StateMachineInterface { var afterTrackEvents: MutableList = ArrayList() + override val subscribedEventSchemasForEventsBefore: List + get() = emptyList() + override val subscribedEventSchemasForTransitions: List get() = LinkedList(listOf("inc", "dec")) @@ -469,6 +472,10 @@ internal open class MockStateMachine( override val subscribedEventSchemasForFiltering: List get() = Collections.singletonList("s1") + override fun eventsBefore(event: Event): List? { + return null + } + override fun transition(event: Event, state: State?): State? { val e = event as SelfDescribing var currentState = state as MockState? diff --git a/snowplow-tracker/src/androidTest/java/com/snowplowanalytics/snowplow/screenviews/ScreenSummaryStateMachineTest.kt b/snowplow-tracker/src/androidTest/java/com/snowplowanalytics/snowplow/screenviews/ScreenSummaryStateMachineTest.kt new file mode 100644 index 000000000..3eaddc8fe --- /dev/null +++ b/snowplow-tracker/src/androidTest/java/com/snowplowanalytics/snowplow/screenviews/ScreenSummaryStateMachineTest.kt @@ -0,0 +1,172 @@ +/* + * Copyright (c) 2015-2023 Snowplow Analytics Ltd. All rights reserved. + * + * This program is licensed to you under the Apache License Version 2.0, + * and you may not use this file except in compliance with the Apache License Version 2.0. + * You may obtain a copy of the Apache License Version 2.0 at http://www.apache.org/licenses/LICENSE-2.0. + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the Apache License Version 2.0 is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the Apache License Version 2.0 for the specific language governing permissions and limitations there under. + */ +package com.snowplowanalytics.snowplow.tracker + +import android.content.Context +import androidx.test.ext.junit.runners.AndroidJUnit4 +import androidx.test.platform.app.InstrumentationRegistry +import com.snowplowanalytics.core.constants.TrackerConstants +import com.snowplowanalytics.core.screenviews.ScreenSummaryState +import com.snowplowanalytics.snowplow.Snowplow +import com.snowplowanalytics.snowplow.Snowplow.removeAllTrackers +import com.snowplowanalytics.snowplow.configuration.Configuration +import com.snowplowanalytics.snowplow.configuration.NetworkConfiguration +import com.snowplowanalytics.snowplow.configuration.PluginConfiguration +import com.snowplowanalytics.snowplow.controller.TrackerController +import com.snowplowanalytics.snowplow.event.* +import com.snowplowanalytics.snowplow.network.HttpMethod +import com.snowplowanalytics.snowplow.payload.SelfDescribingJson +import com.snowplowanalytics.snowplow.util.EventSink +import com.snowplowanalytics.snowplow.util.TimeTraveler +import org.junit.After +import org.junit.Assert +import org.junit.Before +import org.junit.Test +import org.junit.runner.RunWith +import java.util.* +import kotlin.time.DurationUnit +import kotlin.time.toDuration + +@RunWith(AndroidJUnit4::class) +class ScreenSummaryStateMachineTest { + + var timeTraveler = TimeTraveler() + + @Before + fun setUp() { + ScreenSummaryState.dateGenerator = { timeTraveler.generateTimestamp() } + } + + @After + fun tearDown() { + removeAllTrackers() + } + + // --- TESTS + + @Test + fun tracksTransitionToBackgroundAndForeground() { + val eventSink = EventSink() + val tracker = createTracker(listOf(eventSink)) + + tracker.track(ScreenView(name = "Screen 1")) + timeTraveler.travelBy(10.toDuration(DurationUnit.SECONDS)) + tracker.track(Background()) + Thread.sleep(200) + + timeTraveler.travelBy(5.toDuration(DurationUnit.SECONDS)) + tracker.track(Foreground()) + Thread.sleep(200) + + val events = eventSink.trackedEvents + Assert.assertEquals(3, events.size) + + val backgroundSummary = getScreenSummary(events.find { it.schema == Background.schema }) + Assert.assertEquals(10.0, backgroundSummary?.get("foreground_sec")) + Assert.assertEquals(0.0, backgroundSummary?.get("background_sec")) + + val foregroundSummary = getScreenSummary(events.find { it.schema == Foreground.schema }) + Assert.assertEquals(10.0, foregroundSummary?.get("foreground_sec")) + Assert.assertEquals(5.0, foregroundSummary?.get("background_sec")) + } + + @Test + fun tracksScreenEndEventWithScreenSummary() { + val eventSink = EventSink() + val tracker = createTracker(listOf(eventSink)) + + tracker.track(ScreenView(name = "Screen 1")) + Thread.sleep(200) + timeTraveler.travelBy(10.toDuration(DurationUnit.SECONDS)) + tracker.track(ScreenView(name = "Screen 2")) + Thread.sleep(200) + + val events = eventSink.trackedEvents + Assert.assertEquals(3, events.size) + + val screenSummary = getScreenSummary(events.find { it.schema == TrackerConstants.SCHEMA_SCREEN_END }) + Assert.assertEquals(10.0, screenSummary?.get("foreground_sec")) + Assert.assertEquals(0.0, screenSummary?.get("background_sec")) + } + + @Test + fun updatesListMetrics() { + val eventSink = EventSink() + val tracker = createTracker(listOf(eventSink)) + + tracker.track(ScreenView(name = "Screen 1")) + Thread.sleep(200) + tracker.track(ListItemView(index = 1, itemsCount = 10)) + Thread.sleep(200) + tracker.track(ListItemView(index = 3, itemsCount = 10)) + Thread.sleep(200) + tracker.track(ListItemView(index = 2, itemsCount = 10)) + Thread.sleep(200) + tracker.track(ScreenView(name = "Screen 2")) + Thread.sleep(200) + + val events = eventSink.trackedEvents + Assert.assertEquals(3, events.size) + + val screenSummary = getScreenSummary(events.find { it.schema == TrackerConstants.SCHEMA_SCREEN_END }) + Assert.assertEquals(3, screenSummary?.get("last_item_index")) + Assert.assertEquals(10, screenSummary?.get("items_count")) + } + + @Test + fun updatesScrollMetrics() { + val eventSink = EventSink() + val tracker = createTracker(listOf(eventSink)) + + tracker.track(ScreenView(name = "Screen 1")) + Thread.sleep(200) + tracker.track(ScrollChanged(yOffset = 10, viewHeight = 20, contentHeight = 100)) + Thread.sleep(200) + tracker.track(ScrollChanged(xOffset = 15, yOffset = 30, viewWidth = 15, viewHeight = 20, contentWidth = 150, contentHeight = 100)) + Thread.sleep(200) + tracker.track(ScrollChanged(yOffset = 20, viewHeight = 20, contentHeight = 100)) + Thread.sleep(200) + tracker.track(ScreenView(name = "Screen 2")) + Thread.sleep(200) + + val events = eventSink.trackedEvents + Assert.assertEquals(3, events.size) + + val screenSummary = getScreenSummary(events.find { it.schema == TrackerConstants.SCHEMA_SCREEN_END }) + Assert.assertEquals(10, screenSummary?.get("min_y_offset")) + Assert.assertEquals(15, screenSummary?.get("min_x_offset")) + Assert.assertEquals(50, screenSummary?.get("max_y_offset")) + Assert.assertEquals(30, screenSummary?.get("max_x_offset")) + Assert.assertEquals(150, screenSummary?.get("content_width")) + Assert.assertEquals(100, screenSummary?.get("content_height")) + } + + // --- PRIVATE + private val context: Context + get() = InstrumentationRegistry.getInstrumentation().targetContext + + private fun getScreenSummary(event: InspectableEvent?): Map? { + val entity = event?.entities?.find { it.map["schema"] == TrackerConstants.SCHEMA_SCREEN_SUMMARY } + return entity?.map?.get("data") as? Map + } + + private fun createTracker(configurations: List): TrackerController { + val networkConfig = NetworkConfiguration(MockNetworkConnection(HttpMethod.POST, 200)) + return Snowplow.createTracker( + context, + namespace = "ns" + Math.random().toString(), + network = networkConfig, + configurations = configurations.toTypedArray() + ) + } +} diff --git a/snowplow-tracker/src/androidTest/java/com/snowplowanalytics/snowplow/util/EventSink.kt b/snowplow-tracker/src/androidTest/java/com/snowplowanalytics/snowplow/util/EventSink.kt new file mode 100644 index 000000000..cc01536d3 --- /dev/null +++ b/snowplow-tracker/src/androidTest/java/com/snowplowanalytics/snowplow/util/EventSink.kt @@ -0,0 +1,23 @@ +package com.snowplowanalytics.snowplow.util + +import com.snowplowanalytics.snowplow.configuration.* +import com.snowplowanalytics.snowplow.tracker.InspectableEvent + +class EventSink : Configuration, PluginIdentifiable, PluginFilterCallable { + + var trackedEvents = mutableListOf() + + override val identifier: String + get() = "EventSink" + + override val filterConfiguration: PluginFilterConfiguration? + get() = PluginFilterConfiguration { event -> + trackedEvents.add(event) + false + } + + override fun copy(): Configuration { + TODO("Not yet implemented") + } + +} diff --git a/snowplow-tracker/src/androidTest/java/com/snowplowanalytics/snowplow/util/TimeTraveler.kt b/snowplow-tracker/src/androidTest/java/com/snowplowanalytics/snowplow/util/TimeTraveler.kt index d774fa789..31edd6850 100644 --- a/snowplow-tracker/src/androidTest/java/com/snowplowanalytics/snowplow/util/TimeTraveler.kt +++ b/snowplow-tracker/src/androidTest/java/com/snowplowanalytics/snowplow/util/TimeTraveler.kt @@ -26,4 +26,8 @@ class TimeTraveler { fun generateDate(): Date { return date } + + fun generateTimestamp(): Long { + return date.time + } } diff --git a/snowplow-tracker/src/main/java/com/snowplowanalytics/core/constants/TrackerConstants.kt b/snowplow-tracker/src/main/java/com/snowplowanalytics/core/constants/TrackerConstants.kt index b05d4107d..e0b9a4281 100755 --- a/snowplow-tracker/src/main/java/com/snowplowanalytics/core/constants/TrackerConstants.kt +++ b/snowplow-tracker/src/main/java/com/snowplowanalytics/core/constants/TrackerConstants.kt @@ -65,6 +65,14 @@ object TrackerConstants { "iglu:com.snowplowanalytics.snowplow.ecommerce/user/jsonschema/1-0-0" const val SCHEMA_ECOMMERCE_PAGE = "iglu:com.snowplowanalytics.snowplow.ecommerce/page/jsonschema/1-0-0" + const val SCHEMA_SCREEN_END = + "iglu:com.snowplowanalytics.mobile/screen_end/jsonschema/1-0-0" + const val SCHEMA_SCREEN_SUMMARY = + "iglu:com.snowplowanalytics.mobile/screen_summary/jsonschema/1-0-0" + const val SCHEMA_LIST_ITEM_VIEW = + "iglu:com.snowplowanalytics.mobile/list_item_view/jsonschema/1-0-0" + const val SCHEMA_SCROLL_CHANGED = + "iglu:com.snowplowanalytics.mobile/scroll_changed/jsonschema/1-0-0" const val POST_CONTENT_TYPE = "application/json; charset=utf-8" const val EVENT_PAGE_VIEW = "pv" const val EVENT_STRUCTURED = "se" diff --git a/snowplow-tracker/src/main/java/com/snowplowanalytics/core/event/ScreenEnd.kt b/snowplow-tracker/src/main/java/com/snowplowanalytics/core/event/ScreenEnd.kt new file mode 100644 index 000000000..a6d22a3a5 --- /dev/null +++ b/snowplow-tracker/src/main/java/com/snowplowanalytics/core/event/ScreenEnd.kt @@ -0,0 +1,30 @@ +/* + * Copyright (c) 2015-2023 Snowplow Analytics Ltd. All rights reserved. + * + * This program is licensed to you under the Apache License Version 2.0, + * and you may not use this file except in compliance with the Apache License Version 2.0. + * You may obtain a copy of the Apache License Version 2.0 at http://www.apache.org/licenses/LICENSE-2.0. + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the Apache License Version 2.0 is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the Apache License Version 2.0 for the specific language governing permissions and limitations there under. + */ +package com.snowplowanalytics.snowplow.event + +import com.snowplowanalytics.core.constants.TrackerConstants +import java.util.* + +class ScreenEnd : AbstractSelfDescribing() { + + // Tracker methods + override val dataPayload: Map + get() { + val payload = HashMap() + return payload + } + + override val schema: String + get() = TrackerConstants.SCHEMA_SCREEN_END + +} diff --git a/snowplow-tracker/src/main/java/com/snowplowanalytics/core/tracker/ScreenState.kt b/snowplow-tracker/src/main/java/com/snowplowanalytics/core/screenviews/ScreenState.kt similarity index 98% rename from snowplow-tracker/src/main/java/com/snowplowanalytics/core/tracker/ScreenState.kt rename to snowplow-tracker/src/main/java/com/snowplowanalytics/core/screenviews/ScreenState.kt index 09071c515..f4520e110 100644 --- a/snowplow-tracker/src/main/java/com/snowplowanalytics/core/tracker/ScreenState.kt +++ b/snowplow-tracker/src/main/java/com/snowplowanalytics/core/screenviews/ScreenState.kt @@ -10,7 +10,7 @@ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the Apache License Version 2.0 for the specific language governing permissions and limitations there under. */ -package com.snowplowanalytics.core.tracker +package com.snowplowanalytics.core.screenviews import androidx.annotation.RestrictTo import com.snowplowanalytics.core.constants.Parameters diff --git a/snowplow-tracker/src/main/java/com/snowplowanalytics/core/tracker/ScreenStateMachine.kt b/snowplow-tracker/src/main/java/com/snowplowanalytics/core/screenviews/ScreenStateMachine.kt similarity index 94% rename from snowplow-tracker/src/main/java/com/snowplowanalytics/core/tracker/ScreenStateMachine.kt rename to snowplow-tracker/src/main/java/com/snowplowanalytics/core/screenviews/ScreenStateMachine.kt index 2e3fa5436..f353da21f 100644 --- a/snowplow-tracker/src/main/java/com/snowplowanalytics/core/tracker/ScreenStateMachine.kt +++ b/snowplow-tracker/src/main/java/com/snowplowanalytics/core/screenviews/ScreenStateMachine.kt @@ -10,7 +10,7 @@ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the Apache License Version 2.0 for the specific language governing permissions and limitations there under. */ -package com.snowplowanalytics.core.tracker +package com.snowplowanalytics.core.screenviews import com.snowplowanalytics.core.constants.Parameters import com.snowplowanalytics.core.constants.TrackerConstants @@ -50,6 +50,9 @@ class ScreenStateMachine : StateMachineInterface { override val subscribedEventSchemasForFiltering: List get() = emptyList() + override val subscribedEventSchemasForEventsBefore: List + get() = emptyList() + override fun transition(event: Event, state: State?): State? { val screenView = event as? ScreenView val screenState: ScreenState? = if (state != null) { @@ -108,6 +111,10 @@ class ScreenStateMachine : StateMachineInterface { return null } + override fun eventsBefore(event: Event): List? { + return null + } + companion object { val ID: String get() = "ScreenContext" diff --git a/snowplow-tracker/src/main/java/com/snowplowanalytics/core/screenviews/ScreenSummaryState.kt b/snowplow-tracker/src/main/java/com/snowplowanalytics/core/screenviews/ScreenSummaryState.kt new file mode 100644 index 000000000..ca89297cd --- /dev/null +++ b/snowplow-tracker/src/main/java/com/snowplowanalytics/core/screenviews/ScreenSummaryState.kt @@ -0,0 +1,106 @@ +/* + * Copyright (c) 2015-2023 Snowplow Analytics Ltd. All rights reserved. + * + * This program is licensed to you under the Apache License Version 2.0, + * and you may not use this file except in compliance with the Apache License Version 2.0. + * You may obtain a copy of the Apache License Version 2.0 at http://www.apache.org/licenses/LICENSE-2.0. + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the Apache License Version 2.0 is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the Apache License Version 2.0 for the specific language governing permissions and limitations there under. + */ +package com.snowplowanalytics.core.screenviews + +import androidx.annotation.RestrictTo +import com.snowplowanalytics.core.statemachine.State +import com.snowplowanalytics.snowplow.event.ListItemView +import com.snowplowanalytics.snowplow.event.ScrollChanged +import java.lang.Integer.max +import java.lang.Integer.min + +@RestrictTo(RestrictTo.Scope.LIBRARY) +class ScreenSummaryState : State { + private var lastUpdateTimestamp = dateGenerator() + + private var foregroundDuration: Long = 0 + private var backgroundDuration: Long = 0 + private var lastItemIndex: Int? = null + private var itemsCount: Int? = null + private var minYOffset: Int? = null + private var minXOffset: Int? = null + private var maxYOffset: Int? = null + private var maxXOffset: Int? = null + private var contentHeight: Int? = null + private var contentWidth: Int? = null + + val data: Map + get() { + val data = mutableMapOf( + "foreground_sec" to foregroundDuration / 1000.0, + "background_sec" to backgroundDuration / 1000.0 + ) + lastItemIndex?.let { data["last_item_index"] = it } + itemsCount?.let { data["items_count"] = it } + minYOffset?.let { data["min_y_offset"] = it } + minXOffset?.let { data["min_x_offset"] = it } + maxYOffset?.let { data["max_y_offset"] = it } + maxXOffset?.let { data["max_x_offset"] = it } + contentHeight?.let { data["content_height"] = it } + contentWidth?.let { data["content_width"] = it } + + return data + } + + fun updateTransitionToForeground() { + val currentTimestamp = dateGenerator() + + backgroundDuration += currentTimestamp - lastUpdateTimestamp + lastUpdateTimestamp = currentTimestamp + } + + fun updateTransitionToBackground() { + val currentTimestamp = dateGenerator() + + foregroundDuration += currentTimestamp - lastUpdateTimestamp + lastUpdateTimestamp = currentTimestamp + } + + fun updateForScreenEnd() { + val currentTimestamp = dateGenerator() + + foregroundDuration += currentTimestamp - lastUpdateTimestamp + lastUpdateTimestamp = currentTimestamp + } + + fun updateWithListItemView(event: ListItemView) { + lastItemIndex = max(event.index, lastItemIndex ?: 0) + event.itemsCount?.let { + itemsCount = max(it, itemsCount ?: 0) + } + + } + + fun updateWithScrollChanged(event: ScrollChanged) { + event.yOffset?.let { yOffset -> + var maxYOffset = yOffset + event.viewHeight?.let { maxYOffset += it } + + minYOffset = min(yOffset, minYOffset ?: yOffset) + this.maxYOffset = max(maxYOffset, this.maxYOffset ?: maxYOffset) + } + event.xOffset?.let { xOffset -> + var maxXOffset = xOffset + event.viewWidth?.let { maxXOffset += it } + + minXOffset = min(xOffset, minXOffset ?: xOffset) + this.maxXOffset = max(maxXOffset, this.maxXOffset ?: maxXOffset) + } + event.contentWidth?.let { contentWidth = max(it, contentWidth ?: 0) } + event.contentHeight?.let { contentHeight = max(it, contentHeight ?: 0) } + } + + companion object { + var dateGenerator: () -> Long = { System.currentTimeMillis() } + } +} diff --git a/snowplow-tracker/src/main/java/com/snowplowanalytics/core/screenviews/ScreenSummaryStateMachine.kt b/snowplow-tracker/src/main/java/com/snowplowanalytics/core/screenviews/ScreenSummaryStateMachine.kt new file mode 100644 index 000000000..c87b55405 --- /dev/null +++ b/snowplow-tracker/src/main/java/com/snowplowanalytics/core/screenviews/ScreenSummaryStateMachine.kt @@ -0,0 +1,104 @@ +/* + * Copyright (c) 2015-2023 Snowplow Analytics Ltd. All rights reserved. + * + * This program is licensed to you under the Apache License Version 2.0, + * and you may not use this file except in compliance with the Apache License Version 2.0. + * You may obtain a copy of the Apache License Version 2.0 at http://www.apache.org/licenses/LICENSE-2.0. + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the Apache License Version 2.0 is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the Apache License Version 2.0 for the specific language governing permissions and limitations there under. + */ +package com.snowplowanalytics.core.screenviews + +import com.snowplowanalytics.core.constants.TrackerConstants +import com.snowplowanalytics.core.statemachine.State +import com.snowplowanalytics.core.statemachine.StateMachineInterface +import com.snowplowanalytics.snowplow.event.* +import com.snowplowanalytics.snowplow.payload.SelfDescribingJson +import com.snowplowanalytics.snowplow.tracker.InspectableEvent + +class ScreenSummaryStateMachine : StateMachineInterface { + + override val identifier: String + get() = ID + + override val subscribedEventSchemasForTransitions: List + get() = listOf(TrackerConstants.SCHEMA_SCREEN_VIEW, TrackerConstants.SCHEMA_SCREEN_END, Foreground.schema, Background.schema, TrackerConstants.SCHEMA_LIST_ITEM_VIEW, TrackerConstants.SCHEMA_SCROLL_CHANGED) + + override val subscribedEventSchemasForEntitiesGeneration: List + get() = listOf(TrackerConstants.SCHEMA_SCREEN_END, Foreground.schema, Background.schema) + + override val subscribedEventSchemasForPayloadUpdating: List + get() = emptyList() + + override val subscribedEventSchemasForAfterTrackCallback: List + get() = emptyList() + + override val subscribedEventSchemasForFiltering: List + get() = listOf(TrackerConstants.SCHEMA_LIST_ITEM_VIEW, TrackerConstants.SCHEMA_SCREEN_END, TrackerConstants.SCHEMA_SCROLL_CHANGED) + + override val subscribedEventSchemasForEventsBefore: List + get() = listOf(TrackerConstants.SCHEMA_SCREEN_VIEW) + + override fun transition(event: Event, state: State?): State? { + if (event is ScreenView) { + return ScreenSummaryState() + } + val screenSummaryState = state as ScreenSummaryState? ?: return null + when (event) { + is Foreground -> { + screenSummaryState.updateTransitionToForeground() + } + is Background -> { + screenSummaryState.updateTransitionToBackground() + } + is ScreenEnd -> { + screenSummaryState.updateForScreenEnd() + } + is ListItemView -> { + screenSummaryState.updateWithListItemView(event) + } + is ScrollChanged -> { + screenSummaryState.updateWithScrollChanged(event) + } + } + return state + } + + override fun entities(event: InspectableEvent, state: State?): List? { + val screenSummaryState = state as ScreenSummaryState? ?: return null + + return listOf( + SelfDescribingJson( + TrackerConstants.SCHEMA_SCREEN_SUMMARY, + screenSummaryState.data + ) + ) + } + + override fun payloadValues(event: InspectableEvent, state: State?): Map? { + return null + } + + override fun afterTrack(event: InspectableEvent) { + } + + override fun filter(event: InspectableEvent, state: State?): Boolean { + if (event.schema == TrackerConstants.SCHEMA_SCREEN_END) { + return state != null + } + // do not track list item view and scroll changed events + return false + } + + override fun eventsBefore(event: Event): List? { + return listOf(ScreenEnd()) + } + + companion object { + val ID: String + get() = "ScreenSummaryContext" + } +} diff --git a/snowplow-tracker/src/main/java/com/snowplowanalytics/core/statemachine/DeepLinkStateMachine.kt b/snowplow-tracker/src/main/java/com/snowplowanalytics/core/statemachine/DeepLinkStateMachine.kt index cde4ce299..fc9e79853 100644 --- a/snowplow-tracker/src/main/java/com/snowplowanalytics/core/statemachine/DeepLinkStateMachine.kt +++ b/snowplow-tracker/src/main/java/com/snowplowanalytics/core/statemachine/DeepLinkStateMachine.kt @@ -51,6 +51,9 @@ class DeepLinkStateMachine : StateMachineInterface { override val subscribedEventSchemasForFiltering: List get() = emptyList() + override val subscribedEventSchemasForEventsBefore: List + get() = emptyList() + override fun transition(event: Event, state: State?): State? { // - Init (DL) DeepLinkReceived // - ReadyForOutput (DL) DeepLinkReceived @@ -95,6 +98,10 @@ class DeepLinkStateMachine : StateMachineInterface { return null } + override fun eventsBefore(event: Event): List? { + return null + } + companion object { val ID: String get() = "DeepLinkContext" diff --git a/snowplow-tracker/src/main/java/com/snowplowanalytics/core/statemachine/LifecycleStateMachine.kt b/snowplow-tracker/src/main/java/com/snowplowanalytics/core/statemachine/LifecycleStateMachine.kt index 404c4d570..bf072b0ce 100644 --- a/snowplow-tracker/src/main/java/com/snowplowanalytics/core/statemachine/LifecycleStateMachine.kt +++ b/snowplow-tracker/src/main/java/com/snowplowanalytics/core/statemachine/LifecycleStateMachine.kt @@ -48,6 +48,9 @@ class LifecycleStateMachine : StateMachineInterface { override val subscribedEventSchemasForFiltering: List get() = emptyList() + override val subscribedEventSchemasForEventsBefore: List + get() = emptyList() + override fun transition(event: Event, currentState: State?): State? { if (event is Foreground) { return LifecycleState(true, event.foregroundIndex) @@ -76,6 +79,10 @@ class LifecycleStateMachine : StateMachineInterface { return null } + override fun eventsBefore(event: Event): List? { + return null + } + companion object { val ID: String get() = "Lifecycle" diff --git a/snowplow-tracker/src/main/java/com/snowplowanalytics/core/statemachine/PluginStateMachine.kt b/snowplow-tracker/src/main/java/com/snowplowanalytics/core/statemachine/PluginStateMachine.kt index ce3de029e..e981a02e4 100644 --- a/snowplow-tracker/src/main/java/com/snowplowanalytics/core/statemachine/PluginStateMachine.kt +++ b/snowplow-tracker/src/main/java/com/snowplowanalytics/core/statemachine/PluginStateMachine.kt @@ -51,6 +51,9 @@ class PluginStateMachine( return config.schemas ?: Collections.singletonList("*") } + override val subscribedEventSchemasForEventsBefore: List + get() = emptyList() + override fun transition(event: Event, state: State?): State? { return null } @@ -70,4 +73,8 @@ class PluginStateMachine( override fun filter(event: InspectableEvent, state: State?): Boolean? { return filterConfiguration?.closure?.apply(event) } + + override fun eventsBefore(event: Event): List? { + return null + } } diff --git a/snowplow-tracker/src/main/java/com/snowplowanalytics/core/statemachine/StateMachineInterface.kt b/snowplow-tracker/src/main/java/com/snowplowanalytics/core/statemachine/StateMachineInterface.kt index f6f718f07..1a139869f 100644 --- a/snowplow-tracker/src/main/java/com/snowplowanalytics/core/statemachine/StateMachineInterface.kt +++ b/snowplow-tracker/src/main/java/com/snowplowanalytics/core/statemachine/StateMachineInterface.kt @@ -18,12 +18,14 @@ import com.snowplowanalytics.snowplow.tracker.InspectableEvent interface StateMachineInterface { val identifier: String + val subscribedEventSchemasForEventsBefore: List val subscribedEventSchemasForTransitions: List val subscribedEventSchemasForEntitiesGeneration: List val subscribedEventSchemasForPayloadUpdating: List val subscribedEventSchemasForAfterTrackCallback: List val subscribedEventSchemasForFiltering: List + fun eventsBefore(event: Event): List? fun transition(event: Event, state: State?): State? fun entities(event: InspectableEvent, state: State?): List? fun payloadValues(event: InspectableEvent, state: State?): Map? diff --git a/snowplow-tracker/src/main/java/com/snowplowanalytics/core/statemachine/StateManager.kt b/snowplow-tracker/src/main/java/com/snowplowanalytics/core/statemachine/StateManager.kt index 5cf4e76fb..83488e282 100644 --- a/snowplow-tracker/src/main/java/com/snowplowanalytics/core/statemachine/StateManager.kt +++ b/snowplow-tracker/src/main/java/com/snowplowanalytics/core/statemachine/StateManager.kt @@ -29,6 +29,7 @@ class StateManager { private val eventSchemaToPayloadUpdater = HashMap>() private val eventSchemaToAfterTrackCallback = HashMap>() private val eventSchemaToFilter = HashMap>() + private val eventSchemaToEventsBefore = HashMap>() val trackerState = TrackerState() @@ -69,6 +70,11 @@ class StateManager { stateMachine.subscribedEventSchemasForFiltering, stateMachine ) + addToSchemaRegistry( + eventSchemaToEventsBefore, + stateMachine.subscribedEventSchemasForEventsBefore, + stateMachine + ) } @Synchronized @@ -102,6 +108,11 @@ class StateManager { stateMachine.subscribedEventSchemasForFiltering, stateMachine ) + removeFromSchemaRegistry( + eventSchemaToEventsBefore, + stateMachine.subscribedEventSchemasForEventsBefore, + stateMachine + ) return true } @@ -135,6 +146,25 @@ class StateManager { return trackerState.snapshot } + @Synchronized + fun eventsBefore(event: Event): List { + val result: MutableList = LinkedList() + if (event is AbstractSelfDescribing) { + val stateMachines: MutableList = LinkedList() + eventSchemaToEventsBefore[event.schema]?.let { stateMachines.addAll(it) } + eventSchemaToEventsBefore["*"]?.let { stateMachines.addAll(it) } + + for (stateMachine in stateMachines) { + stateMachineToIdentifier[stateMachine]?.let { stateIdentifier -> + stateMachine.eventsBefore(event)?.let { events -> + result.addAll(events) + } + } + } + } + return result + } + @Synchronized fun entitiesForProcessedEvent(event: StateMachineEvent): List { val schema = event.schema ?: event.name diff --git a/snowplow-tracker/src/main/java/com/snowplowanalytics/core/tracker/ServiceProvider.kt b/snowplow-tracker/src/main/java/com/snowplowanalytics/core/tracker/ServiceProvider.kt index 6336948d7..f51dcf9a2 100644 --- a/snowplow-tracker/src/main/java/com/snowplowanalytics/core/tracker/ServiceProvider.kt +++ b/snowplow-tracker/src/main/java/com/snowplowanalytics/core/tracker/ServiceProvider.kt @@ -272,6 +272,7 @@ class ServiceProvider( tracker.deepLinkContext = trackerConfiguration.deepLinkContext tracker.screenContext = trackerConfiguration.screenContext tracker.screenViewAutotracking = trackerConfiguration.screenViewAutotracking + tracker.screenEngagementAutotracking = trackerConfiguration.screenEngagementAutotracking tracker.lifecycleAutotracking = trackerConfiguration.lifecycleAutotracking tracker.installAutotracking = trackerConfiguration.installAutotracking tracker.exceptionAutotracking = trackerConfiguration.exceptionAutotracking diff --git a/snowplow-tracker/src/main/java/com/snowplowanalytics/core/tracker/Tracker.kt b/snowplow-tracker/src/main/java/com/snowplowanalytics/core/tracker/Tracker.kt index ecfc8b691..f952dd8f5 100755 --- a/snowplow-tracker/src/main/java/com/snowplowanalytics/core/tracker/Tracker.kt +++ b/snowplow-tracker/src/main/java/com/snowplowanalytics/core/tracker/Tracker.kt @@ -18,6 +18,10 @@ import com.snowplowanalytics.core.constants.TrackerConstants import com.snowplowanalytics.core.emitter.Emitter import com.snowplowanalytics.core.emitter.Executor.execute import com.snowplowanalytics.core.gdpr.Gdpr +import com.snowplowanalytics.core.screenviews.ScreenState +import com.snowplowanalytics.core.screenviews.ScreenStateMachine +import com.snowplowanalytics.core.screenviews.ScreenSummaryState +import com.snowplowanalytics.core.screenviews.ScreenSummaryStateMachine import com.snowplowanalytics.core.session.ProcessObserver.Companion.initialize import com.snowplowanalytics.core.session.Session import com.snowplowanalytics.core.session.Session.Companion.getInstance @@ -183,6 +187,16 @@ class Tracker( } } + var screenEngagementAutotracking = false + set(screenEngagementAutotracking) { + field = screenEngagementAutotracking + if (screenEngagementAutotracking) { + addOrReplaceStateMachine(ScreenSummaryStateMachine()) + } else { + removeStateMachine(ScreenSummaryStateMachine.ID) + } + } + /** Internal use only */ var userAnonymisation: Boolean = TrackerDefaults.userAnonymisation set(userAnonymisation) { @@ -473,28 +487,39 @@ class Tracker( if (!dataCollection) { return null } - - event.beginProcessing(this) - var stateSnapshot: TrackerStateSnapshot - var trackerEvent: TrackerEvent + + val events = withEventsBefore(event) + for (e in events) { e.beginProcessing(this) } + var trackerEvents: List> synchronized(this) { - stateSnapshot = stateManager.trackerStateForProcessedEvent(event) - trackerEvent = TrackerEvent(event, stateSnapshot) - workaroundForIncoherentSessionContext(trackerEvent) + trackerEvents = events.map { event -> + val stateSnapshot = stateManager.trackerStateForProcessedEvent(event) + val trackerEvent = TrackerEvent(event, stateSnapshot) + workaroundForIncoherentSessionContext(trackerEvent) + Pair(event, trackerEvent) + } } + val reportsOnDiagnostic = event !is TrackerError execute(reportsOnDiagnostic, TAG) { - payloadWithEvent(trackerEvent)?.let { payload -> - v(TAG, "Adding new payload to event storage: %s", payload) - emitter.add(payload) - event.endProcessing(this) - stateManager.afterTrack(trackerEvent) - } ?: run { - d(TAG, "Event not tracked due to filtering: %s", trackerEvent.eventId) - event.endProcessing(this) + trackerEvents.forEach { (event, trackerEvent) -> + payloadWithEvent(trackerEvent)?.let { payload -> + v(TAG, "Adding new payload to event storage: %s", payload) + emitter.add(payload) + event.endProcessing(this) + stateManager.afterTrack(trackerEvent) + } ?: run { + d(TAG, "Event not tracked due to filtering: %s", trackerEvent.eventId) + event.endProcessing(this) + } } } - return trackerEvent.eventId + return trackerEvents.last().second.eventId + } + + private fun withEventsBefore(event: Event): List { + val events = stateManager.eventsBefore(event) + return events + listOf(event) } private fun payloadWithEvent(event: TrackerEvent): Payload? { diff --git a/snowplow-tracker/src/main/java/com/snowplowanalytics/core/tracker/TrackerConfigurationInterface.kt b/snowplow-tracker/src/main/java/com/snowplowanalytics/core/tracker/TrackerConfigurationInterface.kt index caddc3809..2b55cfcd3 100644 --- a/snowplow-tracker/src/main/java/com/snowplowanalytics/core/tracker/TrackerConfigurationInterface.kt +++ b/snowplow-tracker/src/main/java/com/snowplowanalytics/core/tracker/TrackerConfigurationInterface.kt @@ -81,6 +81,12 @@ interface TrackerConfigurationInterface { */ var screenViewAutotracking: Boolean + /** + * Whether to enable tracking the screen end event and the screen summary context entity. + * Make sure that you have lifecycle autotracking enabled for screen summary to have complete information. + */ + var screenEngagementAutotracking: Boolean + /** * Whether enable automatic tracking of background and foreground transitions. * @apiNote It needs the Foreground library installed. diff --git a/snowplow-tracker/src/main/java/com/snowplowanalytics/core/tracker/TrackerControllerImpl.kt b/snowplow-tracker/src/main/java/com/snowplowanalytics/core/tracker/TrackerControllerImpl.kt index 51e4614ae..bd50bb7bf 100644 --- a/snowplow-tracker/src/main/java/com/snowplowanalytics/core/tracker/TrackerControllerImpl.kt +++ b/snowplow-tracker/src/main/java/com/snowplowanalytics/core/tracker/TrackerControllerImpl.kt @@ -162,6 +162,13 @@ class TrackerControllerImpl // Constructors dirtyConfig.screenViewAutotracking = screenViewAutotracking tracker.screenViewAutotracking = screenViewAutotracking } + + override var screenEngagementAutotracking: Boolean + get() = tracker.screenEngagementAutotracking + set(screenEngagementAutotracking) { + dirtyConfig.screenEngagementAutotracking = screenEngagementAutotracking + tracker.screenEngagementAutotracking = screenEngagementAutotracking + } override var lifecycleAutotracking: Boolean get() = tracker.lifecycleAutotracking diff --git a/snowplow-tracker/src/main/java/com/snowplowanalytics/core/tracker/TrackerDefaults.kt b/snowplow-tracker/src/main/java/com/snowplowanalytics/core/tracker/TrackerDefaults.kt index 92dc50597..653458713 100644 --- a/snowplow-tracker/src/main/java/com/snowplowanalytics/core/tracker/TrackerDefaults.kt +++ b/snowplow-tracker/src/main/java/com/snowplowanalytics/core/tracker/TrackerDefaults.kt @@ -34,6 +34,7 @@ object TrackerDefaults { var diagnosticAutotracking = false var lifecycleAutotracking = false var screenViewAutotracking = true + var screenEngagementAutotracking = true var installAutotracking = true var userAnonymisation = false } diff --git a/snowplow-tracker/src/main/java/com/snowplowanalytics/snowplow/configuration/TrackerConfiguration.kt b/snowplow-tracker/src/main/java/com/snowplowanalytics/snowplow/configuration/TrackerConfiguration.kt index 688ac83d1..47a5872bc 100644 --- a/snowplow-tracker/src/main/java/com/snowplowanalytics/snowplow/configuration/TrackerConfiguration.kt +++ b/snowplow-tracker/src/main/java/com/snowplowanalytics/snowplow/configuration/TrackerConfiguration.kt @@ -39,6 +39,7 @@ import java.util.* * - screenContext: true * - deepLinkContext: true * - screenViewAutotracking: true + * - screenEngagementAutotracking: true * - lifecycleAutotracking: false * - installAutotracking: true * - exceptionAutotracking: true @@ -120,6 +121,11 @@ open class TrackerConfiguration : TrackerConfigurationInterface, Configuration { get() = _screenViewAutotracking ?: sourceConfig?.screenViewAutotracking ?: TrackerDefaults.screenViewAutotracking set(value) { _screenViewAutotracking = value } + private var _screenEngagementAutotracking: Boolean? = null + override var screenEngagementAutotracking: Boolean + get() = _screenEngagementAutotracking ?: sourceConfig?.screenEngagementAutotracking ?: TrackerDefaults.screenEngagementAutotracking + set(value) { _screenEngagementAutotracking = value } + private var _lifecycleAutotracking: Boolean? = null override var lifecycleAutotracking: Boolean get() = _lifecycleAutotracking ?: sourceConfig?.lifecycleAutotracking ?: TrackerDefaults.lifecycleAutotracking @@ -265,6 +271,15 @@ open class TrackerConfiguration : TrackerConfigurationInterface, Configuration { return this } + /** + * Whether to enable tracking the screen end event and the screen summary context entity. + * Make sure that you have lifecycle autotracking enabled for screen summary to have complete information. + */ + fun screenEngagementAutotracking(screenEngagementAutotracking: Boolean): TrackerConfiguration { + this.screenEngagementAutotracking = screenEngagementAutotracking + return this + } + /** * Whether to enable automatic tracking of background and foreground transitions. * The Foreground library must be installed. @@ -344,6 +359,7 @@ open class TrackerConfiguration : TrackerConfigurationInterface, Configuration { .screenContext(screenContext) .deepLinkContext(deepLinkContext) .screenViewAutotracking(screenViewAutotracking) + .screenEngagementAutotracking(screenEngagementAutotracking) .lifecycleAutotracking(lifecycleAutotracking) .installAutotracking(installAutotracking) .exceptionAutotracking(exceptionAutotracking) @@ -395,6 +411,7 @@ open class TrackerConfiguration : TrackerConfigurationInterface, Configuration { if (jsonObject.has("screenContext")) { _screenContext = jsonObject.getBoolean("screenContext") } if (jsonObject.has("deepLinkContext")) { _deepLinkContext = jsonObject.getBoolean("deepLinkContext") } if (jsonObject.has("screenViewAutotracking")) { _screenViewAutotracking = jsonObject.getBoolean("screenViewAutotracking") } + if (jsonObject.has("screenEngagementAutotracking")) { _screenEngagementAutotracking = jsonObject.getBoolean("screenEngagementAutotracking") } if (jsonObject.has("lifecycleAutotracking")) { _lifecycleAutotracking = jsonObject.getBoolean("lifecycleAutotracking") } if (jsonObject.has("installAutotracking")) { _installAutotracking = jsonObject.getBoolean("installAutotracking") } if (jsonObject.has("exceptionAutotracking")) { _exceptionAutotracking = jsonObject.getBoolean("exceptionAutotracking") } diff --git a/snowplow-tracker/src/main/java/com/snowplowanalytics/snowplow/event/ListItemView.kt b/snowplow-tracker/src/main/java/com/snowplowanalytics/snowplow/event/ListItemView.kt new file mode 100644 index 000000000..2d98304ba --- /dev/null +++ b/snowplow-tracker/src/main/java/com/snowplowanalytics/snowplow/event/ListItemView.kt @@ -0,0 +1,40 @@ +/* + * Copyright (c) 2015-2023 Snowplow Analytics Ltd. All rights reserved. + * + * This program is licensed to you under the Apache License Version 2.0, + * and you may not use this file except in compliance with the Apache License Version 2.0. + * You may obtain a copy of the Apache License Version 2.0 at http://www.apache.org/licenses/LICENSE-2.0. + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the Apache License Version 2.0 is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the Apache License Version 2.0 for the specific language governing permissions and limitations there under. + */ +package com.snowplowanalytics.snowplow.event + +import com.snowplowanalytics.core.constants.TrackerConstants + +/** + * Event tracking the view of an item in a list. + * If screen engagement tracking is enabled, the list item view events will be aggregated into a `screen_summary` entity and won't be sent as separate events to the collector. + * + * Schema: `iglu:com.snowplowanalytics.mobile/list_item_view/jsonschema/1-0-0` + */ +class ListItemView ( + /** Index of the item in the list. */ + var index: Int, + /** Total number of items in the list. */ + var itemsCount: Int? +) : AbstractSelfDescribing() { + + override val schema: String + get() = TrackerConstants.SCHEMA_LIST_ITEM_VIEW + + override val dataPayload: Map + get() { + return mapOf( + "index" to index, + "items_count" to itemsCount + ) + } +} diff --git a/snowplow-tracker/src/main/java/com/snowplowanalytics/snowplow/event/ScrollChanged.kt b/snowplow-tracker/src/main/java/com/snowplowanalytics/snowplow/event/ScrollChanged.kt new file mode 100644 index 000000000..c2e2b2f35 --- /dev/null +++ b/snowplow-tracker/src/main/java/com/snowplowanalytics/snowplow/event/ScrollChanged.kt @@ -0,0 +1,52 @@ +/* + * Copyright (c) 2015-2023 Snowplow Analytics Ltd. All rights reserved. + * + * This program is licensed to you under the Apache License Version 2.0, + * and you may not use this file except in compliance with the Apache License Version 2.0. + * You may obtain a copy of the Apache License Version 2.0 at http://www.apache.org/licenses/LICENSE-2.0. + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the Apache License Version 2.0 is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the Apache License Version 2.0 for the specific language governing permissions and limitations there under. + */ +package com.snowplowanalytics.snowplow.event + +import com.snowplowanalytics.core.constants.TrackerConstants + +/** + * Event tracked when a scroll view's scroll position changes. + * If screen engagement tracking is enabled, the scroll changed events will be aggregated into a `screen_summary` entity and won't be sent as separate events to the collector. + * + * Schema: `iglu:com.snowplowanalytics.mobile/scroll_changed/jsonschema/1-0-0` + */ +class ScrollChanged ( + /** Vertical scroll offset in pixels. */ + var yOffset: Int? = null, + /** Horizontal scroll offset in pixels. */ + var xOffset: Int? = null, + /** The width of the scroll view in pixels. */ + var viewWidth: Int? = null, + /** The height of the scroll view in pixels. */ + var viewHeight: Int? = null, + /** The width of the content of the scroll view in pixels. */ + var contentWidth: Int? = null, + /** The height of the content of the scroll view in pixels. */ + var contentHeight: Int? = null +) : AbstractSelfDescribing() { + + override val schema: String + get() = TrackerConstants.SCHEMA_SCROLL_CHANGED + + override val dataPayload: Map + get() { + val data = mutableMapOf() + yOffset?.let { data["y_offset"] = it } + xOffset?.let { data["x_offset"] = it } + viewWidth?.let { data["view_width"] = it } + viewHeight?.let { data["view_height"] = it } + contentWidth?.let { data["content_width"] = it } + contentHeight?.let { data["content_height"] = it } + return data + } +} From 5975f74e2d23cd57226e6c47f0d67d699be0617c Mon Sep 17 00:00:00 2001 From: Matus Tomlein Date: Fri, 12 Jan 2024 11:03:09 +0100 Subject: [PATCH 05/21] Do not track the screen view again when app comes to foreground (close #653) PR #655 --- .../screen/ScreenViewAutotrackingTest.kt | 90 +++++++++++++++++++ .../core/screenviews/ScreenState.kt | 4 +- .../snowplowanalytics/core/tracker/Tracker.kt | 17 +++- 3 files changed, 106 insertions(+), 5 deletions(-) create mode 100644 snowplow-tracker/src/androidTest/java/com/snowplowanalytics/snowplow/screen/ScreenViewAutotrackingTest.kt diff --git a/snowplow-tracker/src/androidTest/java/com/snowplowanalytics/snowplow/screen/ScreenViewAutotrackingTest.kt b/snowplow-tracker/src/androidTest/java/com/snowplowanalytics/snowplow/screen/ScreenViewAutotrackingTest.kt new file mode 100644 index 000000000..f94ce985e --- /dev/null +++ b/snowplow-tracker/src/androidTest/java/com/snowplowanalytics/snowplow/screen/ScreenViewAutotrackingTest.kt @@ -0,0 +1,90 @@ +/* + * Copyright (c) 2015-2023 Snowplow Analytics Ltd. All rights reserved. + * + * This program is licensed to you under the Apache License Version 2.0, + * and you may not use this file except in compliance with the Apache License Version 2.0. + * You may obtain a copy of the Apache License Version 2.0 at http://www.apache.org/licenses/LICENSE-2.0. + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the Apache License Version 2.0 is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the Apache License Version 2.0 for the specific language governing permissions and limitations there under. + */ +package com.snowplowanalytics.snowplow.tracker + +import android.content.Context +import androidx.test.ext.junit.runners.AndroidJUnit4 +import androidx.test.platform.app.InstrumentationRegistry +import com.snowplowanalytics.core.constants.TrackerConstants +import com.snowplowanalytics.core.utils.NotificationCenter +import com.snowplowanalytics.snowplow.Snowplow +import com.snowplowanalytics.snowplow.Snowplow.removeAllTrackers +import com.snowplowanalytics.snowplow.configuration.Configuration +import com.snowplowanalytics.snowplow.configuration.NetworkConfiguration +import com.snowplowanalytics.snowplow.configuration.PluginConfiguration +import com.snowplowanalytics.snowplow.controller.TrackerController +import com.snowplowanalytics.snowplow.event.ScreenView +import com.snowplowanalytics.snowplow.event.Structured +import com.snowplowanalytics.snowplow.network.HttpMethod +import com.snowplowanalytics.snowplow.payload.SelfDescribingJson +import org.junit.After +import org.junit.Assert +import org.junit.Test +import org.junit.runner.RunWith +import java.util.* + +@RunWith(AndroidJUnit4::class) +class ScreenViewAutotrackingTest { + + @After + fun tearDown() { + removeAllTrackers() + } + + // --- TESTS + @Test + fun doesntTrackTheSameScreenViewMultipleTimes() { + var numberOfScreenViews = 0 + + val countPlugin = PluginConfiguration("test") + countPlugin.afterTrack { + if (it.schema == TrackerConstants.SCHEMA_SCREEN_VIEW) { + numberOfScreenViews += 1 + } + } + + createTracker(listOf(countPlugin)) + Thread.sleep(200) + + NotificationCenter.postNotification("SnowplowScreenView", mapOf( + "event" to ScreenView(name = "Screen1").activityClassName("Screen1") + )) + Thread.sleep(200) + + NotificationCenter.postNotification("SnowplowScreenView", mapOf( + "event" to ScreenView(name = "Screen1").activityClassName("Screen1") + )) + Thread.sleep(200) + + NotificationCenter.postNotification("SnowplowScreenView", mapOf( + "event" to ScreenView(name = "Screen2").activityClassName("Screen2") + )) + Thread.sleep(200) + + Assert.assertEquals(2, numberOfScreenViews) + } + + // --- PRIVATE + private val context: Context + get() = InstrumentationRegistry.getInstrumentation().targetContext + + private fun createTracker(configurations: List): TrackerController { + val networkConfig = NetworkConfiguration(MockNetworkConnection(HttpMethod.POST, 200)) + return Snowplow.createTracker( + context, + namespace = "testScreenView" + Math.random().toString(), + network = networkConfig, + configurations = configurations.toTypedArray() + ) + } +} diff --git a/snowplow-tracker/src/main/java/com/snowplowanalytics/core/screenviews/ScreenState.kt b/snowplow-tracker/src/main/java/com/snowplowanalytics/core/screenviews/ScreenState.kt index f4520e110..f5da381d6 100644 --- a/snowplow-tracker/src/main/java/com/snowplowanalytics/core/screenviews/ScreenState.kt +++ b/snowplow-tracker/src/main/java/com/snowplowanalytics/core/screenviews/ScreenState.kt @@ -34,8 +34,8 @@ class ScreenState : State { private var transitionType: String? = null private var fragmentClassName: String? = null private var fragmentTag: String? = null - private var activityClassName: String? = null - private var activityTag: String? = null + var activityClassName: String? = null + var activityTag: String? = null init { id = uUIDString() diff --git a/snowplow-tracker/src/main/java/com/snowplowanalytics/core/tracker/Tracker.kt b/snowplow-tracker/src/main/java/com/snowplowanalytics/core/tracker/Tracker.kt index f952dd8f5..1cf325092 100755 --- a/snowplow-tracker/src/main/java/com/snowplowanalytics/core/tracker/Tracker.kt +++ b/snowplow-tracker/src/main/java/com/snowplowanalytics/core/tracker/Tracker.kt @@ -69,7 +69,7 @@ class Tracker( private val stateManager = StateManager() fun getScreenState(): ScreenState? { - val state = stateManager.trackerState.getState("ScreenContext") + val state = stateManager.trackerState.getState(ScreenStateMachine.ID) ?: // Legacy initialization return ScreenState() @@ -338,8 +338,19 @@ class Tracker( private val receiveScreenViewNotification: FunctionalObserver = object : FunctionalObserver() { override fun apply(data: Map) { if (screenViewAutotracking) { - val event = data["event"] as? Event? - event?.let { track(it) } + val event = data["event"] as? ScreenView? + event?.let { event -> + getScreenState()?.let { state -> + // don't track if screen view is for the same activity as the last one + if ( + event.activityClassName?.isEmpty() != false || + event.activityClassName != state.activityClassName || + event.activityTag != state.activityTag + ) { + track(event) + } + } ?: track(event) + } } } } From 2bb37f5c117e360f9bb106de9c918bd431045d12 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Matu=CC=81s=CC=8C=20Tomlein?= Date: Thu, 18 Jan 2024 15:38:35 +0100 Subject: [PATCH 06/21] Update Emitter constructor to accept namespace and event store and make them immutable # Conflicts: # snowplow-tracker/src/main/java/com/snowplowanalytics/core/emitter/Emitter.kt --- .../internal/tracker/StateManagerTest.kt | 9 +-- .../snowplow/internal/tracker/TrackerTest.kt | 38 ++++----- .../snowplow/tracker/EmitterTest.kt | 80 +++++++++---------- .../snowplow/tracker/LoggingTest.kt | 2 +- .../snowplow/tracker/SessionTest.kt | 6 +- .../tracker/integration/EventSendingTest.kt | 8 +- .../snowplowanalytics/core/emitter/Emitter.kt | 53 ++++-------- .../core/tracker/ServiceProvider.kt | 9 ++- .../snowplowanalytics/core/tracker/Tracker.kt | 4 - 9 files changed, 88 insertions(+), 121 deletions(-) diff --git a/snowplow-tracker/src/androidTest/java/com/snowplowanalytics/snowplow/internal/tracker/StateManagerTest.kt b/snowplow-tracker/src/androidTest/java/com/snowplowanalytics/snowplow/internal/tracker/StateManagerTest.kt index 43e1fb49c..050c8253b 100644 --- a/snowplow-tracker/src/androidTest/java/com/snowplowanalytics/snowplow/internal/tracker/StateManagerTest.kt +++ b/snowplow-tracker/src/androidTest/java/com/snowplowanalytics/snowplow/internal/tracker/StateManagerTest.kt @@ -120,8 +120,7 @@ class StateManagerTest { fun testScreenStateMachine() { val context = InstrumentationRegistry.getInstrumentation().targetContext val eventStore = MockEventStore() - val builder = { emitter: Emitter -> emitter.eventStore = eventStore } - val emitter = Emitter(context, "http://snowplow-fake-url.com", builder) + val emitter = Emitter("namespace", eventStore, context, "http://snowplow-fake-url.com") val trackerBuilder = { tracker: Tracker -> tracker.screenContext = true tracker.sessionContext = false @@ -216,8 +215,7 @@ class StateManagerTest { fun testLifecycleStateMachine() { val context = InstrumentationRegistry.getInstrumentation().targetContext val eventStore = MockEventStore() - val builder = { emitter: Emitter -> emitter.eventStore = eventStore } - val emitter = Emitter(context, "http://snowplow-fake-url.com", builder) + val emitter = Emitter("namespace", eventStore, context, "http://snowplow-fake-url.com") val trackerBuilder = { tracker: Tracker -> tracker.lifecycleAutotracking = true tracker.base64Encoded = false @@ -290,8 +288,7 @@ class StateManagerTest { fun testDeepLinkStateMachine() { val context = InstrumentationRegistry.getInstrumentation().targetContext val eventStore = MockEventStore() - val builder = { emitter: Emitter -> emitter.eventStore = eventStore } - val emitter = Emitter(context, "http://snowplow-fake-url.com", builder) + val emitter = Emitter("namespace", eventStore, context, "http://snowplow-fake-url.com") val trackerBuilder = { tracker: Tracker -> tracker.deepLinkContext = true tracker.base64Encoded = false diff --git a/snowplow-tracker/src/androidTest/java/com/snowplowanalytics/snowplow/internal/tracker/TrackerTest.kt b/snowplow-tracker/src/androidTest/java/com/snowplowanalytics/snowplow/internal/tracker/TrackerTest.kt index 579015890..5b3ef17ea 100755 --- a/snowplow-tracker/src/androidTest/java/com/snowplowanalytics/snowplow/internal/tracker/TrackerTest.kt +++ b/snowplow-tracker/src/androidTest/java/com/snowplowanalytics/snowplow/internal/tracker/TrackerTest.kt @@ -57,13 +57,9 @@ class TrackerTest { val emitter = Companion.tracker!!.emitter val eventStore = emitter.eventStore - if (eventStore != null) { - val isClean = eventStore.removeAllEvents() - Log.i("TrackerTest", "EventStore cleaned: $isClean") - Log.i("TrackerTest", "Events in the store: " + eventStore.size()) - } else { - Log.i("TrackerTest", "EventStore null") - } + val isClean = eventStore.removeAllEvents() + Log.i("TrackerTest", "EventStore cleaned: $isClean") + Log.i("TrackerTest", "Events in the store: " + eventStore.size()) emitter.shutdown(30) Companion.tracker!!.close() Log.i("TrackerTest", "Tracker closed") @@ -85,7 +81,7 @@ class TrackerTest { emitter.emptyLimit = 0 } val emitter = Emitter( - context, "testUrl", builder + "myNamespace", null, context, "testUrl", builder ) val subject = Subject( context, null @@ -136,7 +132,7 @@ class TrackerTest { fun testEmitterUpdate() { val tracker = tracker Assert.assertNotNull(tracker!!.emitter) - tracker.emitter = Emitter(context, "test", null) + tracker.emitter = Emitter(tracker.namespace, null, context, "test", null) Assert.assertNotNull(tracker.emitter) } @@ -193,7 +189,7 @@ class TrackerTest { emitterArg.requestSecurity = Protocol.HTTP } try { - emitter = Emitter(context, getMockServerURI(mockWebServer)!!, builder) + emitter = Emitter(namespace, null, context, getMockServerURI(mockWebServer)!!, builder) } catch (e: Exception) { e.printStackTrace() Assert.fail("Exception on Emitter creation") @@ -211,10 +207,8 @@ class TrackerTest { Companion.tracker = Tracker(emitter!!, namespace, "testTrackWithNoContext", null, context, trackerBuilder) val eventStore = emitter.eventStore - if (eventStore != null) { - val isClean = eventStore.removeAllEvents() - Log.i("testTrackSelfDescribingEvent", "EventStore clean: $isClean") - } + val isClean = eventStore.removeAllEvents() + Log.i("testTrackSelfDescribingEvent", "EventStore clean: $isClean") Log.i("testTrackSelfDescribingEvent", "Send SelfDescribing event") val sdj = SelfDescribingJson("iglu:foo/bar/jsonschema/1-0-0") val sdEvent = SelfDescribing(sdj) @@ -255,7 +249,7 @@ class TrackerTest { emitterArg.requestSecurity = Protocol.HTTP } try { - emitter = Emitter(context, getMockServerURI(mockWebServer)!!, emitterBuilder) + emitter = Emitter(namespace, null, context, getMockServerURI(mockWebServer)!!, emitterBuilder) } catch (e: Exception) { e.printStackTrace() Assert.fail("Exception on Emitter creation") @@ -313,7 +307,7 @@ class TrackerTest { val mockWebServer = getMockServer(1) val builder = { emitter: Emitter -> emitter.bufferOption = BufferOption.Single } val emitter = Emitter( - context, getMockServerURI(mockWebServer)!!, builder + namespace, null, context, getMockServerURI(mockWebServer)!!, builder ) val trackerBuilder = { tracker: Tracker -> tracker.base64Encoded = false @@ -330,7 +324,7 @@ class TrackerTest { val eventId = Companion.tracker!!.track(ScreenView("name")) Assert.assertNull(eventId) val req = mockWebServer.takeRequest(2, TimeUnit.SECONDS) - Assert.assertEquals(0, Companion.tracker!!.emitter.eventStore!!.size()) + Assert.assertEquals(0, Companion.tracker!!.emitter.eventStore.size()) Assert.assertNull(req) mockWebServer.shutdown() } @@ -345,7 +339,7 @@ class TrackerTest { val mockWebServer = getMockServer(1) val builder = { emitter: Emitter -> emitter.bufferOption = BufferOption.Single } val emitter = Emitter( - context, getMockServerURI(mockWebServer)!!, builder + namespace, null, context, getMockServerURI(mockWebServer)!!, builder ) val trackerBuilder = { tracker: Tracker -> tracker.base64Encoded = false @@ -373,7 +367,7 @@ class TrackerTest { TestUtils.createSessionSharedPreferences(context, namespace) val builder = { emitter: Emitter -> emitter.bufferOption = BufferOption.Single } val emitter = Emitter( - context, "fake-uri", builder + namespace, null, context, "fake-uri", builder ) val trackerBuilder = { tracker: Tracker -> tracker.base64Encoded = false @@ -422,7 +416,7 @@ class TrackerTest { Thread.getDefaultUncaughtExceptionHandler().javaClass ) val emitter = Emitter( - context, "com.acme", null + namespace, null, context, "com.acme", null ) val trackerBuilder = { tracker: Tracker -> tracker.base64Encoded = false @@ -450,7 +444,7 @@ class TrackerTest { Thread.getDefaultUncaughtExceptionHandler().javaClass ) val emitter = Emitter( - context, "com.acme", null + namespace, null, context, "com.acme", null ) val trackerBuilder = { tracker: Tracker -> tracker.base64Encoded = false @@ -475,7 +469,7 @@ class TrackerTest { @Test fun testStartsNewSessionWhenChangingAnonymousTracking() { val emitterBuilder = { emitter: Emitter -> emitter.bufferOption = BufferOption.Single } - val emitter = Emitter(context, "fake-uri", emitterBuilder) + val emitter = Emitter("ns", null, context, "fake-uri", emitterBuilder) emitter.pauseEmit() val trackerBuilder = { tracker: Tracker -> diff --git a/snowplow-tracker/src/androidTest/java/com/snowplowanalytics/snowplow/tracker/EmitterTest.kt b/snowplow-tracker/src/androidTest/java/com/snowplowanalytics/snowplow/tracker/EmitterTest.kt index e2264408a..13968bd46 100755 --- a/snowplow-tracker/src/androidTest/java/com/snowplowanalytics/snowplow/tracker/EmitterTest.kt +++ b/snowplow-tracker/src/androidTest/java/com/snowplowanalytics/snowplow/tracker/EmitterTest.kt @@ -33,23 +33,23 @@ class EmitterTest { @Test fun testHttpMethodSet() { var builder = { emitter: Emitter -> emitter.httpMethod = HttpMethod.GET } - var emitter = Emitter(context, "com.acme", builder) + var emitter = Emitter("ns", MockEventStore(), context, "com.acme", builder) Assert.assertEquals(HttpMethod.GET, emitter.httpMethod) builder = { emitter1: Emitter -> emitter1.httpMethod = HttpMethod.POST } - emitter = Emitter(context, "com.acme", builder) + emitter = Emitter("ns", MockEventStore(), context, "com.acme", builder) Assert.assertEquals(HttpMethod.POST, emitter.httpMethod) } @Test fun testBufferOptionSet() { var builder = { emitter: Emitter -> emitter.bufferOption = BufferOption.Single } - var emitter = Emitter(context, "com.acme", builder) + var emitter = Emitter("ns", MockEventStore(), context, "com.acme", builder) Assert.assertEquals(BufferOption.Single, emitter.bufferOption) builder = { emitter1: Emitter -> emitter1.bufferOption = BufferOption.SmallGroup } - emitter = Emitter(context, "com.acme", builder) + emitter = Emitter("ns", MockEventStore(), context, "com.acme", builder) Assert.assertEquals(BufferOption.SmallGroup, emitter.bufferOption) builder = { emitter2: Emitter -> emitter2.bufferOption = BufferOption.LargeGroup } - emitter = Emitter(context, "com.acme", builder) + emitter = Emitter("ns", MockEventStore(), context, "com.acme", builder) Assert.assertEquals(BufferOption.LargeGroup, emitter.bufferOption) } @@ -61,7 +61,7 @@ class EmitterTest { override fun onFailure(successCount: Int, failureCount: Int) {} } } - val emitter = Emitter(context, "com.acme", builder) + val emitter = Emitter("ns", MockEventStore(), context, "com.acme", builder) Assert.assertNotNull(emitter.requestCallback) } @@ -73,14 +73,14 @@ class EmitterTest { emitter.httpMethod = HttpMethod.GET emitter.requestSecurity = Protocol.HTTP } - var emitter = Emitter(context, uri, builder) + var emitter = Emitter("ns", MockEventStore(), context, uri, builder) Assert.assertEquals("http://$uri/i", emitter.emitterUri) builder = { emitter1: Emitter -> emitter1.bufferOption = BufferOption.SmallGroup emitter1.httpMethod = HttpMethod.POST emitter1.requestSecurity = Protocol.HTTP } - emitter = Emitter(context, uri, builder) + emitter = Emitter("ns", MockEventStore(), context, uri, builder) Assert.assertEquals( "http://$uri/com.snowplowanalytics.snowplow/tp2", emitter.emitterUri @@ -90,59 +90,59 @@ class EmitterTest { emitter2.httpMethod = HttpMethod.GET emitter2.requestSecurity = Protocol.HTTPS } - emitter = Emitter(context, uri, builder) + emitter = Emitter("ns", MockEventStore(), context, uri, builder) Assert.assertEquals("https://$uri/i", emitter.emitterUri) builder = { emitter3: Emitter -> emitter3.bufferOption = BufferOption.SmallGroup emitter3.httpMethod = HttpMethod.POST emitter3.requestSecurity = Protocol.HTTPS } - emitter = Emitter(context, uri, builder) + emitter = Emitter("ns", MockEventStore(), context, uri, builder) Assert.assertEquals("https://$uri/com.snowplowanalytics.snowplow/tp2", emitter.emitterUri) } @Test fun testSecuritySet() { var builder = { emitter: Emitter -> emitter.requestSecurity = Protocol.HTTP } - var emitter = Emitter(context, "com.acme", builder) + var emitter = Emitter("ns", MockEventStore(), context, "com.acme", builder) Assert.assertEquals(Protocol.HTTP, emitter.requestSecurity) builder = { emitter1: Emitter -> emitter1.requestSecurity = Protocol.HTTPS } - emitter = Emitter(context, "com.acme", builder) + emitter = Emitter("ns", MockEventStore(), context, "com.acme", builder) Assert.assertEquals(Protocol.HTTPS, emitter.requestSecurity) } @Test fun testTickSet() { val builder = { emitter: Emitter -> emitter.emitterTick = 0 } - val emitter = Emitter(context, "com.acme", builder) + val emitter = Emitter("ns", MockEventStore(), context, "com.acme", builder) Assert.assertEquals(0, emitter.emitterTick.toLong()) } @Test fun testEmptyLimitSet() { val builder = { emitter: Emitter -> emitter.emptyLimit = 0 } - val emitter = Emitter(context, "com.acme", builder) + val emitter = Emitter("ns", MockEventStore(), context, "com.acme", builder) Assert.assertEquals(0, emitter.emptyLimit.toLong()) } @Test fun testSendLimitSet() { val builder = { emitter: Emitter -> emitter.emitRange = 200 } - val emitter = Emitter(context, "com.acme", builder) + val emitter = Emitter("ns", MockEventStore(), context, "com.acme", builder) Assert.assertEquals(200, emitter.emitRange.toLong()) } @Test fun testByteLimitGetSet() { val builder = { emitter: Emitter -> emitter.byteLimitGet = 20000 } - val emitter = Emitter(context, "com.acme", builder) + val emitter = Emitter("ns", MockEventStore(), context, "com.acme", builder) Assert.assertEquals(20000, emitter.byteLimitGet) } @Test fun testByteLimitPostSet() { val builder = { emitter: Emitter -> emitter.byteLimitPost = 25000 } - val emitter = Emitter(context, "com.acme", builder) + val emitter = Emitter("ns", MockEventStore(), context, "com.acme", builder) Assert.assertEquals(25000, emitter.byteLimitPost) } @@ -159,10 +159,9 @@ class EmitterTest { emitter.emitRange = 200 emitter.byteLimitGet = 20000 emitter.byteLimitPost = 25000 - emitter.eventStore = MockEventStore() emitter.timeUnit = TimeUnit.MILLISECONDS } - val emitter = Emitter(context, uri, builder) + val emitter = Emitter("ns", MockEventStore(), context, uri, builder) Assert.assertFalse(emitter.emitterStatus) Assert.assertEquals(BufferOption.Single, emitter.bufferOption) Assert.assertEquals("http://$uri/com.snowplowanalytics.snowplow/tp2", emitter.emitterUri) @@ -201,11 +200,10 @@ class EmitterTest { emitter1.emitRange = 200 emitter1.byteLimitGet = 20000 emitter1.byteLimitPost = 50000 - emitter1.eventStore = MockEventStore() emitter1.timeUnit = TimeUnit.MILLISECONDS emitter1.customPostPath = "com.acme.company/tpx" } - val customPathEmitter = Emitter(context, uri, builder) + val customPathEmitter = Emitter("ns", MockEventStore(), context, uri, builder) Assert.assertEquals("com.acme.company/tpx", customPathEmitter.customPostPath) Assert.assertEquals("http://$uri/com.acme.company/tpx", customPathEmitter.emitterUri) customPathEmitter.shutdown() @@ -237,7 +235,7 @@ class EmitterTest { Assert.assertEquals(1, networkConnection.previousResults.size.toLong()) Assert.assertEquals(1, networkConnection.previousResults[0].size.toLong()) Assert.assertTrue(networkConnection.previousResults[0][0].isSuccessful) - Assert.assertEquals(0, emitter.eventStore!!.size()) + Assert.assertEquals(0, emitter.eventStore.size()) emitter.flush() } @@ -255,7 +253,7 @@ class EmitterTest { Assert.assertEquals(1, networkConnection.previousResults.size.toLong()) Assert.assertEquals(1, networkConnection.previousResults[0].size.toLong()) Assert.assertFalse(networkConnection.previousResults[0][0].isSuccessful) - Assert.assertEquals(1, emitter.eventStore!!.size()) + Assert.assertEquals(1, emitter.eventStore.size()) emitter.flush() } @@ -272,7 +270,7 @@ class EmitterTest { Thread.sleep(600) i++ } - Assert.assertEquals(0, emitter.eventStore!!.size()) + Assert.assertEquals(0, emitter.eventStore.size()) var totEvents = 0 for (results in networkConnection.previousResults) { for (result in results) { @@ -297,7 +295,7 @@ class EmitterTest { Thread.sleep(600) i++ } - Assert.assertEquals(2, emitter.eventStore!!.size()) + Assert.assertEquals(2, emitter.eventStore.size()) for (results in networkConnection.previousResults) { for (result in results) { Assert.assertFalse(result.isSuccessful) @@ -321,7 +319,7 @@ class EmitterTest { Assert.assertEquals(1, networkConnection.previousResults.size.toLong()) Assert.assertEquals(1, networkConnection.previousResults[0].size.toLong()) Assert.assertTrue(networkConnection.previousResults[0][0].isSuccessful) - Assert.assertEquals(0, emitter.eventStore!!.size()) + Assert.assertEquals(0, emitter.eventStore.size()) emitter.flush() } @@ -337,7 +335,7 @@ class EmitterTest { Assert.assertEquals(false, emitter.emitterStatus) Assert.assertEquals(0, networkConnection.sendingCount().toLong()) Assert.assertEquals(0, networkConnection.previousResults.size.toLong()) - Assert.assertEquals(1, emitter.eventStore!!.size()) + Assert.assertEquals(1, emitter.eventStore.size()) emitter.resumeEmit() var i = 0 @@ -348,15 +346,14 @@ class EmitterTest { Assert.assertEquals(1, networkConnection.previousResults.size.toLong()) Assert.assertEquals(1, networkConnection.previousResults[0].size.toLong()) Assert.assertTrue(networkConnection.previousResults[0][0].isSuccessful) - Assert.assertEquals(0, emitter.eventStore!!.size()) + Assert.assertEquals(0, emitter.eventStore.size()) emitter.flush() } @Test @Throws(InterruptedException::class) fun testUpdatesNetworkConnectionWhileRunning() { - val builder = { emitter: Emitter -> emitter.eventStore = MockEventStore() } - val emitter = Emitter(context, "com.acme", builder) + val emitter = Emitter("ns", MockEventStore(), context, "com.acme") emitter.flush() Thread.sleep(100) Assert.assertTrue(emitter.emitterStatus) // is running @@ -378,7 +375,7 @@ class EmitterTest { } Assert.assertEquals(1, networkConnection.previousResults.size.toLong()) Assert.assertFalse(networkConnection.previousResults[0][0].isSuccessful) - Assert.assertEquals(0, emitter.eventStore!!.size()) + Assert.assertEquals(0, emitter.eventStore.size()) emitter.flush() } @@ -395,14 +392,14 @@ class EmitterTest { // no events in queue since they were dropped because retrying is disabled for 500 emitter.add(generatePayloads(1)[0]) Thread.sleep(1000) - Assert.assertEquals(0, emitter.eventStore!!.size()) + Assert.assertEquals(0, emitter.eventStore.size()) networkConnection.statusCode = 403 emitter.add(generatePayloads(1)[0]) Thread.sleep(1000) // event still in queue because retrying is enabled for 403 - Assert.assertEquals(1, emitter.eventStore!!.size()) + Assert.assertEquals(1, emitter.eventStore.size()) Assert.assertEquals(2, networkConnection.previousResults.size.toLong()) emitter.flush() } @@ -417,14 +414,14 @@ class EmitterTest { // no events in queue since they were dropped because retrying is disabled emitter.add(generatePayloads(1)[0]) Thread.sleep(1000) - Assert.assertEquals(0, emitter.eventStore!!.size()) + Assert.assertEquals(0, emitter.eventStore.size()) emitter.retryFailedRequests = true emitter.add(generatePayloads(1)[0]) Thread.sleep(1000) // event still in queue because retrying is enabled - Assert.assertEquals(1, emitter.eventStore!!.size()) + Assert.assertEquals(1, emitter.eventStore.size()) Assert.assertEquals(2, networkConnection.previousResults.size.toLong()) emitter.flush() } @@ -441,13 +438,13 @@ class EmitterTest { // all events waiting in queue Assert.assertEquals(0, networkConnection.previousResults.size) - Assert.assertEquals(9, emitter.eventStore!!.size()) + Assert.assertEquals(9, emitter.eventStore.size()) emitter.add(generatePayloads(1)[0]) Thread.sleep(1000) // all events sent - Assert.assertEquals(0, emitter.eventStore!!.size()) + Assert.assertEquals(0, emitter.eventStore.size()) Assert.assertEquals(1, networkConnection.previousResults.size) emitter.flush() } @@ -463,7 +460,7 @@ class EmitterTest { emitter.add(payload) } Thread.sleep(500) - Assert.assertEquals(20, emitter.eventStore!!.size()) + Assert.assertEquals(20, emitter.eventStore.size()) emitter.resumeEmit() Thread.sleep(500) @@ -478,7 +475,7 @@ class EmitterTest { emitter.add(payload) } Thread.sleep(500) - Assert.assertEquals(40, emitter.eventStore!!.size()) + Assert.assertEquals(40, emitter.eventStore.size()) emitter.resumeEmit() Thread.sleep(500) @@ -497,7 +494,7 @@ class EmitterTest { emitter.add(payload) } Thread.sleep(500) - Assert.assertEquals(2, emitter.eventStore!!.size()) + Assert.assertEquals(2, emitter.eventStore.size()) emitter.resumeEmit() Thread.sleep(500) @@ -519,11 +516,10 @@ class EmitterTest { emitter.emitRange = 200 emitter.byteLimitGet = 20000 emitter.byteLimitPost = 25000 - emitter.eventStore = MockEventStore() emitter.timeUnit = TimeUnit.SECONDS emitter.tlsVersions = EnumSet.of(TLSVersion.TLSv1_2) } - return Emitter(context, "com.acme", builder) + return Emitter("ns", MockEventStore(), context, "com.acme", builder) } // Service methods diff --git a/snowplow-tracker/src/androidTest/java/com/snowplowanalytics/snowplow/tracker/LoggingTest.kt b/snowplow-tracker/src/androidTest/java/com/snowplowanalytics/snowplow/tracker/LoggingTest.kt index c7bdad724..aa711ccb6 100644 --- a/snowplow-tracker/src/androidTest/java/com/snowplowanalytics/snowplow/tracker/LoggingTest.kt +++ b/snowplow-tracker/src/androidTest/java/com/snowplowanalytics/snowplow/tracker/LoggingTest.kt @@ -53,7 +53,7 @@ class LoggingTest { fun setUp() { mockLoggerDelegate = MockLoggerDelegate() val builder = { emitter: Emitter -> emitter.bufferOption = BufferOption.Single } - emitter = Emitter(ApplicationProvider.getApplicationContext(), "http://localhost", builder) + emitter = Emitter("namespace", null, ApplicationProvider.getApplicationContext(), "http://localhost", builder) networkConfig = NetworkConfiguration("http://localhost", HttpMethod.POST) } diff --git a/snowplow-tracker/src/androidTest/java/com/snowplowanalytics/snowplow/tracker/SessionTest.kt b/snowplow-tracker/src/androidTest/java/com/snowplowanalytics/snowplow/tracker/SessionTest.kt index d05c53916..6dd7d2675 100644 --- a/snowplow-tracker/src/androidTest/java/com/snowplowanalytics/snowplow/tracker/SessionTest.kt +++ b/snowplow-tracker/src/androidTest/java/com/snowplowanalytics/snowplow/tracker/SessionTest.kt @@ -210,7 +210,7 @@ class SessionTest { cleanSharedPreferences(context, TrackerConstants.SNOWPLOW_SESSION_VARS + "_tracker") val emitter = Emitter( - context, "", null + "tracker", null, context, "", null ) val trackerBuilder = { tracker: Tracker -> tracker.sessionContext = true @@ -249,7 +249,7 @@ class SessionTest { fun testBackgroundTimeSmallerThanBackgroundTimeoutDoesntCauseNewSession() { cleanSharedPreferences(context, TrackerConstants.SNOWPLOW_SESSION_VARS + "_tracker") val emitter = Emitter( - context, "", null + "tracker", null, context, "", null ) val trackerBuilder = { tracker: Tracker -> tracker.sessionContext = true @@ -331,7 +331,7 @@ class SessionTest { cleanSharedPreferences(context, TrackerConstants.SNOWPLOW_SESSION_VARS + "_tracker1") cleanSharedPreferences(context, TrackerConstants.SNOWPLOW_SESSION_VARS + "_tracker2") val emitter = Emitter( - context, "", null + "ns", null, context, "", null ) val trackerBuilder = { tracker: Tracker -> tracker.sessionContext = true diff --git a/snowplow-tracker/src/androidTest/java/com/snowplowanalytics/snowplow/tracker/integration/EventSendingTest.kt b/snowplow-tracker/src/androidTest/java/com/snowplowanalytics/snowplow/tracker/integration/EventSendingTest.kt index 09e4a138d..3412e1d92 100644 --- a/snowplow-tracker/src/androidTest/java/com/snowplowanalytics/snowplow/tracker/integration/EventSendingTest.kt +++ b/snowplow-tracker/src/androidTest/java/com/snowplowanalytics/snowplow/tracker/integration/EventSendingTest.kt @@ -53,9 +53,9 @@ class EventSendingTest { if (tracker == null) return val emitter = tracker!!.emitter tracker!!.close() - val isClean = emitter.eventStore!!.removeAllEvents() + val isClean = emitter.eventStore.removeAllEvents() Log.i("TrackerTest", "Tracker closed - EventStore cleaned: $isClean") - Log.i("TrackerTest", "Events in the store: " + emitter.eventStore!!.size()) + Log.i("TrackerTest", "Events in the store: " + emitter.eventStore.size()) } catch (e: IllegalStateException) { Log.i("TrackerTest", "Tracker already closed.") } @@ -204,7 +204,7 @@ class EventSendingTest { emitter.emptyLimit = 0 emitter.emitRange = 1 } - val emitter = Emitter(InstrumentationRegistry.getInstrumentation().targetContext, uri, builder) + val emitter = Emitter(ns, null, InstrumentationRegistry.getInstrumentation().targetContext, uri, builder) val subject = Subject(InstrumentationRegistry.getInstrumentation().targetContext, null) if (tracker != null) tracker!!.close() @@ -225,7 +225,7 @@ class EventSendingTest { InstrumentationRegistry.getInstrumentation().targetContext, trackerBuilder ) - emitter.eventStore!!.removeAllEvents() + emitter.eventStore.removeAllEvents() return tracker!! } diff --git a/snowplow-tracker/src/main/java/com/snowplowanalytics/core/emitter/Emitter.kt b/snowplow-tracker/src/main/java/com/snowplowanalytics/core/emitter/Emitter.kt index b2264e0c7..e94635618 100755 --- a/snowplow-tracker/src/main/java/com/snowplowanalytics/core/emitter/Emitter.kt +++ b/snowplow-tracker/src/main/java/com/snowplowanalytics/core/emitter/Emitter.kt @@ -38,7 +38,13 @@ import java.util.concurrent.atomic.AtomicReference * Build an emitter object which controls the * sending of events to the Snowplow Collector. */ -class Emitter(context: Context, collectorUri: String, builder: ((Emitter) -> Unit)? = null) { +class Emitter( + val namespace: String, + eventStore: EventStore?, + context: Context, + collectorUri: String, + builder: ((Emitter) -> Unit)? = null +) { private val TAG = Emitter::class.java.simpleName private var builderFinished = false @@ -85,15 +91,8 @@ class Emitter(context: Context, collectorUri: String, builder: ((Emitter) -> Uni /** * The emitter event store object */ - var eventStore: EventStore? = null - // if not set during Emitter initialisation (via builder), - // this is set as part of Tracker initialisation, as a side-effect of setting namespace - set(eventStore) { - if (field == null) { - field = eventStore - } - } - + val eventStore: EventStore = eventStore ?: SQLiteEventStore(context, namespace) + /** * This configuration option is not published in the EmitterConfiguration class. * Create an Emitter and Tracker directly, not via the Snowplow interface, to configure tlsVersions. @@ -234,17 +233,6 @@ class Emitter(context: Context, collectorUri: String, builder: ((Emitter) -> Uni } } - /** - * Emitter namespace. NB: setting the namespace has a side-effect of creating the SQLiteEventStore - */ - var namespace: String? = null - set(namespace) { - field = namespace - if (eventStore == null) { - eventStore = field?.let { SQLiteEventStore(context, it) } - } - } - /** * The maximum timeout for emitting events. If emit time exceeds this value * TimeOutException will be thrown. @@ -422,15 +410,13 @@ class Emitter(context: Context, collectorUri: String, builder: ((Emitter) -> Uni */ fun add(payload: Payload) { Executor.execute(TAG) { - eventStore?.let { eventStore -> - eventStore.add(payload) - if (eventStore.size() >= bufferOption.code && isRunning.compareAndSet(false, true)) { - try { - attemptEmit(networkConnection) - } catch (t: Throwable) { - isRunning.set(false) - Logger.e(TAG, "Received error during emission process: %s", t) - } + eventStore.add(payload) + if (eventStore.size() >= bufferOption.code && isRunning.compareAndSet(false, true)) { + try { + attemptEmit(networkConnection) + } catch (t: Throwable) { + isRunning.set(false) + Logger.e(TAG, "Received error during emission process: %s", t) } } } @@ -525,13 +511,6 @@ class Emitter(context: Context, collectorUri: String, builder: ((Emitter) -> Uni return } - if (eventStore == null) { - Logger.d(TAG, "No EventStore set.") - isRunning.compareAndSet(true, false) - return - } - val eventStore = eventStore ?: return - if (networkConnection == null) { Logger.d(TAG, "No networkConnection set.") isRunning.compareAndSet(true, false) diff --git a/snowplow-tracker/src/main/java/com/snowplowanalytics/core/tracker/ServiceProvider.kt b/snowplow-tracker/src/main/java/com/snowplowanalytics/core/tracker/ServiceProvider.kt index f51dcf9a2..a8fbaf374 100644 --- a/snowplow-tracker/src/main/java/com/snowplowanalytics/core/tracker/ServiceProvider.kt +++ b/snowplow-tracker/src/main/java/com/snowplowanalytics/core/tracker/ServiceProvider.kt @@ -236,7 +236,6 @@ class ServiceProvider( emitter.emitTimeout = networkConfiguration.timeout emitter.emitRange = emitterConfiguration.emitRange emitter.bufferOption = emitterConfiguration.bufferOption - emitter.eventStore = emitterConfiguration.eventStore emitter.byteLimitPost = emitterConfiguration.byteLimitPost emitter.byteLimitGet = emitterConfiguration.byteLimitGet emitter.threadPoolSize = emitterConfiguration.threadPoolSize @@ -247,7 +246,13 @@ class ServiceProvider( emitter.retryFailedRequests = emitterConfiguration.retryFailedRequests } - val emitter = Emitter(context, endpoint, builder) + val emitter = Emitter( + namespace = namespace, + eventStore = emitterConfiguration.eventStore, + context = context, + collectorUri = endpoint, + builder = builder + ) if (emitterConfiguration.isPaused) { emitter.pauseEmit() } diff --git a/snowplow-tracker/src/main/java/com/snowplowanalytics/core/tracker/Tracker.kt b/snowplow-tracker/src/main/java/com/snowplowanalytics/core/tracker/Tracker.kt index 1cf325092..202880504 100755 --- a/snowplow-tracker/src/main/java/com/snowplowanalytics/core/tracker/Tracker.kt +++ b/snowplow-tracker/src/main/java/com/snowplowanalytics/core/tracker/Tracker.kt @@ -390,10 +390,6 @@ class Tracker( emitter.flush() - // Setting the emitter namespace has a side-effect of creating a SQLiteEventStore, - // unless an EventStore was already provided through EmitterConfiguration - emitter.namespace = namespace - trackerVersionSuffix?.let { val suffix = it.replace("[^A-Za-z0-9.-]".toRegex(), "") if (suffix.isNotEmpty()) { From 7a7d9a5494bcb9f9cd01c56d61e73d77db0a7983 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Matu=CC=81s=CC=8C=20Tomlein?= Date: Thu, 18 Jan 2024 15:39:00 +0100 Subject: [PATCH 07/21] Change default emit timeout from 5 seconds to 30 seconds (close #658) --- .../java/com/snowplowanalytics/core/emitter/EmitterDefaults.kt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/snowplow-tracker/src/main/java/com/snowplowanalytics/core/emitter/EmitterDefaults.kt b/snowplow-tracker/src/main/java/com/snowplowanalytics/core/emitter/EmitterDefaults.kt index 5eec3de99..04283f0a5 100644 --- a/snowplow-tracker/src/main/java/com/snowplowanalytics/core/emitter/EmitterDefaults.kt +++ b/snowplow-tracker/src/main/java/com/snowplowanalytics/core/emitter/EmitterDefaults.kt @@ -29,7 +29,7 @@ object EmitterDefaults { var emptyLimit = 5 var byteLimitGet: Long = 40000 var byteLimitPost: Long = 40000 - var emitTimeout = 5 + var emitTimeout = 30 var threadPoolSize = 15 var serverAnonymisation = false var retryFailedRequests = true From 5691cf57472949cc67e1599b59557ca36240d1de Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Matu=CC=81s=CC=8C=20Tomlein?= Date: Thu, 18 Jan 2024 15:40:18 +0100 Subject: [PATCH 08/21] Fix returning error from network connection requests --- .../snowplow/network/OkHttpNetworkConnection.kt | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/snowplow-tracker/src/main/java/com/snowplowanalytics/snowplow/network/OkHttpNetworkConnection.kt b/snowplow-tracker/src/main/java/com/snowplowanalytics/snowplow/network/OkHttpNetworkConnection.kt index 249dfccc4..893e78e9f 100644 --- a/snowplow-tracker/src/main/java/com/snowplowanalytics/snowplow/network/OkHttpNetworkConnection.kt +++ b/snowplow-tracker/src/main/java/com/snowplowanalytics/snowplow/network/OkHttpNetworkConnection.kt @@ -361,7 +361,7 @@ class OkHttpNetworkConnection private constructor(builder: OkHttpNetworkConnecti * @return a RequestResult */ private fun requestSender(request: okhttp3.Request): Int { - return try { + try { Logger.v(TAG, "Sending request: %s", request) TrafficStats.setThreadStatsTag(TRAFFIC_STATS_TAG) val resp = client?.newCall(request)?.execute() @@ -369,10 +369,10 @@ class OkHttpNetworkConnection private constructor(builder: OkHttpNetworkConnecti resp.body?.close() return resp.code } - -1 + return -1 } catch (e: IOException) { Logger.e(TAG, "Request sending failed: %s", e.toString()) - -1 + return -1 } } From 565b0090ee9d0030a993c62083ce0b372be380e5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Matu=CC=81s=CC=8C=20Tomlein?= Date: Thu, 18 Jan 2024 18:17:42 +0100 Subject: [PATCH 09/21] Remove unused threadCount property from Tracker --- .../snowplow/internal/tracker/TrackerTest.kt | 2 -- .../com/snowplowanalytics/core/tracker/Tracker.kt | 12 ------------ 2 files changed, 14 deletions(-) diff --git a/snowplow-tracker/src/androidTest/java/com/snowplowanalytics/snowplow/internal/tracker/TrackerTest.kt b/snowplow-tracker/src/androidTest/java/com/snowplowanalytics/snowplow/internal/tracker/TrackerTest.kt index 5b3ef17ea..7070be37c 100755 --- a/snowplow-tracker/src/androidTest/java/com/snowplowanalytics/snowplow/internal/tracker/TrackerTest.kt +++ b/snowplow-tracker/src/androidTest/java/com/snowplowanalytics/snowplow/internal/tracker/TrackerTest.kt @@ -91,7 +91,6 @@ class TrackerTest { tracker.platform = DevicePlatform.InternetOfThings tracker.base64Encoded = false tracker.logLevel = LogLevel.VERBOSE - tracker.threadCount = 1 tracker.sessionContext = false tracker.platformContextEnabled = false tracker.geoLocationContext = false @@ -121,7 +120,6 @@ class TrackerTest { Assert.assertNotNull(tracker.emitter) Assert.assertNotNull(tracker.subject) Assert.assertEquals(LogLevel.VERBOSE, tracker.logLevel) - Assert.assertEquals(2, tracker.threadCount.toLong()) Assert.assertFalse(tracker.exceptionAutotracking) Assert.assertTrue(tracker.lifecycleAutotracking) Assert.assertTrue(tracker.installAutotracking) diff --git a/snowplow-tracker/src/main/java/com/snowplowanalytics/core/tracker/Tracker.kt b/snowplow-tracker/src/main/java/com/snowplowanalytics/core/tracker/Tracker.kt index 202880504..668f5c68b 100755 --- a/snowplow-tracker/src/main/java/com/snowplowanalytics/core/tracker/Tracker.kt +++ b/snowplow-tracker/src/main/java/com/snowplowanalytics/core/tracker/Tracker.kt @@ -20,7 +20,6 @@ import com.snowplowanalytics.core.emitter.Executor.execute import com.snowplowanalytics.core.gdpr.Gdpr import com.snowplowanalytics.core.screenviews.ScreenState import com.snowplowanalytics.core.screenviews.ScreenStateMachine -import com.snowplowanalytics.core.screenviews.ScreenSummaryState import com.snowplowanalytics.core.screenviews.ScreenSummaryStateMachine import com.snowplowanalytics.core.session.ProcessObserver.Companion.initialize import com.snowplowanalytics.core.session.Session @@ -130,17 +129,6 @@ class Tracker( } } - /** - * This configuration option is not published in the TrackerConfiguration class. - * Create a Tracker directly, not via the Snowplow interface, to configure threadCount. - */ - var threadCount: Int = TrackerDefaults.threadCount - set(threadCount) { - if (!builderFinished) { - field = max(threadCount, 2) - } - } - /** * This configuration option is not published in the TrackerConfiguration class. * Create a Tracker directly, not via the Snowplow interface, to configure timeUnit. From 1789fe54fc9bcf64d4a8ce4d3d4f8da05b93d96f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Matu=CC=81s=CC=8C=20Tomlein?= Date: Thu, 18 Jan 2024 18:20:12 +0100 Subject: [PATCH 10/21] Set default thread count in Executor to match the default thread pool size in the Emitter --- .../main/java/com/snowplowanalytics/core/emitter/Executor.kt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/snowplow-tracker/src/main/java/com/snowplowanalytics/core/emitter/Executor.kt b/snowplow-tracker/src/main/java/com/snowplowanalytics/core/emitter/Executor.kt index 78bf75c9d..99069b96d 100755 --- a/snowplow-tracker/src/main/java/com/snowplowanalytics/core/emitter/Executor.kt +++ b/snowplow-tracker/src/main/java/com/snowplowanalytics/core/emitter/Executor.kt @@ -27,7 +27,7 @@ import java.util.concurrent.Future object Executor { private var executor: ExecutorService? = null - var threadCount = 2 // Minimum amount of threads. + var threadCount = EmitterDefaults.threadPoolSize /** * Changes the amount of threads the scheduler will be able to use. * From a472a2e3edf64365987cd75c445f3876e61074bd Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Matu=CC=81s=CC=8C=20Tomlein?= Date: Wed, 17 Jan 2024 17:51:06 +0100 Subject: [PATCH 11/21] Remove optional types in event store interface PR #661 --- .../snowplow/internal/emitter/storage/EventStoreTest.kt | 2 +- .../snowplowanalytics/snowplow/tracker/MockEventStore.kt | 6 +++--- .../main/java/com/snowplowanalytics/core/emitter/Emitter.kt | 2 +- .../core/emitter/storage/SQLiteEventStore.kt | 6 +++--- .../com/snowplowanalytics/snowplow/emitter/EventStore.kt | 4 ++-- .../com/snowplowanalytics/snowplow/network/RequestResult.kt | 2 +- 6 files changed, 11 insertions(+), 11 deletions(-) diff --git a/snowplow-tracker/src/androidTest/java/com/snowplowanalytics/snowplow/internal/emitter/storage/EventStoreTest.kt b/snowplow-tracker/src/androidTest/java/com/snowplowanalytics/snowplow/internal/emitter/storage/EventStoreTest.kt index 3c6a7c262..500b3e4b2 100755 --- a/snowplow-tracker/src/androidTest/java/com/snowplowanalytics/snowplow/internal/emitter/storage/EventStoreTest.kt +++ b/snowplow-tracker/src/androidTest/java/com/snowplowanalytics/snowplow/internal/emitter/storage/EventStoreTest.kt @@ -166,7 +166,7 @@ class EventStoreTest { @Throws(InterruptedException::class) fun testRemoveRangeOfEvents() { val eventStore = eventStore() - val idList: MutableList = ArrayList() + val idList: MutableList = ArrayList() idList.add(eventStore.insertEvent(payload())) idList.add(eventStore.insertEvent(payload())) idList.add(eventStore.insertEvent(payload())) diff --git a/snowplow-tracker/src/androidTest/java/com/snowplowanalytics/snowplow/tracker/MockEventStore.kt b/snowplow-tracker/src/androidTest/java/com/snowplowanalytics/snowplow/tracker/MockEventStore.kt index 71671c56f..d55255a82 100644 --- a/snowplow-tracker/src/androidTest/java/com/snowplowanalytics/snowplow/tracker/MockEventStore.kt +++ b/snowplow-tracker/src/androidTest/java/com/snowplowanalytics/snowplow/tracker/MockEventStore.kt @@ -38,7 +38,7 @@ class MockEventStore : EventStore { } } - override fun removeEvents(ids: MutableList): Boolean { + override fun removeEvents(ids: MutableList): Boolean { var result = true for (id in ids) { val removed = removeEvent(id!!) @@ -60,11 +60,11 @@ class MockEventStore : EventStore { return db.size.toLong() } - override fun getEmittableEvents(queryLimit: Int): List { + override fun getEmittableEvents(queryLimit: Int): List { synchronized(this) { val eventIds: MutableList = ArrayList() val eventPayloads: MutableList = ArrayList() - var events: MutableList = ArrayList() + var events: MutableList = ArrayList() for ((key, value) in db) { val payloadCopy: Payload = TrackerPayload() payloadCopy.addMap(value!!.map) diff --git a/snowplow-tracker/src/main/java/com/snowplowanalytics/core/emitter/Emitter.kt b/snowplow-tracker/src/main/java/com/snowplowanalytics/core/emitter/Emitter.kt index e94635618..fe54bc4eb 100755 --- a/snowplow-tracker/src/main/java/com/snowplowanalytics/core/emitter/Emitter.kt +++ b/snowplow-tracker/src/main/java/com/snowplowanalytics/core/emitter/Emitter.kt @@ -544,7 +544,7 @@ class Emitter( var successCount = 0 var failedWillRetryCount = 0 var failedWontRetryCount = 0 - val removableEvents: MutableList = ArrayList() + val removableEvents: MutableList = ArrayList() for (res in results) { if (res.isSuccessful) { diff --git a/snowplow-tracker/src/main/java/com/snowplowanalytics/core/emitter/storage/SQLiteEventStore.kt b/snowplow-tracker/src/main/java/com/snowplowanalytics/core/emitter/storage/SQLiteEventStore.kt index 55c4000bd..6266cedad 100755 --- a/snowplow-tracker/src/main/java/com/snowplowanalytics/core/emitter/storage/SQLiteEventStore.kt +++ b/snowplow-tracker/src/main/java/com/snowplowanalytics/core/emitter/storage/SQLiteEventStore.kt @@ -135,7 +135,7 @@ class SQLiteEventStore(context: Context, private val namespace: String) : EventS return retval == 1 } - override fun removeEvents(ids: MutableList): Boolean { + override fun removeEvents(ids: MutableList): Boolean { if (ids.isEmpty()) { return false } @@ -215,12 +215,12 @@ class SQLiteEventStore(context: Context, private val namespace: String) : EventS } } - override fun getEmittableEvents(queryLimit: Int): List { + override fun getEmittableEvents(queryLimit: Int): List { if (!databaseOpen) { return emptyList() } insertWaitingEventsIfReady() - val events = ArrayList() + val events = ArrayList() // FIFO Pattern for sending events for (eventMetadata in getDescEventsInRange(queryLimit)) { diff --git a/snowplow-tracker/src/main/java/com/snowplowanalytics/snowplow/emitter/EventStore.kt b/snowplow-tracker/src/main/java/com/snowplowanalytics/snowplow/emitter/EventStore.kt index 609f620e6..b7a1e5acd 100644 --- a/snowplow-tracker/src/main/java/com/snowplowanalytics/snowplow/emitter/EventStore.kt +++ b/snowplow-tracker/src/main/java/com/snowplowanalytics/snowplow/emitter/EventStore.kt @@ -36,7 +36,7 @@ interface EventStore { * @param ids the events' identifiers in the store. * @return a boolean of success to remove. */ - fun removeEvents(ids: MutableList): Boolean + fun removeEvents(ids: MutableList): Boolean /** * Empties the store of all the events. @@ -54,5 +54,5 @@ interface EventStore { * Returns a list of [EmitterEvent] objects which contain events and related IDs. * @return EmitterEvent objects containing eventIds and event payloads. */ - fun getEmittableEvents(queryLimit: Int): List + fun getEmittableEvents(queryLimit: Int): List } diff --git a/snowplow-tracker/src/main/java/com/snowplowanalytics/snowplow/network/RequestResult.kt b/snowplow-tracker/src/main/java/com/snowplowanalytics/snowplow/network/RequestResult.kt index 2fbf9dc6d..5be0508a0 100755 --- a/snowplow-tracker/src/main/java/com/snowplowanalytics/snowplow/network/RequestResult.kt +++ b/snowplow-tracker/src/main/java/com/snowplowanalytics/snowplow/network/RequestResult.kt @@ -23,7 +23,7 @@ import java.util.* class RequestResult( val statusCode: Int, val oversize: Boolean, - val eventIds: List + val eventIds: List ) { /** * @return the requests success status From e56da1819544764732f20f13b2f5be28845ae31a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Matu=CC=81s=CC=8C=20Tomlein?= Date: Wed, 17 Jan 2024 17:52:45 +0100 Subject: [PATCH 12/21] Add configurable limit for the maximum age and number of events in the event store and remove old events before sending (close #660) PR #661 --- .../emitter/storage/EventStoreTest.kt | 56 +++++++++++++++++++ .../snowplow/tracker/MockEventStore.kt | 5 ++ .../snowplowanalytics/core/emitter/Emitter.kt | 17 ++++++ .../emitter/EmitterConfigurationInterface.kt | 13 +++++ .../core/emitter/EmitterControllerImpl.kt | 15 +++++ .../core/emitter/EmitterDefaults.kt | 4 ++ .../core/emitter/storage/SQLiteEventStore.kt | 20 +++++++ .../core/tracker/ServiceProvider.kt | 2 + .../configuration/EmitterConfiguration.kt | 35 ++++++++++++ .../snowplow/emitter/EventStore.kt | 8 +++ 10 files changed, 175 insertions(+) diff --git a/snowplow-tracker/src/androidTest/java/com/snowplowanalytics/snowplow/internal/emitter/storage/EventStoreTest.kt b/snowplow-tracker/src/androidTest/java/com/snowplowanalytics/snowplow/internal/emitter/storage/EventStoreTest.kt index 500b3e4b2..27c649cf4 100755 --- a/snowplow-tracker/src/androidTest/java/com/snowplowanalytics/snowplow/internal/emitter/storage/EventStoreTest.kt +++ b/snowplow-tracker/src/androidTest/java/com/snowplowanalytics/snowplow/internal/emitter/storage/EventStoreTest.kt @@ -27,6 +27,8 @@ import org.junit.Before import org.junit.Test import org.junit.runner.RunWith import java.util.* +import kotlin.time.DurationUnit +import kotlin.time.toDuration @RunWith(AndroidJUnit4::class) class EventStoreTest { @@ -311,6 +313,60 @@ class EventStoreTest { Assert.assertEquals(2, eventStore2.size()) } + @Test + fun testRemoveOldEventsByAge() { + val context = InstrumentationRegistry.getInstrumentation().targetContext + val eventStore = SQLiteEventStore(context, "namespace") + openedEventStores.add(eventStore) + waitUntilDatabaseOpen(eventStore) + + for (i in 1..5) { + val payload = TrackerPayload() + payload.add("eid", i.toString()) + eventStore.insertEvent(payload) + } + + Thread.sleep(2000) + + for (i in 6..10) { + val payload = TrackerPayload() + payload.add("eid", i.toString()) + eventStore.insertEvent(payload) + } + + Assert.assertEquals(10, eventStore.size()) + + eventStore.removeOldEvents(10, 1.toDuration(DurationUnit.SECONDS)) + + Assert.assertEquals(5, eventStore.size()) + val events = eventStore.getEmittableEvents(10) + val eventIds = events.map { it.payload.map["eid"] as String } + Assert.assertEquals(listOf("10", "6", "7", "8", "9"), eventIds.sorted()) + } + + @Test + fun testRemoveOldestEventsByMaxSize() { + val context = InstrumentationRegistry.getInstrumentation().targetContext + val eventStore = SQLiteEventStore(context, "namespace") + openedEventStores.add(eventStore) + waitUntilDatabaseOpen(eventStore) + + for (i in 1..5) { + val trackerPayload = TrackerPayload() + trackerPayload.add("eid", "$i") + eventStore.insertEvent(trackerPayload) + } + + Assert.assertEquals(5, eventStore.size()) + + eventStore.removeOldEvents(3, 10.toDuration(DurationUnit.MINUTES)) + + Assert.assertEquals(3, eventStore.size()) + val events = eventStore.getEmittableEvents(10) + val eventIds = events.map { it.payload.map["eid"] as String } + Assert.assertEquals(listOf("3", "4", "5"), eventIds.sorted()) + } + // Helper Methods @Throws(InterruptedException::class) diff --git a/snowplow-tracker/src/androidTest/java/com/snowplowanalytics/snowplow/tracker/MockEventStore.kt b/snowplow-tracker/src/androidTest/java/com/snowplowanalytics/snowplow/tracker/MockEventStore.kt index d55255a82..07b1a1310 100644 --- a/snowplow-tracker/src/androidTest/java/com/snowplowanalytics/snowplow/tracker/MockEventStore.kt +++ b/snowplow-tracker/src/androidTest/java/com/snowplowanalytics/snowplow/tracker/MockEventStore.kt @@ -19,6 +19,7 @@ import com.snowplowanalytics.snowplow.emitter.EmitterEvent import com.snowplowanalytics.snowplow.payload.TrackerPayload import java.util.ArrayList import java.util.HashMap +import kotlin.time.Duration class MockEventStore : EventStore { var db = HashMap() @@ -81,4 +82,8 @@ class MockEventStore : EventStore { return events } } + + override fun removeOldEvents(maxSize: Long, maxAge: Duration) { + // "Not implemented in the mock event store" + } } diff --git a/snowplow-tracker/src/main/java/com/snowplowanalytics/core/emitter/Emitter.kt b/snowplow-tracker/src/main/java/com/snowplowanalytics/core/emitter/Emitter.kt index fe54bc4eb..849eb50b5 100755 --- a/snowplow-tracker/src/main/java/com/snowplowanalytics/core/emitter/Emitter.kt +++ b/snowplow-tracker/src/main/java/com/snowplowanalytics/core/emitter/Emitter.kt @@ -33,6 +33,7 @@ import java.util.* import java.util.concurrent.TimeUnit import java.util.concurrent.atomic.AtomicBoolean import java.util.concurrent.atomic.AtomicReference +import kotlin.time.Duration /** * Build an emitter object which controls the @@ -359,6 +360,16 @@ class Emitter( } } + /** + * Limit for the maximum number of unsent events to keep in the event store. + */ + var maxEventStoreSize: Long = EmitterDefaults.maxEventStoreSize + + /** + * Limit for the maximum duration of how long events should be kept in the event store if they fail to be sent. + */ + var maxEventStoreAge: Duration = EmitterDefaults.maxEventStoreAge + /** * Creates an emitter object */ @@ -413,6 +424,7 @@ class Emitter( eventStore.add(payload) if (eventStore.size() >= bufferOption.code && isRunning.compareAndSet(false, true)) { try { + removeOldEvents() attemptEmit(networkConnection) } catch (t: Throwable) { isRunning.set(false) @@ -430,6 +442,7 @@ class Emitter( Executor.execute(TAG) { if (isRunning.compareAndSet(false, true)) { try { + removeOldEvents() attemptEmit(networkConnection) } catch (t: Throwable) { isRunning.set(false) @@ -484,6 +497,10 @@ class Emitter( } } + private fun removeOldEvents() { + eventStore.removeOldEvents(maxEventStoreSize, maxEventStoreAge) + } + /** * Attempts to send events in the database to a collector. * diff --git a/snowplow-tracker/src/main/java/com/snowplowanalytics/core/emitter/EmitterConfigurationInterface.kt b/snowplow-tracker/src/main/java/com/snowplowanalytics/core/emitter/EmitterConfigurationInterface.kt index defabd276..bae69d0b6 100644 --- a/snowplow-tracker/src/main/java/com/snowplowanalytics/core/emitter/EmitterConfigurationInterface.kt +++ b/snowplow-tracker/src/main/java/com/snowplowanalytics/core/emitter/EmitterConfigurationInterface.kt @@ -15,6 +15,7 @@ package com.snowplowanalytics.core.emitter import com.snowplowanalytics.snowplow.emitter.BufferOption import com.snowplowanalytics.snowplow.emitter.EventStore import com.snowplowanalytics.snowplow.network.RequestCallback +import kotlin.time.Duration interface EmitterConfigurationInterface { /** @@ -71,4 +72,16 @@ interface EmitterConfigurationInterface { * If disabled, events that failed to be sent will be dropped regardless of other configuration (such as the customRetryForStatusCodes). */ var retryFailedRequests: Boolean + + /** + * Limit for the maximum duration of how long events should be kept in the event store if they fail to be sent. + * Defaults to 30 days. + */ + var maxEventStoreAge: Duration + + /** + * Limit for the maximum number of unsent events to keep in the event store. + * Defaults to 1000. + */ + var maxEventStoreSize: Long } diff --git a/snowplow-tracker/src/main/java/com/snowplowanalytics/core/emitter/EmitterControllerImpl.kt b/snowplow-tracker/src/main/java/com/snowplowanalytics/core/emitter/EmitterControllerImpl.kt index e86025a53..03e51374e 100644 --- a/snowplow-tracker/src/main/java/com/snowplowanalytics/core/emitter/EmitterControllerImpl.kt +++ b/snowplow-tracker/src/main/java/com/snowplowanalytics/core/emitter/EmitterControllerImpl.kt @@ -21,6 +21,7 @@ import com.snowplowanalytics.snowplow.controller.EmitterController import com.snowplowanalytics.snowplow.emitter.BufferOption import com.snowplowanalytics.snowplow.emitter.EventStore import com.snowplowanalytics.snowplow.network.RequestCallback +import kotlin.time.Duration @RestrictTo(RestrictTo.Scope.LIBRARY) class EmitterControllerImpl(serviceProvider: ServiceProviderInterface) : @@ -91,6 +92,20 @@ class EmitterControllerImpl(serviceProvider: ServiceProviderInterface) : emitter.retryFailedRequests = value } + override var maxEventStoreAge: Duration + get() = emitter.maxEventStoreAge + set(value) { + dirtyConfig.maxEventStoreAge = value + emitter.maxEventStoreAge = value + } + + override var maxEventStoreSize: Long + get() = emitter.maxEventStoreSize + set(value) { + dirtyConfig.maxEventStoreSize = value + emitter.maxEventStoreSize = value + } + override val dbCount: Long get() { val eventStore = emitter.eventStore diff --git a/snowplow-tracker/src/main/java/com/snowplowanalytics/core/emitter/EmitterDefaults.kt b/snowplow-tracker/src/main/java/com/snowplowanalytics/core/emitter/EmitterDefaults.kt index 04283f0a5..8a5c96b58 100644 --- a/snowplow-tracker/src/main/java/com/snowplowanalytics/core/emitter/EmitterDefaults.kt +++ b/snowplow-tracker/src/main/java/com/snowplowanalytics/core/emitter/EmitterDefaults.kt @@ -18,6 +18,8 @@ import com.snowplowanalytics.snowplow.network.Protocol import java.util.* import java.util.concurrent.TimeUnit +import kotlin.time.DurationUnit +import kotlin.time.toDuration object EmitterDefaults { var httpMethod = HttpMethod.POST @@ -34,4 +36,6 @@ object EmitterDefaults { var serverAnonymisation = false var retryFailedRequests = true var timeUnit = TimeUnit.SECONDS + var maxEventStoreAge = 30.toDuration(DurationUnit.DAYS) + var maxEventStoreSize: Long = 1000 } diff --git a/snowplow-tracker/src/main/java/com/snowplowanalytics/core/emitter/storage/SQLiteEventStore.kt b/snowplow-tracker/src/main/java/com/snowplowanalytics/core/emitter/storage/SQLiteEventStore.kt index 6266cedad..a2fc02a4b 100755 --- a/snowplow-tracker/src/main/java/com/snowplowanalytics/core/emitter/storage/SQLiteEventStore.kt +++ b/snowplow-tracker/src/main/java/com/snowplowanalytics/core/emitter/storage/SQLiteEventStore.kt @@ -25,6 +25,7 @@ import com.snowplowanalytics.snowplow.emitter.EmitterEvent import com.snowplowanalytics.snowplow.emitter.EventStore import com.snowplowanalytics.snowplow.payload.Payload import com.snowplowanalytics.snowplow.payload.TrackerPayload +import kotlin.time.Duration /** * Helper class for storing, getting and removing @@ -163,6 +164,25 @@ class SQLiteEventStore(context: Context, private val namespace: String) : EventS return retval >= 0 } + override fun removeOldEvents(maxSize: Long, maxAge: Duration) { + if (databaseOpen) { + insertWaitingEventsIfReady() + + database?.execSQL( + """ + DELETE FROM ${EventStoreHelper.TABLE_EVENTS} + WHERE ${EventStoreHelper.COLUMN_ID} NOT IN ( + SELECT ${EventStoreHelper.COLUMN_ID} + FROM ${EventStoreHelper.TABLE_EVENTS} + WHERE ${EventStoreHelper.COLUMN_DATE_CREATED} >= datetime('now','-${maxAge.inWholeSeconds} seconds') + ORDER BY ${EventStoreHelper.COLUMN_DATE_CREATED} DESC, ${EventStoreHelper.COLUMN_ID} DESC + LIMIT $maxSize + ) + """.trimIndent() + ) + } + } + /** * Returns the events that validate a * specific query. diff --git a/snowplow-tracker/src/main/java/com/snowplowanalytics/core/tracker/ServiceProvider.kt b/snowplow-tracker/src/main/java/com/snowplowanalytics/core/tracker/ServiceProvider.kt index a8fbaf374..1822196d5 100644 --- a/snowplow-tracker/src/main/java/com/snowplowanalytics/core/tracker/ServiceProvider.kt +++ b/snowplow-tracker/src/main/java/com/snowplowanalytics/core/tracker/ServiceProvider.kt @@ -244,6 +244,8 @@ class ServiceProvider( emitter.serverAnonymisation = emitterConfiguration.serverAnonymisation emitter.requestHeaders = networkConfiguration.requestHeaders emitter.retryFailedRequests = emitterConfiguration.retryFailedRequests + emitter.maxEventStoreAge = emitterConfiguration.maxEventStoreAge + emitter.maxEventStoreSize = emitterConfiguration.maxEventStoreSize } val emitter = Emitter( diff --git a/snowplow-tracker/src/main/java/com/snowplowanalytics/snowplow/configuration/EmitterConfiguration.kt b/snowplow-tracker/src/main/java/com/snowplowanalytics/snowplow/configuration/EmitterConfiguration.kt index 8fba66395..5578a30ee 100644 --- a/snowplow-tracker/src/main/java/com/snowplowanalytics/snowplow/configuration/EmitterConfiguration.kt +++ b/snowplow-tracker/src/main/java/com/snowplowanalytics/snowplow/configuration/EmitterConfiguration.kt @@ -18,6 +18,9 @@ import com.snowplowanalytics.snowplow.emitter.BufferOption import com.snowplowanalytics.snowplow.emitter.EventStore import com.snowplowanalytics.snowplow.network.RequestCallback import org.json.JSONObject +import kotlin.time.Duration +import kotlin.time.DurationUnit +import kotlin.time.toDuration /** * Configure how the tracker should send the events to the collector. @@ -92,6 +95,16 @@ open class EmitterConfiguration() : Configuration, EmitterConfigurationInterface override var retryFailedRequests: Boolean get() = _retryFailedRequests ?: sourceConfig?.retryFailedRequests ?: EmitterDefaults.retryFailedRequests set(value) { _retryFailedRequests = value } + + private var _maxEventStoreAge: Duration? = null + override var maxEventStoreAge: Duration + get() = _maxEventStoreAge ?: sourceConfig?.maxEventStoreAge ?: EmitterDefaults.maxEventStoreAge + set(value) { _maxEventStoreAge = value } + + private var _maxEventStoreSize: Long? = null + override var maxEventStoreSize: Long + get() = _maxEventStoreSize ?: sourceConfig?.maxEventStoreSize ?: EmitterDefaults.maxEventStoreSize + set(value) { _maxEventStoreSize = value } // Builders @@ -183,6 +196,24 @@ open class EmitterConfiguration() : Configuration, EmitterConfigurationInterface return this } + /** + * Limit for the maximum duration of how long events should be kept in the event store if they fail to be sent. + * Defaults to 30 days. + */ + fun maxEventStoreAge(maxEventStoreAge: Duration): EmitterConfiguration { + this.maxEventStoreAge = maxEventStoreAge + return this + } + + /** + * Limit for the maximum number of unsent events to keep in the event store. + * Defaults to 1000. + */ + fun maxEventStoreSize(maxEventStoreSize: Long): EmitterConfiguration { + this.maxEventStoreSize = maxEventStoreSize + return this + } + // Copyable override fun copy(): EmitterConfiguration { return EmitterConfiguration() @@ -196,6 +227,8 @@ open class EmitterConfiguration() : Configuration, EmitterConfigurationInterface .customRetryForStatusCodes(customRetryForStatusCodes) .serverAnonymisation(serverAnonymisation) .retryFailedRequests(retryFailedRequests) + .maxEventStoreSize(maxEventStoreSize) + .maxEventStoreAge(maxEventStoreAge) } // JSON Formatter @@ -222,5 +255,7 @@ open class EmitterConfiguration() : Configuration, EmitterConfigurationInterface _customRetryForStatusCodes = customRetryForStatusCodes } if (jsonObject.has("retryFailedRequests")) { _retryFailedRequests = jsonObject.getBoolean("retryFailedRequests") } + if (jsonObject.has("maxEventStoreAge")) { _maxEventStoreAge = jsonObject.getDouble("maxEventStoreAge").toDuration(DurationUnit.SECONDS) } + if (jsonObject.has("maxEventStoreSize")) { _maxEventStoreSize = jsonObject.getLong("maxEventStoreSize") } } } diff --git a/snowplow-tracker/src/main/java/com/snowplowanalytics/snowplow/emitter/EventStore.kt b/snowplow-tracker/src/main/java/com/snowplowanalytics/snowplow/emitter/EventStore.kt index b7a1e5acd..aa4950d4a 100644 --- a/snowplow-tracker/src/main/java/com/snowplowanalytics/snowplow/emitter/EventStore.kt +++ b/snowplow-tracker/src/main/java/com/snowplowanalytics/snowplow/emitter/EventStore.kt @@ -13,6 +13,7 @@ package com.snowplowanalytics.snowplow.emitter import com.snowplowanalytics.snowplow.payload.Payload +import kotlin.time.Duration /** * The component that persists and buffers events before sending. @@ -55,4 +56,11 @@ interface EventStore { * @return EmitterEvent objects containing eventIds and event payloads. */ fun getEmittableEvents(queryLimit: Int): List + + /** + * Remove events older than `maxAge` seconds and keep only the latest `maxSize` events. + * @param maxSize the maximum number of events to keep. + * @param maxAge the maximum age of events to keep. + */ + fun removeOldEvents(maxSize: Long, maxAge: Duration) } From c51096dec9474f7313f5ccdf2b4bbe4493372df3 Mon Sep 17 00:00:00 2001 From: Miranda Wilson Date: Thu, 25 Jan 2024 16:45:18 +0000 Subject: [PATCH 13/21] Fix demo crash when using R8 full mode (close #652) (#663) * Add R8 to compose demo * Add rules to allow reflection --- gradle.properties | 1 + snowplow-demo-compose/build.gradle | 8 +++++++- snowplow-demo-compose/proguard-rules.pro | 17 ++++++++++++++++- .../src/main/AndroidManifest.xml | 5 ++++- snowplow-demo-kotlin/proguard-rules.pro | 11 ++++++++++- 5 files changed, 38 insertions(+), 4 deletions(-) diff --git a/gradle.properties b/gradle.properties index 80dd62f3a..0b209a0e1 100644 --- a/gradle.properties +++ b/gradle.properties @@ -50,3 +50,4 @@ POM_LICENCE_DIST=repo POM_DEVELOPER_ID=snowplow POM_DEVELOPER_NAME=Snowplow Analytics +android.enableR8.fullMode=true diff --git a/snowplow-demo-compose/build.gradle b/snowplow-demo-compose/build.gradle index dfaaf2683..b1e9de342 100644 --- a/snowplow-demo-compose/build.gradle +++ b/snowplow-demo-compose/build.gradle @@ -20,7 +20,8 @@ android { buildTypes { release { - minifyEnabled false + minifyEnabled true + shrinkResources true proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro' } } @@ -60,6 +61,11 @@ dependencies { implementation fileTree(dir: 'libs', include: ['*.jar']) implementation project(':snowplow-android-tracker') + + implementation 'com.google.android.gms:play-services-appset:16.0.2' + implementation 'com.google.android.gms:play-services-ads:22.6.0' + implementation 'com.google.android.gms:play-services-ads-identifier:18.0.1' + implementation "com.android.installreferrer:installreferrer:2.2" implementation "com.squareup.retrofit2:retrofit:2.9.0" implementation "com.squareup.retrofit2:converter-gson:2.0.0" diff --git a/snowplow-demo-compose/proguard-rules.pro b/snowplow-demo-compose/proguard-rules.pro index 481bb4348..9a6d869ed 100644 --- a/snowplow-demo-compose/proguard-rules.pro +++ b/snowplow-demo-compose/proguard-rules.pro @@ -18,4 +18,19 @@ # If you keep the line number information, uncomment this to # hide the original source file name. -#-renamesourcefileattribute SourceFile \ No newline at end of file +#-renamesourcefileattribute SourceFile + +# Fixes R8 full mode crash +# Also see https://github.com/square/retrofit/issues/3751 +-keep,allowobfuscation,allowshrinking interface retrofit2.Call +-keep,allowobfuscation,allowshrinking class retrofit2.Response +-keep,allowobfuscation,allowshrinking class kotlin.coroutines.Continuation + +# Reflection for the appSetId +-keep class com.google.android.gms.appset.AppSet { *; } +-keep class com.google.android.gms.appset.AppSetIdInfo { *; } +-keep class com.google.android.gms.internal.appset.zzr { *; } +-keep class com.google.android.gms.tasks.Tasks { *; } + +# Reflection for the AAID (AndroidIdfa) +-keep class com.google.android.gms.ads.identifier.** { *; } diff --git a/snowplow-demo-compose/src/main/AndroidManifest.xml b/snowplow-demo-compose/src/main/AndroidManifest.xml index 95533d36f..57b68396a 100644 --- a/snowplow-demo-compose/src/main/AndroidManifest.xml +++ b/snowplow-demo-compose/src/main/AndroidManifest.xml @@ -13,6 +13,10 @@ android:roundIcon="@mipmap/ic_launcher_round" android:supportsRtl="true" android:theme="@style/Theme.Snowplowandroidtracker"> + + - diff --git a/snowplow-demo-kotlin/proguard-rules.pro b/snowplow-demo-kotlin/proguard-rules.pro index 481bb4348..cfd85d998 100644 --- a/snowplow-demo-kotlin/proguard-rules.pro +++ b/snowplow-demo-kotlin/proguard-rules.pro @@ -18,4 +18,13 @@ # If you keep the line number information, uncomment this to # hide the original source file name. -#-renamesourcefileattribute SourceFile \ No newline at end of file +#-renamesourcefileattribute SourceFile + +# Reflection for the appSetId +-keep class com.google.android.gms.appset.AppSet { *; } +-keep class com.google.android.gms.appset.AppSetIdInfo { *; } +-keep class com.google.android.gms.internal.appset.zzr { *; } +-keep class com.google.android.gms.tasks.Tasks { *; } + +# Reflection for the AAID (AndroidIdfa) +-keep class com.google.android.gms.ads.identifier.** { *; } From 394d907b5b8ef39243c8995b4770308bf9a12b00 Mon Sep 17 00:00:00 2001 From: Miranda Wilson Date: Fri, 26 Jan 2024 17:06:53 +0000 Subject: [PATCH 14/21] Undeprecate PageView event (close #665) * Undeprecate PageView event * Put comment back --- .../java/com/snowplowanalytics/snowplow/event/PageView.kt | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/snowplow-tracker/src/main/java/com/snowplowanalytics/snowplow/event/PageView.kt b/snowplow-tracker/src/main/java/com/snowplowanalytics/snowplow/event/PageView.kt index c2d33a4ba..da04a931b 100644 --- a/snowplow-tracker/src/main/java/com/snowplowanalytics/snowplow/event/PageView.kt +++ b/snowplow-tracker/src/main/java/com/snowplowanalytics/snowplow/event/PageView.kt @@ -16,11 +16,9 @@ import com.snowplowanalytics.core.constants.Parameters import com.snowplowanalytics.core.constants.TrackerConstants /** - * A pageView event. + * A PageView event. This event has been designed for web trackers, and is not suitable for mobile apps. * @param pageUrl The page URL. - * @Deprecated This event has been designed for web trackers, and is not suitable for mobile apps. */ -@Deprecated("This event has been designed for web trackers, not suitable for mobile apps. Use `DeepLinkReceived` event to track deep-link received in the app.") class PageView(pageUrl: String) : AbstractPrimitive() { /** Page URL. */ private val pageUrl: String From 334ebbef5dcada3650082cb7af03dd8bff69da56 Mon Sep 17 00:00:00 2001 From: Miranda Wilson Date: Sat, 27 Jan 2024 10:17:55 +0000 Subject: [PATCH 15/21] Handle errors when fetching screen resolution in Subject (close #657) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * Remove use of WindowManager (close #657) * Catch exceptions * Add test for default screen resolution in Subject --------- Co-authored-by: Matúš Tomlein --- .../snowplow/tracker/SubjectTest.kt | 9 +++++- .../snowplowanalytics/core/tracker/Subject.kt | 28 +++++++++++++++---- 2 files changed, 30 insertions(+), 7 deletions(-) diff --git a/snowplow-tracker/src/androidTest/java/com/snowplowanalytics/snowplow/tracker/SubjectTest.kt b/snowplow-tracker/src/androidTest/java/com/snowplowanalytics/snowplow/tracker/SubjectTest.kt index 153148ef7..e63b75d16 100755 --- a/snowplow-tracker/src/androidTest/java/com/snowplowanalytics/snowplow/tracker/SubjectTest.kt +++ b/snowplow-tracker/src/androidTest/java/com/snowplowanalytics/snowplow/tracker/SubjectTest.kt @@ -18,7 +18,6 @@ import androidx.test.platform.app.InstrumentationRegistry import com.snowplowanalytics.core.tracker.Logger.updateLogLevel import com.snowplowanalytics.core.tracker.Subject import com.snowplowanalytics.snowplow.Snowplow.createTracker -import com.snowplowanalytics.snowplow.network.HttpMethod import com.snowplowanalytics.snowplow.util.Size import org.junit.Assert import org.junit.Test @@ -131,6 +130,14 @@ class SubjectTest { Assert.assertNull(subject.getSubject(true)["ip"]) } + @Test + fun testSetsScreenResolutionAutomaticaly() { + val subject = createSubject() + Assert.assertNotNull(subject.screenResolution) + Assert.assertTrue((subject.screenResolution?.width ?: 0) > 0) + Assert.assertTrue((subject.screenResolution?.height ?: 0) > 0) + } + // Helper Methods private fun createSubject(): Subject { updateLogLevel(LogLevel.DEBUG) diff --git a/snowplow-tracker/src/main/java/com/snowplowanalytics/core/tracker/Subject.kt b/snowplow-tracker/src/main/java/com/snowplowanalytics/core/tracker/Subject.kt index b7cf2132a..8ecdde838 100755 --- a/snowplow-tracker/src/main/java/com/snowplowanalytics/core/tracker/Subject.kt +++ b/snowplow-tracker/src/main/java/com/snowplowanalytics/core/tracker/Subject.kt @@ -13,7 +13,9 @@ package com.snowplowanalytics.core.tracker import android.content.Context -import android.graphics.Point +import android.content.res.Resources +import android.os.Build +import android.util.DisplayMetrics import android.view.WindowManager import com.snowplowanalytics.core.constants.Parameters import com.snowplowanalytics.core.tracker.Logger.v @@ -225,11 +227,25 @@ class Subject(context: Context, config: SubjectConfigurationInterface?) { * @param context the android context */ private fun setDefaultScreenResolution(context: Context) { - val windowManager = context.getSystemService(Context.WINDOW_SERVICE) as? WindowManager - val display = windowManager?.defaultDisplay - val size = Point() - display?.getSize(size) - screenResolution = (Size(size.x, size.y)) + try { + screenResolution = if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.R) { + val metrics = + context.getSystemService(WindowManager::class.java).currentWindowMetrics + Size(metrics.bounds.width(), metrics.bounds.height()) + } else { + val windowManager = + context.getSystemService(Context.WINDOW_SERVICE) as? WindowManager + val display = windowManager?.defaultDisplay + val metrics = if (display != null) { + DisplayMetrics().also { display.getRealMetrics(it) } + } else { + Resources.getSystem().displayMetrics + } + Size(metrics.widthPixels, metrics.heightPixels) + } + } catch (e: Exception) { + Logger.e(TAG, "Failed to set default screen resolution.") + } } /** From fbe62a044795a755d00891ccb2bc43f089be0d4f Mon Sep 17 00:00:00 2001 From: Miranda Wilson Date: Mon, 29 Jan 2024 08:48:13 +0000 Subject: [PATCH 16/21] Tidy AbstractEvent internal properties (close #666) * Match AbstractEvent entities API with iOS tracker * Restore original behaviour --- .../snowplow/event/AbstractEventTest.kt | 23 ++++++--- .../snowplow/event/AbstractEvent.kt | 49 +++++++++---------- .../snowplow/event/ConsentGranted.kt | 2 +- .../snowplow/event/ConsentWithdrawn.kt | 2 +- 4 files changed, 41 insertions(+), 35 deletions(-) diff --git a/snowplow-tracker/src/androidTest/java/com/snowplowanalytics/snowplow/event/AbstractEventTest.kt b/snowplow-tracker/src/androidTest/java/com/snowplowanalytics/snowplow/event/AbstractEventTest.kt index c38f94f9e..e9c59eea8 100644 --- a/snowplow-tracker/src/androidTest/java/com/snowplowanalytics/snowplow/event/AbstractEventTest.kt +++ b/snowplow-tracker/src/androidTest/java/com/snowplowanalytics/snowplow/event/AbstractEventTest.kt @@ -24,14 +24,21 @@ class AbstractEventTest { @Test fun testAddsEntitiesUsingAllAPIs() { val event = ScreenView("screen") + val entity1 = SelfDescribingJson("schema1", "data1") + val entity2 = SelfDescribingJson("schema2", "data2") + val entity3 = SelfDescribingJson("schema3", "data3") - event.entities.add(SelfDescribingJson("schema1", "data1")) - event.customContexts.add(SelfDescribingJson("schema2", "data2")) - event.entities(listOf(SelfDescribingJson("schema3", "data3"))) - event.contexts(listOf(SelfDescribingJson("schema4", "data4"))) - - Assert.assertEquals(4, event.entities.count()) - Assert.assertEquals(4, event.contexts.count()) - Assert.assertEquals(4, event.customContexts.count()) + event.entities.add(entity1) + Assert.assertEquals(1, event.entities.count()) + + event.entities(listOf(entity2)) + Assert.assertEquals(2, event.entities.count()) + + event.contexts(listOf(entity3)) + Assert.assertEquals(3, event.entities.count()) + Assert.assertEquals(3, event.contexts.count()) + Assert.assertTrue(event.entities.contains(entity1)) + Assert.assertTrue(event.entities.contains(entity2)) + Assert.assertTrue(event.entities.contains(entity3)) } } diff --git a/snowplow-tracker/src/main/java/com/snowplowanalytics/snowplow/event/AbstractEvent.kt b/snowplow-tracker/src/main/java/com/snowplowanalytics/snowplow/event/AbstractEvent.kt index 2939a575f..4022bfd22 100644 --- a/snowplow-tracker/src/main/java/com/snowplowanalytics/snowplow/event/AbstractEvent.kt +++ b/snowplow-tracker/src/main/java/com/snowplowanalytics/snowplow/event/AbstractEvent.kt @@ -22,10 +22,27 @@ import java.util.* * - "True" timestamp: user-defined custom event timestamp */ abstract class AbstractEvent : Event { - /** List of custom contexts associated with the event. */ - @Deprecated("Old nomenclature.", ReplaceWith("entities")) - @JvmField - val customContexts: MutableList = LinkedList() + private var _entities = mutableListOf() + /** + * @return the custom context entities associated with the event. + */ + override var entities: MutableList + get() { + if (isProcessing) { + entitiesForProcessing?.let { + return (_entities + it).toMutableList() + } + } + return _entities + } + set(value) { + _entities = value + } + + @Deprecated("Old nomenclature", ReplaceWith("entities")) + override var contexts: List + get() = entities + set(value) { entities = value.toMutableList()} /** * @return the optional "true" (custom) event timestamp @@ -39,14 +56,14 @@ abstract class AbstractEvent : Event { // Builder methods /** Adds a list of context entities to the existing ones. */ - fun entities(entities: List?): AbstractEvent { - entities?.let { customContexts.addAll(entities) } + fun entities(entities: List): AbstractEvent { + this.entities.addAll(entities) return this } /** Adds a list of context entities to the existing ones. */ @Deprecated("Old nomenclature.", ReplaceWith("entities()")) - fun contexts(contexts: List?): AbstractEvent { + fun contexts(contexts: List): AbstractEvent { return entities(contexts) } @@ -56,24 +73,6 @@ abstract class AbstractEvent : Event { return this } - // Public methods - - /** - * @return the event custom context entities - */ - override val entities: MutableList - get() { - if (isProcessing) { - entitiesForProcessing?.let { - return (customContexts + it).toMutableList() - } - } - return customContexts - } - - @Deprecated("Old nomenclature", ReplaceWith("entities")) - override val contexts: List - get() = entities private var isProcessing = false override fun beginProcessing(tracker: Tracker) { diff --git a/snowplow-tracker/src/main/java/com/snowplowanalytics/snowplow/event/ConsentGranted.kt b/snowplow-tracker/src/main/java/com/snowplowanalytics/snowplow/event/ConsentGranted.kt index d95a2accf..9966292f4 100644 --- a/snowplow-tracker/src/main/java/com/snowplowanalytics/snowplow/event/ConsentGranted.kt +++ b/snowplow-tracker/src/main/java/com/snowplowanalytics/snowplow/event/ConsentGranted.kt @@ -108,7 +108,7 @@ class ConsentGranted(expiry: String, documentId: String, documentVersion: String override fun beginProcessing(tracker: Tracker) { for (document in documents) { val context = SelfDescribingJson(document.schema, document.dataPayload) - customContexts.add(context) // TODO: Only the user should modify the public customContexts property + entities.add(context) } } } diff --git a/snowplow-tracker/src/main/java/com/snowplowanalytics/snowplow/event/ConsentWithdrawn.kt b/snowplow-tracker/src/main/java/com/snowplowanalytics/snowplow/event/ConsentWithdrawn.kt index 2fb3059a2..9dc793a45 100644 --- a/snowplow-tracker/src/main/java/com/snowplowanalytics/snowplow/event/ConsentWithdrawn.kt +++ b/snowplow-tracker/src/main/java/com/snowplowanalytics/snowplow/event/ConsentWithdrawn.kt @@ -104,7 +104,7 @@ class ConsentWithdrawn(all: Boolean, documentId: String, documentVersion: String override fun beginProcessing(tracker: Tracker) { for (document in documents) { val context = SelfDescribingJson(document.schema, document.dataPayload) - customContexts.add(context) // TODO: Only the user should modify the public customContexts property + entities.add(context) } } } From 4ba067269133ae91c418b292b34072b732f2fb11 Mon Sep 17 00:00:00 2001 From: Matus Tomlein Date: Tue, 30 Jan 2024 10:13:40 +0100 Subject: [PATCH 17/21] Add an option to override platform context properties (close #667) PR #668 --- .../internal/tracker/PlatformContextTest.kt | 93 +++++++++++--- .../internal/tracker/StateManagerTest.kt | 6 +- .../snowplow/internal/tracker/TrackerTest.kt | 18 +-- .../snowplow/tracker/LoggingTest.kt | 12 +- .../snowplow/tracker/SessionTest.kt | 10 +- .../tracker/integration/EventSendingTest.kt | 4 +- .../core/tracker/PlatformContext.kt | 118 ++++++++++-------- .../core/tracker/ServiceProvider.kt | 13 +- .../snowplowanalytics/core/tracker/Tracker.kt | 12 +- .../configuration/TrackerConfiguration.kt | 21 +++- .../tracker/PlatformContextRetriever.kt | 118 ++++++++++++++++++ 11 files changed, 317 insertions(+), 108 deletions(-) create mode 100644 snowplow-tracker/src/main/java/com/snowplowanalytics/snowplow/tracker/PlatformContextRetriever.kt diff --git a/snowplow-tracker/src/androidTest/java/com/snowplowanalytics/snowplow/internal/tracker/PlatformContextTest.kt b/snowplow-tracker/src/androidTest/java/com/snowplowanalytics/snowplow/internal/tracker/PlatformContextTest.kt index 676a7e397..381c38c6f 100644 --- a/snowplow-tracker/src/androidTest/java/com/snowplowanalytics/snowplow/internal/tracker/PlatformContextTest.kt +++ b/snowplow-tracker/src/androidTest/java/com/snowplowanalytics/snowplow/internal/tracker/PlatformContextTest.kt @@ -19,6 +19,7 @@ import com.snowplowanalytics.core.constants.Parameters import com.snowplowanalytics.core.constants.TrackerConstants import com.snowplowanalytics.core.tracker.PlatformContext import com.snowplowanalytics.snowplow.configuration.PlatformContextProperty +import com.snowplowanalytics.snowplow.tracker.PlatformContextRetriever import org.junit.Assert import org.junit.Test import org.junit.runner.RunWith @@ -29,7 +30,7 @@ class PlatformContextTest { // --- TESTS @Test fun addsNotMockedMobileContext() { - val platformContext = PlatformContext(null, context) + val platformContext = PlatformContext(context = context) val sdj = platformContext.getMobileContext(false) Assert.assertNotNull(sdj) val sdjMap = sdj!!.map @@ -47,7 +48,7 @@ class PlatformContextTest { @Test fun addsAllMockedInfo() { val deviceInfoMonitor = MockDeviceInfoMonitor() - val platformContext = PlatformContext(0, 0, deviceInfoMonitor, null, context) + val platformContext = PlatformContext(0, 0, deviceInfoMonitor, context = context) Thread.sleep(100) // sleep in order to fetch the app set properties val sdj = platformContext.getMobileContext(false) val sdjMap = sdj!!.map @@ -77,7 +78,7 @@ class PlatformContextTest { @Test fun updatesMobileInfo() { val deviceInfoMonitor = MockDeviceInfoMonitor() - val platformContext = PlatformContext(0, 0, deviceInfoMonitor, null, context) + val platformContext = PlatformContext(0, 0, deviceInfoMonitor, context = context) Assert.assertEquals( 1, deviceInfoMonitor.getMethodAccessCount("getSystemAvailableMemory").toLong() @@ -100,7 +101,7 @@ class PlatformContextTest { @Test fun doesntUpdateMobileInfoWithinUpdateWindow() { val deviceInfoMonitor = MockDeviceInfoMonitor() - val platformContext = PlatformContext(1000, 0, deviceInfoMonitor, null, context) + val platformContext = PlatformContext(1000, 0, deviceInfoMonitor, context = context) Assert.assertEquals( 1, deviceInfoMonitor.getMethodAccessCount("getSystemAvailableMemory").toLong() @@ -123,7 +124,7 @@ class PlatformContextTest { @Test fun updatesNetworkInfo() { val deviceInfoMonitor = MockDeviceInfoMonitor() - val platformContext = PlatformContext(0, 0, deviceInfoMonitor, null, context) + val platformContext = PlatformContext(0, 0, deviceInfoMonitor, context = context) Assert.assertEquals(1, deviceInfoMonitor.getMethodAccessCount("getNetworkType").toLong()) Assert.assertEquals( 1, @@ -140,7 +141,7 @@ class PlatformContextTest { @Test fun doesntUpdateNetworkInfoWithinUpdateWindow() { val deviceInfoMonitor = MockDeviceInfoMonitor() - val platformContext = PlatformContext(0, 1000, deviceInfoMonitor, null, context) + val platformContext = PlatformContext(0, 1000, deviceInfoMonitor, context = context) Assert.assertEquals(1, deviceInfoMonitor.getMethodAccessCount("getNetworkType").toLong()) Assert.assertEquals( 1, @@ -157,7 +158,7 @@ class PlatformContextTest { @Test fun doesntUpdateNonEphemeralInfo() { val deviceInfoMonitor = MockDeviceInfoMonitor() - val platformContext = PlatformContext(0, 0, deviceInfoMonitor, null, context) + val platformContext = PlatformContext(0, 0, deviceInfoMonitor, context = context) Assert.assertEquals(1, deviceInfoMonitor.getMethodAccessCount("getOsType").toLong()) Assert.assertEquals(1, deviceInfoMonitor.getMethodAccessCount("getTotalStorage").toLong()) platformContext.getMobileContext(false) @@ -168,7 +169,7 @@ class PlatformContextTest { @Test fun doesntUpdateIdfaIfNotNull() { val deviceInfoMonitor = MockDeviceInfoMonitor() - val platformContext = PlatformContext(0, 1, deviceInfoMonitor, null, context) + val platformContext = PlatformContext(0, 1, deviceInfoMonitor, context = context) Assert.assertEquals(1, deviceInfoMonitor.getMethodAccessCount("getAndroidIdfa").toLong()) platformContext.getMobileContext(false) Assert.assertEquals(1, deviceInfoMonitor.getMethodAccessCount("getAndroidIdfa").toLong()) @@ -178,7 +179,7 @@ class PlatformContextTest { fun updatesIdfaIfEmptyOrNull() { val deviceInfoMonitor = MockDeviceInfoMonitor() deviceInfoMonitor.customIdfa = "" - val platformContext = PlatformContext(0, 1, deviceInfoMonitor, null, context) + val platformContext = PlatformContext(0, 1, deviceInfoMonitor, context = context) Assert.assertEquals(1, deviceInfoMonitor.getMethodAccessCount("getAndroidIdfa").toLong()) deviceInfoMonitor.customIdfa = null platformContext.getMobileContext(false) @@ -190,7 +191,7 @@ class PlatformContextTest { @Test fun anonymisesUserIdentifiers() { val deviceInfoMonitor = MockDeviceInfoMonitor() - val platformContext = PlatformContext(0, 0, deviceInfoMonitor, null, context) + val platformContext = PlatformContext(0, 0, deviceInfoMonitor, context = context) val sdj = platformContext.getMobileContext(true) val sdjMap = sdj!!.map val sdjData = sdjMap["data"] as Map<*, *>? @@ -201,16 +202,16 @@ class PlatformContextTest { @Test fun readsAppSetInfoSynchronouslyFromGeneralPrefsSecondTime() { val deviceInfoMonitor = MockDeviceInfoMonitor() - PlatformContext(0, 0, deviceInfoMonitor, null, context) + PlatformContext(0, 0, deviceInfoMonitor, context = context) Thread.sleep(100) - val secondPlatformContext = PlatformContext(0, 0, deviceInfoMonitor, null, context) + val secondPlatformContext = PlatformContext(0, 0, deviceInfoMonitor, context = context) val sdj = secondPlatformContext.getMobileContext(true) val sdjData = sdj!!.map["data"] as Map<*, *>? Assert.assertEquals("XXX", sdjData!![Parameters.APP_SET_ID]) - Assert.assertEquals("app", sdjData!![Parameters.APP_SET_ID_SCOPE]) + Assert.assertEquals("app", sdjData[Parameters.APP_SET_ID_SCOPE]) } @Test @@ -219,7 +220,7 @@ class PlatformContextTest { val platformContext = PlatformContext( 0, 0, deviceInfoMonitor, listOf(PlatformContextProperty.ANDROID_IDFA, PlatformContextProperty.BATTERY_LEVEL), - context + context = context ) val sdj = platformContext.getMobileContext(false) @@ -238,7 +239,7 @@ class PlatformContextTest { fun truncatesLanguageToMax8Chars() { val deviceInfoMonitor = MockDeviceInfoMonitor() deviceInfoMonitor.language = "1234567890" - val platformContext = PlatformContext(0, 0, deviceInfoMonitor, null, context) + val platformContext = PlatformContext(0, 0, deviceInfoMonitor, context = context) val sdj = platformContext.getMobileContext(false) Assert.assertNotNull(sdj) @@ -254,7 +255,7 @@ class PlatformContextTest { // set locale to an ISO-639 invalid 2-letter code Locale.setDefault(Locale("dk", "example")) - val platformContext = PlatformContext(null, context) + val platformContext = PlatformContext(context = context) val sdj = platformContext.getMobileContext(false) Assert.assertNotNull(sdj) val sdjData = sdj!!.map["data"] as Map<*, *> @@ -267,9 +268,9 @@ class PlatformContextTest { @Test fun doesntSetTheNetworkTechIfNotRequested() { - val platformContext = PlatformContext(listOf( + val platformContext = PlatformContext(properties = listOf( PlatformContextProperty.NETWORK_TYPE - ), context) + ), context = context) val sdj = platformContext.getMobileContext(false) Assert.assertNotNull(sdj) val sdjData = sdj!!.map["data"] as Map<*, *> @@ -278,6 +279,62 @@ class PlatformContextTest { Assert.assertFalse(sdjData.containsKey(Parameters.NETWORK_TECHNOLOGY)) } + @Test + fun PlatformContextRetrieverOverridesProperties() { + val retriever = PlatformContextRetriever( + osType = { "r1" }, + osVersion = { "r2" }, + deviceVendor = { "r3" }, + deviceModel = { "r4" }, + carrier = { "r5" }, + networkType = { "r6" }, + networkTechnology = { "r7" }, + androidIdfa = { "r8" }, + availableStorage = { 100 }, + totalStorage = { 101 }, + physicalMemory = { 102 }, + systemAvailableMemory = { 103 }, + batteryLevel = { 104 }, + batteryState = { "r9" }, + isPortrait = { false }, + resolution = { "r10" }, + scale = { 105f }, + language = { "r11" }, + appSetId = { "r12" }, + appSetIdScope = { "r13" }, + ) + val platformContext = PlatformContext( + retriever = retriever, + context = context + ) + Thread.sleep(100) + + val sdj = platformContext.getMobileContext(false) + Assert.assertNotNull(sdj) + val sdjData = sdj!!.map["data"] as Map<*, *> + + Assert.assertEquals("r1", sdjData[Parameters.OS_TYPE]) + Assert.assertEquals("r2", sdjData[Parameters.OS_VERSION]) + Assert.assertEquals("r3", sdjData[Parameters.DEVICE_MANUFACTURER]) + Assert.assertEquals("r4", sdjData[Parameters.DEVICE_MODEL]) + Assert.assertEquals("r5", sdjData[Parameters.CARRIER]) + Assert.assertEquals("r6", sdjData[Parameters.NETWORK_TYPE]) + Assert.assertEquals("r7", sdjData[Parameters.NETWORK_TECHNOLOGY]) + Assert.assertEquals("r8", sdjData[Parameters.ANDROID_IDFA]) + Assert.assertEquals(100L, sdjData[Parameters.AVAILABLE_STORAGE]) + Assert.assertEquals(101L, sdjData[Parameters.TOTAL_STORAGE]) + Assert.assertEquals(102L, sdjData[Parameters.PHYSICAL_MEMORY]) + Assert.assertEquals(103L, sdjData[Parameters.SYSTEM_AVAILABLE_MEMORY]) + Assert.assertEquals(104, sdjData[Parameters.BATTERY_LEVEL]) + Assert.assertEquals("r9", sdjData[Parameters.BATTERY_STATE]) + Assert.assertEquals(false, sdjData[Parameters.IS_PORTRAIT]) + Assert.assertEquals("r10", sdjData[Parameters.MOBILE_RESOLUTION]) + Assert.assertEquals(105f, sdjData[Parameters.MOBILE_SCALE]) + Assert.assertEquals("r11", sdjData[Parameters.MOBILE_LANGUAGE]) + Assert.assertEquals("r12", sdjData[Parameters.APP_SET_ID]) + Assert.assertEquals("r13", sdjData[Parameters.APP_SET_ID_SCOPE]) + } + // --- PRIVATE private val context: Context get() = InstrumentationRegistry.getInstrumentation().targetContext diff --git a/snowplow-tracker/src/androidTest/java/com/snowplowanalytics/snowplow/internal/tracker/StateManagerTest.kt b/snowplow-tracker/src/androidTest/java/com/snowplowanalytics/snowplow/internal/tracker/StateManagerTest.kt index 050c8253b..02c944d6a 100644 --- a/snowplow-tracker/src/androidTest/java/com/snowplowanalytics/snowplow/internal/tracker/StateManagerTest.kt +++ b/snowplow-tracker/src/androidTest/java/com/snowplowanalytics/snowplow/internal/tracker/StateManagerTest.kt @@ -128,7 +128,7 @@ class StateManagerTest { tracker.base64Encoded = false tracker.logLevel = LogLevel.VERBOSE } - val tracker = Tracker(emitter, "namespace", "appId", null, context, trackerBuilder) + val tracker = Tracker(emitter, "namespace", "appId", context = context, builder = trackerBuilder) // Send events tracker.track(Timing("category", "variable", 123)) @@ -221,7 +221,7 @@ class StateManagerTest { tracker.base64Encoded = false tracker.logLevel = LogLevel.VERBOSE } - val tracker = Tracker(emitter, "namespace", "appId", null, context, trackerBuilder) + val tracker = Tracker(emitter, "namespace", "appId", context = context, builder = trackerBuilder) // Send events tracker.track(Timing("category", "variable", 123)) @@ -295,7 +295,7 @@ class StateManagerTest { tracker.sessionContext = false tracker.platformContextEnabled = false } - val tracker = Tracker(emitter, "namespace", "appId", null, context, trackerBuilder) + val tracker = Tracker(emitter, "namespace", "appId", context = context, builder = trackerBuilder) // Send events tracker.track(Timing("category", "variable", 123)) diff --git a/snowplow-tracker/src/androidTest/java/com/snowplowanalytics/snowplow/internal/tracker/TrackerTest.kt b/snowplow-tracker/src/androidTest/java/com/snowplowanalytics/snowplow/internal/tracker/TrackerTest.kt index 7070be37c..b82f06b47 100755 --- a/snowplow-tracker/src/androidTest/java/com/snowplowanalytics/snowplow/internal/tracker/TrackerTest.kt +++ b/snowplow-tracker/src/androidTest/java/com/snowplowanalytics/snowplow/internal/tracker/TrackerTest.kt @@ -102,7 +102,7 @@ class TrackerTest { tracker.installAutotracking = installTracking tracker.applicationContext = true } - Companion.tracker = Tracker(emitter, "myNamespace", "myAppId", null, context, trackerBuilder) + Companion.tracker = Tracker(emitter, "myNamespace", "myAppId", context = context, builder = trackerBuilder) return Companion.tracker } @@ -203,7 +203,7 @@ class TrackerTest { tracker.screenViewAutotracking = false } Companion.tracker = - Tracker(emitter!!, namespace, "testTrackWithNoContext", null, context, trackerBuilder) + Tracker(emitter!!, namespace, "testTrackWithNoContext", context = context, builder = trackerBuilder) val eventStore = emitter.eventStore val isClean = eventStore.removeAllEvents() Log.i("testTrackSelfDescribingEvent", "EventStore clean: $isClean") @@ -265,7 +265,7 @@ class TrackerTest { tracker.screenViewAutotracking = false } Companion.tracker = - Tracker(emitter!!, namespace, "testTrackWithNoContext", null, context, trackerBuilder) + Tracker(emitter!!, namespace, "testTrackWithNoContext", context = context, builder = trackerBuilder) Log.i("testTrackWithNoContext", "Send ScreenView event") Companion.tracker!!.track(ScreenView("name")) @@ -317,7 +317,7 @@ class TrackerTest { tracker.exceptionAutotracking = false tracker.screenViewAutotracking = false } - Companion.tracker = Tracker(emitter, namespace, "myAppId", null, context, trackerBuilder) + Companion.tracker = Tracker(emitter, namespace, "myAppId", context = context, builder = trackerBuilder) Companion.tracker!!.pauseEventTracking() val eventId = Companion.tracker!!.track(ScreenView("name")) Assert.assertNull(eventId) @@ -351,7 +351,7 @@ class TrackerTest { tracker.foregroundTimeout = 5 tracker.backgroundTimeout = 5 } - Companion.tracker = Tracker(emitter, namespace, "myAppId", null, context, trackerBuilder) + Companion.tracker = Tracker(emitter, namespace, "myAppId", context = context, builder = trackerBuilder) Assert.assertNotNull(Companion.tracker!!.session) Companion.tracker!!.resumeSessionChecking() Thread.sleep(2000) @@ -380,7 +380,7 @@ class TrackerTest { tracker.foregroundTimeout = 5 tracker.backgroundTimeout = 5 } - Companion.tracker = Tracker(emitter, namespace, "myAppId", null, context, trackerBuilder) + Companion.tracker = Tracker(emitter, namespace, "myAppId", context = context, builder = trackerBuilder) val screenState = Companion.tracker!!.getScreenState() Assert.assertNotNull(screenState) var screenStateMapWrapper: Map = screenState!!.getCurrentScreen(true).map @@ -423,7 +423,7 @@ class TrackerTest { tracker.exceptionAutotracking = true tracker.screenViewAutotracking = false } - Companion.tracker = Tracker(emitter, namespace, "myAppId", null, context, trackerBuilder) + Companion.tracker = Tracker(emitter, namespace, "myAppId", context = context, builder = trackerBuilder) Assert.assertTrue(Companion.tracker!!.exceptionAutotracking) Assert.assertEquals( ExceptionHandler::class.java, @@ -451,7 +451,7 @@ class TrackerTest { tracker.exceptionAutotracking = false tracker.screenViewAutotracking = false } - Companion.tracker = Tracker(emitter, namespace, "myAppId", null, context, trackerBuilder) + Companion.tracker = Tracker(emitter, namespace, "myAppId", context = context, builder = trackerBuilder) val handler1 = ExceptionHandler() Thread.setDefaultUncaughtExceptionHandler(handler1) Assert.assertEquals( @@ -481,7 +481,7 @@ class TrackerTest { tracker.foregroundTimeout = 5 tracker.backgroundTimeout = 5 } - Companion.tracker = Tracker(emitter, "ns", "myAppId", null, context, trackerBuilder) + Companion.tracker = Tracker(emitter, "ns", "myAppId", context = context, builder = trackerBuilder) Companion.tracker!!.track(Structured("c", "a")) val sessionIdStart = Companion.tracker!!.session!!.state!!.sessionId diff --git a/snowplow-tracker/src/androidTest/java/com/snowplowanalytics/snowplow/tracker/LoggingTest.kt b/snowplow-tracker/src/androidTest/java/com/snowplowanalytics/snowplow/tracker/LoggingTest.kt index aa711ccb6..656bbf177 100644 --- a/snowplow-tracker/src/androidTest/java/com/snowplowanalytics/snowplow/tracker/LoggingTest.kt +++ b/snowplow-tracker/src/androidTest/java/com/snowplowanalytics/snowplow/tracker/LoggingTest.kt @@ -72,8 +72,8 @@ class LoggingTest { "namespace", "myAppId", null, - ApplicationProvider.getApplicationContext(), - trackerBuilder + context = ApplicationProvider.getApplicationContext(), + builder = trackerBuilder ) Assert.assertTrue(mockLoggerDelegate!!.capturedLogs.contains("Session checking has been resumed. (debug)")) Assert.assertTrue(mockLoggerDelegate!!.capturedLogs.contains("Tracker created successfully. (verbose)")) @@ -107,8 +107,8 @@ class LoggingTest { "namespace", "myAppId", null, - ApplicationProvider.getApplicationContext(), - trackerBuilder + context = ApplicationProvider.getApplicationContext(), + builder = trackerBuilder ) Assert.assertTrue(mockLoggerDelegate!!.capturedLogs.contains("Session checking has been resumed. (debug)")) Assert.assertFalse(mockLoggerDelegate!!.capturedLogs.contains("Tracker created successfully. (verbose)")) @@ -141,8 +141,8 @@ class LoggingTest { "namespace", "myAppId", null, - ApplicationProvider.getApplicationContext(), - trackerBuilder + context = ApplicationProvider.getApplicationContext(), + builder = trackerBuilder ) Assert.assertFalse(mockLoggerDelegate!!.capturedLogs.contains("Session checking has been resumed. (debug)")) Assert.assertFalse(mockLoggerDelegate!!.capturedLogs.contains("Tracker created successfully. (verbose)")) diff --git a/snowplow-tracker/src/androidTest/java/com/snowplowanalytics/snowplow/tracker/SessionTest.kt b/snowplow-tracker/src/androidTest/java/com/snowplowanalytics/snowplow/tracker/SessionTest.kt index 6dd7d2675..015625ba5 100644 --- a/snowplow-tracker/src/androidTest/java/com/snowplowanalytics/snowplow/tracker/SessionTest.kt +++ b/snowplow-tracker/src/androidTest/java/com/snowplowanalytics/snowplow/tracker/SessionTest.kt @@ -218,7 +218,7 @@ class SessionTest { tracker.foregroundTimeout = 100 tracker.backgroundTimeout = 2 } - val tracker = Tracker(emitter, "tracker", "app", null, context, trackerBuilder) + val tracker = Tracker(emitter, "tracker", "app", context = context, builder = trackerBuilder) val session = tracker.session getSessionContext(session, "event_1", timestamp, false) @@ -257,7 +257,7 @@ class SessionTest { tracker.foregroundTimeout = 100 tracker.backgroundTimeout = 2 } - val tracker = Tracker(emitter, "tracker", "app", null, context, trackerBuilder) + val tracker = Tracker(emitter, "tracker", "app", context = context, builder = trackerBuilder) val session = tracker.session getSessionContext(session, "event_1", timestamp, false) var sessionState = session!!.state @@ -338,8 +338,8 @@ class SessionTest { tracker.foregroundTimeout = 20 tracker.backgroundTimeout = 20 } - val tracker1 = Tracker(emitter, "tracker1", "app", null, context, trackerBuilder) - val tracker2 = Tracker(emitter, "tracker2", "app", null, context, trackerBuilder) + val tracker1 = Tracker(emitter, "tracker1", "app", context = context, builder = trackerBuilder) + val tracker2 = Tracker(emitter, "tracker2", "app", context = context, builder = trackerBuilder) val session1 = tracker1.session val session2 = tracker2.session session1!!.getSessionContext("session1-fake-id1", timestamp, false) @@ -364,7 +364,7 @@ class SessionTest { val id2 = session2.state!!.sessionId // Recreate tracker2 - val tracker2b = Tracker(emitter, "tracker2", "app", null, context, trackerBuilder) + val tracker2b = Tracker(emitter, "tracker2", "app", context = context, builder = trackerBuilder) tracker2b.session!!.getSessionContext("session2b-fake-id3", timestamp, false) val initialValue2b = tracker2b.session!!.sessionIndex?.toLong() val previousId2b = tracker2b.session!!.state!!.previousSessionId diff --git a/snowplow-tracker/src/androidTest/java/com/snowplowanalytics/snowplow/tracker/integration/EventSendingTest.kt b/snowplow-tracker/src/androidTest/java/com/snowplowanalytics/snowplow/tracker/integration/EventSendingTest.kt index 3412e1d92..a3db9c82b 100644 --- a/snowplow-tracker/src/androidTest/java/com/snowplowanalytics/snowplow/tracker/integration/EventSendingTest.kt +++ b/snowplow-tracker/src/androidTest/java/com/snowplowanalytics/snowplow/tracker/integration/EventSendingTest.kt @@ -222,8 +222,8 @@ class EventSendingTest { ns, "myAppId", null, - InstrumentationRegistry.getInstrumentation().targetContext, - trackerBuilder + context = InstrumentationRegistry.getInstrumentation().targetContext, + builder = trackerBuilder ) emitter.eventStore.removeAllEvents() return tracker!! diff --git a/snowplow-tracker/src/main/java/com/snowplowanalytics/core/tracker/PlatformContext.kt b/snowplow-tracker/src/main/java/com/snowplowanalytics/core/tracker/PlatformContext.kt index 4040450ae..31de79bda 100644 --- a/snowplow-tracker/src/main/java/com/snowplowanalytics/core/tracker/PlatformContext.kt +++ b/snowplow-tracker/src/main/java/com/snowplowanalytics/core/tracker/PlatformContext.kt @@ -21,6 +21,7 @@ import com.snowplowanalytics.core.utils.Util.addToMap import com.snowplowanalytics.core.utils.Util.mapHasKeys import com.snowplowanalytics.snowplow.configuration.PlatformContextProperty import com.snowplowanalytics.snowplow.payload.SelfDescribingJson +import com.snowplowanalytics.snowplow.tracker.PlatformContextRetriever /** * PlatformContext manages device information that is sent as context along with events. @@ -29,13 +30,17 @@ import com.snowplowanalytics.snowplow.payload.SelfDescribingJson * @param platformDictUpdateFrequency Minimal gap between subsequent updates of mobile platform information in milliseconds * @param networkDictUpdateFrequency Minimal gap between subsequent updates of network platform information in milliseconds * @param deviceInfoMonitor Device monitor for fetching platform information + * @param properties List of properties of the platform context to track + * @param retriever Overrides for retrieving property values + * @param context Android context */ class PlatformContext( - private val platformDictUpdateFrequency: Long, - private val networkDictUpdateFrequency: Long, - private val deviceInfoMonitor: DeviceInfoMonitor, - private val platformContextProperties: List?, - private val context: Context + private val platformDictUpdateFrequency: Long = 1000, + private val networkDictUpdateFrequency: Long = (10 * 1000).toLong(), + private val deviceInfoMonitor: DeviceInfoMonitor = DeviceInfoMonitor(), + private val properties: List? = null, + private val retriever: PlatformContextRetriever = PlatformContextRetriever(), + private val context: Context, ) { private val pairs: MutableMap = HashMap() private var lastUpdatedEphemeralPlatformDict: Long = 0 @@ -45,14 +50,6 @@ class PlatformContext( setPlatformDict() } - /** - * Initializes PlatformContext with default update intervals – 1s for updating platform information and 10s for updating network information. - * - * @param context the Android context - */ - constructor(platformContextProperties: List?, - context: Context) : this(1000, (10 * 1000).toLong(), DeviceInfoMonitor(), platformContextProperties, context) - fun getMobileContext(userAnonymisation: Boolean): SelfDescribingJson? { updateEphemeralDictsIfNecessary() @@ -90,41 +87,40 @@ class PlatformContext( } private fun setPlatformDict() { - addToMap(Parameters.OS_TYPE, deviceInfoMonitor.osType, pairs) - addToMap(Parameters.OS_VERSION, deviceInfoMonitor.osVersion, pairs) - addToMap(Parameters.DEVICE_MODEL, deviceInfoMonitor.deviceModel, pairs) - addToMap(Parameters.DEVICE_MANUFACTURER, deviceInfoMonitor.deviceVendor, pairs) + addToMap(Parameters.OS_TYPE, fromRetrieverOr(retriever.osType) { deviceInfoMonitor.osType }, pairs) + addToMap(Parameters.OS_VERSION, fromRetrieverOr(retriever.osVersion) { deviceInfoMonitor.osVersion }, pairs) + addToMap(Parameters.DEVICE_MODEL, fromRetrieverOr(retriever.deviceModel) { deviceInfoMonitor.deviceModel }, pairs) + addToMap(Parameters.DEVICE_MANUFACTURER, fromRetrieverOr(retriever.deviceVendor) { deviceInfoMonitor.deviceVendor }, pairs) // Carrier if (shouldTrack(PlatformContextProperty.CARRIER)) { addToMap( - Parameters.CARRIER, deviceInfoMonitor.getCarrier( - context - ), pairs + Parameters.CARRIER, fromRetrieverOr(retriever.carrier) { deviceInfoMonitor.getCarrier(context) }, + pairs ) } // Physical memory if (shouldTrack(PlatformContextProperty.PHYSICAL_MEMORY)) { addToMap( - Parameters.PHYSICAL_MEMORY, deviceInfoMonitor.getPhysicalMemory( - context - ), pairs + Parameters.PHYSICAL_MEMORY, + fromRetrieverOr(retriever.physicalMemory) { deviceInfoMonitor.getPhysicalMemory(context) }, + pairs ) } // Total storage if (shouldTrack(PlatformContextProperty.TOTAL_STORAGE)) { - addToMap(Parameters.TOTAL_STORAGE, deviceInfoMonitor.totalStorage, pairs) + addToMap(Parameters.TOTAL_STORAGE, fromRetrieverOr(retriever.totalStorage) { deviceInfoMonitor.totalStorage }, pairs) } // Resolution if (shouldTrack(PlatformContextProperty.RESOLUTION)) { - addToMap(Parameters.MOBILE_RESOLUTION, deviceInfoMonitor.getResolution(context), pairs) + addToMap(Parameters.MOBILE_RESOLUTION, fromRetrieverOr(retriever.resolution) { deviceInfoMonitor.getResolution(context) }, pairs) } // Scale if (shouldTrack(PlatformContextProperty.SCALE)) { - addToMap(Parameters.MOBILE_SCALE, deviceInfoMonitor.getScale(context), pairs) + addToMap(Parameters.MOBILE_SCALE, fromRetrieverOr(retriever.scale) { deviceInfoMonitor.getScale(context) }, pairs) } // Language if (shouldTrack(PlatformContextProperty.LANGUAGE)) { - addToMap(Parameters.MOBILE_LANGUAGE, deviceInfoMonitor.language?.take(8), pairs) + addToMap(Parameters.MOBILE_LANGUAGE, (fromRetrieverOr(retriever.language) { deviceInfoMonitor.language })?.take(8), pairs) } setEphemeralPlatformDict() @@ -140,9 +136,9 @@ class PlatformContext( val currentIdfa = pairs[Parameters.ANDROID_IDFA] if (currentIdfa == null || currentIdfa.toString().isEmpty()) { addToMap( - Parameters.ANDROID_IDFA, deviceInfoMonitor.getAndroidIdfa( - context - ), pairs + Parameters.ANDROID_IDFA, + fromRetrieverOr(retriever.androidIdfa) { deviceInfoMonitor.getAndroidIdfa(context) }, + pairs ) } } @@ -150,29 +146,25 @@ class PlatformContext( val trackBatState = shouldTrack(PlatformContextProperty.BATTERY_STATE) val trackBatLevel = shouldTrack(PlatformContextProperty.BATTERY_LEVEL) if (trackBatState || trackBatLevel) { - val batteryInfo = deviceInfoMonitor.getBatteryStateAndLevel( - context - ) - if (batteryInfo != null) { - if (trackBatState) { addToMap(Parameters.BATTERY_STATE, batteryInfo.first, pairs) } - if (trackBatLevel) { addToMap(Parameters.BATTERY_LEVEL, batteryInfo.second, pairs) } - } + val batteryInfo = deviceInfoMonitor.getBatteryStateAndLevel(context) + if (trackBatState) { addToMap(Parameters.BATTERY_STATE, fromRetrieverOr(retriever.batteryState) { batteryInfo?.first }, pairs) } + if (trackBatLevel) { addToMap(Parameters.BATTERY_LEVEL, fromRetrieverOr(retriever.batteryLevel) { batteryInfo?.second }, pairs) } } // Memory if (shouldTrack(PlatformContextProperty.SYSTEM_AVAILABLE_MEMORY)) { addToMap( - Parameters.SYSTEM_AVAILABLE_MEMORY, deviceInfoMonitor.getSystemAvailableMemory( - context - ), pairs + Parameters.SYSTEM_AVAILABLE_MEMORY, + fromRetrieverOr(retriever.systemAvailableMemory) { deviceInfoMonitor.getSystemAvailableMemory(context) }, + pairs ) } // Storage if (shouldTrack(PlatformContextProperty.AVAILABLE_STORAGE)) { - addToMap(Parameters.AVAILABLE_STORAGE, deviceInfoMonitor.availableStorage, pairs) + addToMap(Parameters.AVAILABLE_STORAGE, fromRetrieverOr(retriever.availableStorage) { deviceInfoMonitor.availableStorage }, pairs) } // Is portrait if (shouldTrack(PlatformContextProperty.IS_PORTRAIT)) { - addToMap(Parameters.IS_PORTRAIT, deviceInfoMonitor.getIsPortrait(context), pairs) + addToMap(Parameters.IS_PORTRAIT, fromRetrieverOr(retriever.isPortrait) { deviceInfoMonitor.getIsPortrait(context) }, pairs) } } @@ -187,14 +179,14 @@ class PlatformContext( if (trackType) { addToMap( Parameters.NETWORK_TYPE, - deviceInfoMonitor.getNetworkType(networkInfo), + fromRetrieverOr(retriever.networkType) { deviceInfoMonitor.getNetworkType(networkInfo) }, pairs ) } if (trackTech) { addToMap( Parameters.NETWORK_TECHNOLOGY, - deviceInfoMonitor.getNetworkTechnology(networkInfo), + fromRetrieverOr(retriever.networkTechnology) { deviceInfoMonitor.getNetworkTechnology(networkInfo) }, pairs ) } @@ -215,29 +207,45 @@ class PlatformContext( TrackerConstants.SNOWPLOW_GENERAL_VARS, Context.MODE_PRIVATE ) - val appSetId = generalPref.getString(Parameters.APP_SET_ID, null) - val appSetIdScope = generalPref.getString(Parameters.APP_SET_ID_SCOPE, null) + val appSetId = fromRetrieverOr(retriever.appSetId) { generalPref.getString(Parameters.APP_SET_ID, null) } + val appSetIdScope = fromRetrieverOr(retriever.appSetIdScope) { generalPref.getString(Parameters.APP_SET_ID_SCOPE, null) } if (appSetId != null && appSetIdScope != null) { if (trackId) { addToMap(Parameters.APP_SET_ID, appSetId, pairs) } if (trackScope) { addToMap(Parameters.APP_SET_ID_SCOPE, appSetIdScope, pairs) } } else { Executor.execute(TAG) { - deviceInfoMonitor.getAppSetIdAndScope(context)?.let { - if (trackId) { addToMap(Parameters.APP_SET_ID, it.first, pairs) } - if (trackScope) { addToMap(Parameters.APP_SET_ID_SCOPE, it.second, pairs) } - - generalPref.edit() - .putString(Parameters.APP_SET_ID, it.first) - .putString(Parameters.APP_SET_ID_SCOPE, it.second) - .apply() + val preferences = generalPref.edit() + var edited = false + + val appSetIdAndScope = deviceInfoMonitor.getAppSetIdAndScope(context) + val id = fromRetrieverOr(retriever.appSetId) { + val id = appSetIdAndScope?.first + preferences.putString(Parameters.APP_SET_ID, id) + edited = true + id + } + val scope = fromRetrieverOr(retriever.appSetIdScope) { + val scope = appSetIdAndScope?.second + preferences.putString(Parameters.APP_SET_ID_SCOPE, scope) + edited = true + scope } + + if (trackId) { addToMap(Parameters.APP_SET_ID, id, pairs) } + if (trackScope) { addToMap(Parameters.APP_SET_ID_SCOPE, scope, pairs) } + + if (edited) { preferences.apply() } } } } private fun shouldTrack(property: PlatformContextProperty): Boolean { - return platformContextProperties?.contains(property) ?: true + return properties?.contains(property) ?: true + } + + private fun fromRetrieverOr(f1: (() -> T)?, f2: () -> T): T { + return if (f1 == null) { f2() } else { f1.invoke() } } companion object { diff --git a/snowplow-tracker/src/main/java/com/snowplowanalytics/core/tracker/ServiceProvider.kt b/snowplow-tracker/src/main/java/com/snowplowanalytics/core/tracker/ServiceProvider.kt index 1822196d5..059113282 100644 --- a/snowplow-tracker/src/main/java/com/snowplowanalytics/core/tracker/ServiceProvider.kt +++ b/snowplow-tracker/src/main/java/com/snowplowanalytics/core/tracker/ServiceProvider.kt @@ -302,12 +302,13 @@ class ServiceProvider( } val tracker = Tracker( - emitter, - namespace, - trackerConfiguration.appId, - trackerConfiguration.platformContextProperties, - context, - builder + emitter = emitter, + namespace = namespace, + appId = trackerConfiguration.appId, + platformContextProperties = trackerConfiguration.platformContextProperties, + platformContextRetriever = trackerConfiguration.platformContextRetriever, + context = context, + builder = builder ) if (trackerConfiguration.isPaused) { diff --git a/snowplow-tracker/src/main/java/com/snowplowanalytics/core/tracker/Tracker.kt b/snowplow-tracker/src/main/java/com/snowplowanalytics/core/tracker/Tracker.kt index 668f5c68b..779e38743 100755 --- a/snowplow-tracker/src/main/java/com/snowplowanalytics/core/tracker/Tracker.kt +++ b/snowplow-tracker/src/main/java/com/snowplowanalytics/core/tracker/Tracker.kt @@ -45,7 +45,6 @@ import com.snowplowanalytics.snowplow.util.Basis import java.util.* import java.util.concurrent.TimeUnit import java.util.concurrent.atomic.AtomicBoolean -import kotlin.math.max /** * Builds a Tracker object which is used to send events to a Snowplow Collector. @@ -53,6 +52,8 @@ import kotlin.math.max * @param emitter Emitter to which events will be sent * @param namespace Identifier for the Tracker instance * @param appId Application ID + * @param platformContextProperties List of properties of the platform context to track + * @param platformContextRetriever Overrides for retrieving property values * @param context The Android application context * @param builder A closure to set Tracker configuration */ @@ -60,7 +61,8 @@ class Tracker( emitter: Emitter, val namespace: String, var appId: String, - platformContextProperties: List?, + platformContextProperties: List? = null, + platformContextRetriever: PlatformContextRetriever? = null, context: Context, builder: ((Tracker) -> Unit)? = null) { private var builderFinished = false @@ -88,7 +90,11 @@ class Tracker( val dataCollection: Boolean get() = _dataCollection.get() - private val platformContextManager = PlatformContext(platformContextProperties, context) + private val platformContextManager = PlatformContext( + properties = platformContextProperties, + retriever = platformContextRetriever ?: PlatformContextRetriever(), + context = context + ) var emitter: Emitter = emitter set(emitter) { diff --git a/snowplow-tracker/src/main/java/com/snowplowanalytics/snowplow/configuration/TrackerConfiguration.kt b/snowplow-tracker/src/main/java/com/snowplowanalytics/snowplow/configuration/TrackerConfiguration.kt index 47a5872bc..f8f78cbe3 100644 --- a/snowplow-tracker/src/main/java/com/snowplowanalytics/snowplow/configuration/TrackerConfiguration.kt +++ b/snowplow-tracker/src/main/java/com/snowplowanalytics/snowplow/configuration/TrackerConfiguration.kt @@ -13,12 +13,12 @@ package com.snowplowanalytics.snowplow.configuration import com.snowplowanalytics.core.tracker.Logger -import com.snowplowanalytics.core.tracker.PlatformContext import com.snowplowanalytics.core.tracker.TrackerConfigurationInterface import com.snowplowanalytics.core.tracker.TrackerDefaults import com.snowplowanalytics.snowplow.tracker.DevicePlatform import com.snowplowanalytics.snowplow.tracker.LogLevel import com.snowplowanalytics.snowplow.tracker.LoggerDelegate +import com.snowplowanalytics.snowplow.tracker.PlatformContextRetriever import org.json.JSONObject import java.util.* @@ -166,6 +166,15 @@ open class TrackerConfiguration : TrackerConfigurationInterface, Configuration { get() = _platformContextProperties ?: sourceConfig?.platformContextProperties set(value) { _platformContextProperties = value } + private var _platformContextRetriever: PlatformContextRetriever? = null + /** + * Set of callbacks to be used to retrieve properties of the platform context. + * Overrides the tracker implementation for setting the properties. + */ + open var platformContextRetriever: PlatformContextRetriever? + get() = _platformContextRetriever ?: sourceConfig?.platformContextRetriever + set(value) { _platformContextRetriever = value } + // Builder methods /** @@ -345,6 +354,15 @@ open class TrackerConfiguration : TrackerConfigurationInterface, Configuration { return this } + /** + * Set of callbacks to be used to retrieve properties of the platform context. + * Overrides the tracker implementation for setting the properties. + */ + fun platformContextRetriever(platformContextRetriever: PlatformContextRetriever?): TrackerConfiguration { + this.platformContextRetriever = platformContextRetriever + return this + } + // Copyable override fun copy(): Configuration { return TrackerConfiguration(appId) @@ -367,6 +385,7 @@ open class TrackerConfiguration : TrackerConfigurationInterface, Configuration { .userAnonymisation(userAnonymisation) .trackerVersionSuffix(trackerVersionSuffix) .platformContextProperties(platformContextProperties) + .platformContextRetriever(platformContextRetriever) } /** diff --git a/snowplow-tracker/src/main/java/com/snowplowanalytics/snowplow/tracker/PlatformContextRetriever.kt b/snowplow-tracker/src/main/java/com/snowplowanalytics/snowplow/tracker/PlatformContextRetriever.kt new file mode 100644 index 000000000..aec635395 --- /dev/null +++ b/snowplow-tracker/src/main/java/com/snowplowanalytics/snowplow/tracker/PlatformContextRetriever.kt @@ -0,0 +1,118 @@ +/* + * Copyright (c) 2015-present Snowplow Analytics Ltd. All rights reserved. + * + * This program is licensed to you under the Apache License Version 2.0, + * and you may not use this file except in compliance with the Apache License Version 2.0. + * You may obtain a copy of the Apache License Version 2.0 at http://www.apache.org/licenses/LICENSE-2.0. + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the Apache License Version 2.0 is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the Apache License Version 2.0 for the specific language governing permissions and limitations there under. + */ +package com.snowplowanalytics.snowplow.tracker + +/** + * Overrides for the values for properties of the platform context. + */ +data class PlatformContextRetriever( + /** + * Operating system type (e.g., ios, tvos, watchos, osx, android). + */ + var osType: (() -> String)? = null, + + /* + * The current version of the operating system. + */ + var osVersion: (() -> String)? = null, + + /** + * The manufacturer of the product/hardware. + */ + var deviceVendor: (() -> String)? = null, + + /** + * The end-user-visible name for the end product. + */ + var deviceModel: (() -> String)? = null, + + /** + * The carrier of the SIM inserted in the device. + */ + var carrier: (() -> String?)? = null, + + /** + * Type of network the device is connected to. + */ + var networkType: (() -> String?)? = null, + + /** + * Radio access technology that the device is using. + */ + var networkTechnology: (() -> String?)? = null, + + /** + * Advertising identifier on Android. + */ + var androidIdfa: (() -> String?)? = null, + + /** + * Bytes of storage remaining. + */ + var availableStorage: (() -> Long?)? = null, + + /** + * Total size of storage in bytes. + */ + var totalStorage: (() -> Long?)? = null, + + /** + * Total physical system memory in bytes. + */ + var physicalMemory: (() -> Long?)? = null, + + /** + * Available memory on the system in bytes (Android only). + */ + var systemAvailableMemory: (() -> Long?)? = null, + + /** + * Remaining battery level as an integer percentage of total battery capacity. + */ + var batteryLevel: (() -> Int?)? = null, + + /** + * Battery state for the device + */ + var batteryState: (() -> String?)? = null, + + /** + * A Boolean indicating whether the device orientation is portrait (either upright or upside down). + */ + var isPortrait: (() -> Boolean?)? = null, + + /** + * Screen resolution in pixels. Arrives in the form of WIDTHxHEIGHT (e.g., 1200x900). Doesn't change when device orientation changes. + */ + var resolution: (() -> String?)? = null, + + /** + * Scale factor used to convert logical coordinates to device coordinates of the screen (uses UIScreen.scale on iOS). + */ + var scale: (() -> Float?)? = null, + + /** + * System language currently used on the device (ISO 639). + */ + var language: (() -> String)? = null, + + /** + * Android vendor ID scoped to the set of apps published under the same Google Play developer account (see https://developer.android.com/training/articles/app-set-id). + */ + var appSetId: (() -> String)? = null, + + /** + * Scope of the `appSetId`. Can be scoped to the app or to a developer account on an app store (all apps from the same developer on the same device will have the same ID). + */ + var appSetIdScope: (() -> String)? = null +) From 2c6df7ea6e56c8ddb6261902785798d0cd89329e Mon Sep 17 00:00:00 2001 From: Greg Leonard <45019882+greg-el@users.noreply.github.com> Date: Tue, 5 Sep 2023 12:10:01 +0100 Subject: [PATCH 18/21] Add API to decorate link with user/session info (close #639) --- .../snowplow/tracker/LinkDecoratorTest.kt | 168 ++++++++++++++++++ .../core/tracker/TrackerControllerImpl.kt | 88 +++++++++ .../com/snowplowanalytics/core/utils/Util.kt | 11 ++ .../snowplow/controller/TrackerController.kt | 21 +++ .../CrossDeviceParameterConfiguration.kt | 39 ++++ 5 files changed, 327 insertions(+) create mode 100644 snowplow-tracker/src/androidTest/java/com/snowplowanalytics/snowplow/tracker/LinkDecoratorTest.kt create mode 100644 snowplow-tracker/src/main/java/com/snowplowanalytics/snowplow/tracker/CrossDeviceParameterConfiguration.kt diff --git a/snowplow-tracker/src/androidTest/java/com/snowplowanalytics/snowplow/tracker/LinkDecoratorTest.kt b/snowplow-tracker/src/androidTest/java/com/snowplowanalytics/snowplow/tracker/LinkDecoratorTest.kt new file mode 100644 index 000000000..1c6aed3aa --- /dev/null +++ b/snowplow-tracker/src/androidTest/java/com/snowplowanalytics/snowplow/tracker/LinkDecoratorTest.kt @@ -0,0 +1,168 @@ +package com.snowplowanalytics.snowplow.tracker + + +import android.net.Uri +import androidx.test.ext.junit.runners.AndroidJUnit4 +import androidx.test.platform.app.InstrumentationRegistry +import com.snowplowanalytics.core.utils.Util.urlSafeBase64Encode +import com.snowplowanalytics.snowplow.Snowplow +import com.snowplowanalytics.snowplow.configuration.NetworkConfiguration +import com.snowplowanalytics.snowplow.configuration.SessionConfiguration +import com.snowplowanalytics.snowplow.configuration.SubjectConfiguration +import com.snowplowanalytics.snowplow.configuration.TrackerConfiguration +import com.snowplowanalytics.snowplow.controller.SessionController +import com.snowplowanalytics.snowplow.controller.TrackerController +import com.snowplowanalytics.snowplow.event.ScreenView +import com.snowplowanalytics.snowplow.network.HttpMethod +import com.snowplowanalytics.snowplow.util.TimeMeasure +import org.junit.Assert +import org.junit.Before +import org.junit.Test +import org.junit.runner.RunWith +import java.util.concurrent.TimeUnit + + +@RunWith(AndroidJUnit4::class) +class LinkDecoratorTest { + private lateinit var tracker: TrackerController + private lateinit var session: SessionController + private lateinit var userId: String + private lateinit var appId: String + private val subjectUserId = "subjectUserId" + private val subjectUserIdEncoded = urlSafeBase64Encode(subjectUserId) + private val testLink = Uri.parse("http://example.com") + private val epoch = "\\d{13}" + + private fun matches(pattern: String, result: Uri) { + val regex = Regex("^${pattern.replace(".", "\\.").replace("?", "\\?")}$") + Assert.assertTrue( + "$result\ndoes not match expected: $pattern", regex.matches(result.toString()) + ) + } + + + @Before + fun before() { + tracker = getTracker() + session = tracker.session!! + userId = session.userId + appId = urlSafeBase64Encode(tracker.appId) + } + + @Test + fun testWithoutSession() { + val tracker = getTrackerNoSession() + val result = tracker.decorateLink(testLink) + Assert.assertEquals(null, result) + } + + @Test + fun testDecorateUriWithExistingSpParam() { + tracker.track(ScreenView("test")) + + val pattern = "http://example.com?_sp=$userId.$epoch.${session.sessionId}..$appId" + val result = + tracker.decorateLink(testLink.buildUpon().appendQueryParameter("_sp", "test").build()) + + matches(pattern, result!!) + } + + @Test + fun testDecorateUriWithOtherParam() { + tracker.track(ScreenView("test")) + + val pattern = "http://example.com?a=b&_sp=$userId.$epoch.${session.sessionId}..$appId$" + val result = + tracker.decorateLink(testLink.buildUpon().appendQueryParameter("a", "b").build()) + + matches(pattern, result!!) + } + + @Test + fun testDecorateUriWithParameters() { + tracker.track(ScreenView("test")) + + val sessionId = session.sessionId + val decorate = { c: CrossDeviceParameterConfiguration -> tracker.decorateLink(testLink, c)!! } + + matches( + "http://example.com?_sp=$userId.$epoch.$sessionId", + decorate(CrossDeviceParameterConfiguration(sourceId = false)) + ) + + matches( + "http://example.com?_sp=$userId.$epoch.$sessionId..$appId", + decorate(CrossDeviceParameterConfiguration()) + ) + + matches( + "http://example.com?_sp=$userId.$epoch.$sessionId..$appId.mob", + decorate(CrossDeviceParameterConfiguration(sourcePlatform = true)) + ) + + matches( + "http://example.com?_sp=$userId.$epoch.$sessionId.$subjectUserIdEncoded.$appId.mob", + decorate(CrossDeviceParameterConfiguration(sourcePlatform = true, subjectUserId = true)) + ) + + matches( + "http://example.com?_sp=$userId.$epoch.$sessionId...mob", + decorate(CrossDeviceParameterConfiguration(sourceId = false, sourcePlatform = true)) + ) + + matches( + "http://example.com?_sp=$userId.$epoch..$subjectUserIdEncoded.$appId", + decorate(CrossDeviceParameterConfiguration(sessionId = false, subjectUserId = true)) + ) + + matches( + "http://example.com?_sp=$userId.$epoch..$subjectUserIdEncoded.$appId", + decorate(CrossDeviceParameterConfiguration(sessionId = false, subjectUserId = true)) + ) + + + matches( + "http://example.com?_sp=$userId.$epoch", + decorate(CrossDeviceParameterConfiguration(sourceId = false, sessionId = false)) + ) + } + + private fun getTracker(): TrackerController { + val context = InstrumentationRegistry.getInstrumentation().targetContext + + val networkConfiguration = NetworkConfiguration(MockNetworkConnection(HttpMethod.POST, 200)) + + val trackerConfiguration = TrackerConfiguration("decoratorTest").sessionContext(true) + + val subjectConfig = SubjectConfiguration().userId(subjectUserId) + + val sessionConfiguration = SessionConfiguration( + TimeMeasure(6, TimeUnit.SECONDS), + TimeMeasure(30, TimeUnit.SECONDS), + ) + + return Snowplow.createTracker( + context, + "namespace" + Math.random(), + networkConfiguration, + trackerConfiguration, + sessionConfiguration, + subjectConfig + ) + } + + private fun getTrackerNoSession(): TrackerController { + val context = InstrumentationRegistry.getInstrumentation().targetContext + + val networkConfiguration = NetworkConfiguration(MockNetworkConnection(HttpMethod.POST, 200)) + + val trackerConfiguration = TrackerConfiguration("decoratorTest").sessionContext(false) + + return Snowplow.createTracker( + context, + "namespace" + Math.random(), + networkConfiguration, + trackerConfiguration, + ) + } +} diff --git a/snowplow-tracker/src/main/java/com/snowplowanalytics/core/tracker/TrackerControllerImpl.kt b/snowplow-tracker/src/main/java/com/snowplowanalytics/core/tracker/TrackerControllerImpl.kt index bd50bb7bf..43595821c 100644 --- a/snowplow-tracker/src/main/java/com/snowplowanalytics/core/tracker/TrackerControllerImpl.kt +++ b/snowplow-tracker/src/main/java/com/snowplowanalytics/core/tracker/TrackerControllerImpl.kt @@ -12,15 +12,18 @@ */ package com.snowplowanalytics.core.tracker +import android.net.Uri import androidx.annotation.RestrictTo import com.snowplowanalytics.core.Controller import com.snowplowanalytics.core.ecommerce.EcommerceControllerImpl import com.snowplowanalytics.core.session.SessionControllerImpl +import com.snowplowanalytics.core.utils.Util.urlSafeBase64Encode import com.snowplowanalytics.snowplow.configuration.TrackerConfiguration import com.snowplowanalytics.snowplow.controller.* import com.snowplowanalytics.snowplow.event.Event import com.snowplowanalytics.snowplow.media.controller.MediaController import com.snowplowanalytics.snowplow.tracker.BuildConfig +import com.snowplowanalytics.snowplow.tracker.CrossDeviceParameterConfiguration import com.snowplowanalytics.snowplow.tracker.DevicePlatform import com.snowplowanalytics.snowplow.tracker.LogLevel import com.snowplowanalytics.snowplow.tracker.LoggerDelegate @@ -70,6 +73,89 @@ class TrackerControllerImpl // Constructors return tracker.track(event) } + private fun decorateLinkErrorTemplate(extendedParameterName: String): String { + return "$extendedParameterName has been requested in CrossDeviceParameterConfiguration, but it is not set." + } + + override fun decorateLink( + uri: Uri, + extendedParameters: CrossDeviceParameterConfiguration? + ): Uri? { + // UserId is a required parameter of `_sp` + val userId = this.session?.userId + if (userId == null) { + Logger.track(TAG, "$uri could not be decorated as session.userId is null") + return null + } + + val extendedParameters = extendedParameters ?: CrossDeviceParameterConfiguration() + + val sessionId = if (extendedParameters.sessionId) { + this.session?.sessionId ?: "" + } else { + "" + } + if (extendedParameters.sessionId && sessionId.isEmpty()) { + Logger.d( + TAG, + "${decorateLinkErrorTemplate("sessionId")} Ensure an event has been tracked to generate a session before calling this method." + ) + } + + val sourceId = if (extendedParameters.sourceId) { + this.appId + } else { + "" + } + val sourcePlatform = if (extendedParameters.sourcePlatform) { + this.devicePlatform.value + } else { + "" + } + + val subjectUserId = if (extendedParameters.subjectUserId) { + this.subject.userId ?: "" + } else { + "" + } + if (extendedParameters.subjectUserId && subjectUserId.isEmpty()) { + Logger.d( + TAG, + "${decorateLinkErrorTemplate("subjectUserId")} Ensure SubjectConfiguration.userId has been set on your tracker." + ) + } + + val reason = extendedParameters.reason ?: "" + + // Create our list of values in the required order + val spParameters = listOf( + userId, + System.currentTimeMillis(), + sessionId, + urlSafeBase64Encode(subjectUserId), + urlSafeBase64Encode(sourceId), + sourcePlatform, + urlSafeBase64Encode(reason) + ).joinToString(".").trimEnd('.') + + // Remove any existing `_sp` param if present + val builder = uri.buildUpon() + if (!uri.getQueryParameter(crossDeviceQueryParameterKey).isNullOrBlank()) { + builder.clearQuery() + uri.queryParameterNames.forEach { + if (it != crossDeviceQueryParameterKey) builder.appendQueryParameter( + it, + uri.getQueryParameter(it) + ) + } + } + + return builder.appendQueryParameter( + crossDeviceQueryParameterKey, + spParameters + ).build() + } + override val version: String get() = BuildConfig.TRACKER_LABEL override val isTracking: Boolean @@ -226,6 +312,8 @@ class TrackerControllerImpl // Constructors private val dirtyConfig: TrackerConfiguration get() = serviceProvider.trackerConfiguration + private val crossDeviceQueryParameterKey = "_sp" + companion object { private val TAG = TrackerControllerImpl::class.java.simpleName } diff --git a/snowplow-tracker/src/main/java/com/snowplowanalytics/core/utils/Util.kt b/snowplow-tracker/src/main/java/com/snowplowanalytics/core/utils/Util.kt index e812b038d..85e020ca7 100755 --- a/snowplow-tracker/src/main/java/com/snowplowanalytics/core/utils/Util.kt +++ b/snowplow-tracker/src/main/java/com/snowplowanalytics/core/utils/Util.kt @@ -68,6 +68,17 @@ object Util { return Base64.encodeToString(string.toByteArray(), Base64.NO_WRAP) } + /** + * Encodes a string into URL-safe Base64. + * + * @param string the string to encode + * @return a Base64 encoded string + */ + @JvmStatic + fun urlSafeBase64Encode(string: String): String { + return Base64.encodeToString(string.toByteArray(), Base64.URL_SAFE or Base64.NO_PADDING or Base64.NO_WRAP) + } + /** * Generates a random UUID for each event. * diff --git a/snowplow-tracker/src/main/java/com/snowplowanalytics/snowplow/controller/TrackerController.kt b/snowplow-tracker/src/main/java/com/snowplowanalytics/snowplow/controller/TrackerController.kt index f32a80b89..b4d697c59 100644 --- a/snowplow-tracker/src/main/java/com/snowplowanalytics/snowplow/controller/TrackerController.kt +++ b/snowplow-tracker/src/main/java/com/snowplowanalytics/snowplow/controller/TrackerController.kt @@ -12,6 +12,8 @@ */ package com.snowplowanalytics.snowplow.controller +import android.net.Uri +import com.snowplowanalytics.snowplow.tracker.CrossDeviceParameterConfiguration import com.snowplowanalytics.core.tracker.TrackerConfigurationInterface import com.snowplowanalytics.snowplow.ecommerce.EcommerceController import com.snowplowanalytics.snowplow.event.Event @@ -116,4 +118,23 @@ interface TrackerController : TrackerConfigurationInterface { * The tracker will start tracking again. */ fun resume() + + /** + * Adds user and session information to a URI. + * + * For example, calling decorateLink on `appSchema://path/to/page` with all extended parameters enabled will return: + * + * `appSchema://path/to/page?_sp=domainUserId.timestamp.sessionId.subjectUserId.sourceId.platform.reason` + * + * @param uri The URI to add the query string to + * @param extendedParameters Any optional parameters to include in the query string. + * + * @return Optional URL + * - null if [SessionController.userId] is null from `sessionContext(false)` being passed in [TrackerConfiguration] + * - otherwise, decorated URL + */ + fun decorateLink( + uri: Uri, + extendedParameters: CrossDeviceParameterConfiguration? = null + ): Uri? } diff --git a/snowplow-tracker/src/main/java/com/snowplowanalytics/snowplow/tracker/CrossDeviceParameterConfiguration.kt b/snowplow-tracker/src/main/java/com/snowplowanalytics/snowplow/tracker/CrossDeviceParameterConfiguration.kt new file mode 100644 index 000000000..de7df2866 --- /dev/null +++ b/snowplow-tracker/src/main/java/com/snowplowanalytics/snowplow/tracker/CrossDeviceParameterConfiguration.kt @@ -0,0 +1,39 @@ +/* + * Copyright (c) 2015-2023 Snowplow Analytics Ltd. All rights reserved. + * + * This program is licensed to you under the Apache License Version 2.0, + * and you may not use this file except in compliance with the Apache License Version 2.0. + * You may obtain a copy of the Apache License Version 2.0 at http://www.apache.org/licenses/LICENSE-2.0. + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the Apache License Version 2.0 is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the Apache License Version 2.0 for the specific language governing permissions and limitations there under. + */ +package com.snowplowanalytics.snowplow.tracker + +import com.snowplowanalytics.snowplow.controller.SessionController +import com.snowplowanalytics.snowplow.controller.TrackerController +import com.snowplowanalytics.snowplow.controller.SubjectController + +/** + * Configuration object for [TrackerController.decorateLink] + * + * Enabled properties will be included when decorating a URI using `decorateLink` + */ +data class CrossDeviceParameterConfiguration( + /** Whether to include the value of [SessionController.sessionId] when decorating a link (enabled by default) */ + val sessionId: Boolean = true, + + /** Whether to include the value of [SubjectController.userId] when decorating a link */ + val subjectUserId: Boolean = false, + + /** Whether to include the value of [TrackerController.appId] when decorating a link (enabled by default) */ + val sourceId: Boolean = true, + + /** Whether to include the value of [TrackerController.devicePlatform] when decorating a link */ + val sourcePlatform: Boolean = false, + + /** Optional identifier/information for cross-navigation */ + val reason: String? = null +) From bb1d65f7325979815616fcbf1d9a86c1bfd20f53 Mon Sep 17 00:00:00 2001 From: Miranda Wilson Date: Tue, 30 Jan 2024 18:02:02 +0000 Subject: [PATCH 19/21] Update copyright notices (close #669) * Update copyright notices * Update more files --- LICENSE | 2 +- README.md | 2 +- .../com/snowplowanalytics/snowplowtrackerdemojava/Demo.java | 2 +- .../snowplowtrackerdemojava/MainActivity.java | 2 +- .../snowplowtrackerdemojava/utils/DemoUtils.java | 2 +- .../snowplowtrackerdemojava/utils/TrackerEvents.java | 2 +- .../main/java/com/snowplowanalytics/snowplowdemokotlin/Demo.kt | 2 +- .../com/snowplowanalytics/snowplowdemokotlin/MainActivity.kt | 2 +- .../com/snowplowanalytics/snowplowdemokotlin/MediaActivity.kt | 2 +- .../snowplowanalytics/snowplowdemokotlin/media/VideoView.kt | 3 +-- .../snowplowdemokotlin/media/VideoViewController.kt | 3 +-- .../snowplowanalytics/snowplowdemokotlin/utils/DemoUtils.kt | 2 +- .../snowplowdemokotlin/utils/TrackerEvents.kt | 2 +- .../com/snowplowanalytics/snowplow/event/AbstractEventTest.kt | 2 +- .../java/com/snowplowanalytics/snowplow/event/AddToCartTest.kt | 2 +- .../snowplow/event/ApplicationInstallEventTest.kt | 2 +- .../com/snowplowanalytics/snowplow/event/CheckoutStepTest.kt | 2 +- .../com/snowplowanalytics/snowplow/event/ConsentGrantedTest.kt | 2 +- .../snowplowanalytics/snowplow/event/ConsentWithdrawnTest.kt | 2 +- .../snowplowanalytics/snowplow/event/DeepLinkReceivedTest.kt | 2 +- .../com/snowplowanalytics/snowplow/event/EcommerceItemTest.kt | 2 +- .../snowplow/event/EcommerceTransactionTest.kt | 2 +- .../snowplow/event/MessageNotificationTest.kt | 2 +- .../java/com/snowplowanalytics/snowplow/event/PageViewTest.kt | 2 +- .../snowplowanalytics/snowplow/event/ProductListClickTest.kt | 2 +- .../snowplowanalytics/snowplow/event/ProductListViewTest.kt | 2 +- .../com/snowplowanalytics/snowplow/event/ProductViewTest.kt | 2 +- .../com/snowplowanalytics/snowplow/event/PromotionClickTest.kt | 2 +- .../com/snowplowanalytics/snowplow/event/PromotionViewTest.kt | 2 +- .../java/com/snowplowanalytics/snowplow/event/RefundTest.kt | 2 +- .../com/snowplowanalytics/snowplow/event/RemoveFromCartTest.kt | 2 +- .../com/snowplowanalytics/snowplow/event/ScreenViewTest.kt | 2 +- .../com/snowplowanalytics/snowplow/event/SelfDescribingTest.kt | 2 +- .../com/snowplowanalytics/snowplow/event/StructuredTest.kt | 2 +- .../java/com/snowplowanalytics/snowplow/event/TimingTest.kt | 2 +- .../snowplowanalytics/snowplow/event/TransactionErrorTest.kt | 2 +- .../com/snowplowanalytics/snowplow/event/TransactionTest.kt | 2 +- .../snowplow/globalcontexts/GlobalContextTest.kt | 2 +- .../snowplow/globalcontexts/SchemaRuleSetTest.kt | 2 +- .../snowplow/internal/emitter/storage/EventStoreTest.kt | 2 +- .../internal/remoteconfiguration/RemoteConfigurationTest.kt | 2 +- .../snowplow/internal/tracker/ConfigurationTest.kt | 2 +- .../snowplow/internal/tracker/EcommerceTest.kt | 2 +- .../snowplow/internal/tracker/MockDeviceInfoMonitor.kt | 2 +- .../snowplow/internal/tracker/MultipleInstancesTest.kt | 2 +- .../snowplow/internal/tracker/PlatformContextTest.kt | 2 +- .../snowplow/internal/tracker/StateManagerTest.kt | 2 +- .../snowplowanalytics/snowplow/internal/tracker/TrackerTest.kt | 2 +- .../snowplowanalytics/snowplow/internal/utils/FileStoreTest.kt | 2 +- .../snowplow/internal/utils/NotificationCenterTest.kt | 2 +- .../com/snowplowanalytics/snowplow/internal/utils/UtilTest.kt | 2 +- .../snowplowanalytics/snowplow/media/MediaAdTrackingTest.kt | 2 +- .../snowplow/media/MediaEventAndEntitySerializationTest.kt | 2 +- .../snowplow/media/MediaSessionTrackingStatsTest.kt | 2 +- .../snowplowanalytics/snowplow/media/TestMediaController.kt | 2 +- .../snowplow/payload/SelfDescribingJsonTest.kt | 2 +- .../snowplowanalytics/snowplow/payload/TrackerPayloadTest.kt | 2 +- .../snowplow/screen/ScreenViewAutotrackingTest.kt | 2 +- .../snowplow/screenviews/ScreenSummaryStateMachineTest.kt | 2 +- .../snowplow/tracker/CollectorCookieJarTest.kt | 2 +- .../snowplowanalytics/snowplow/tracker/DevicePlatformTest.kt | 2 +- .../java/com/snowplowanalytics/snowplow/tracker/EmitterTest.kt | 2 +- .../com/snowplowanalytics/snowplow/tracker/ExecutorTest.kt | 2 +- .../snowplow/tracker/FocalMeterConfigurationTest.kt | 2 +- .../java/com/snowplowanalytics/snowplow/tracker/LoggingTest.kt | 2 +- .../com/snowplowanalytics/snowplow/tracker/MockEventStore.kt | 2 +- .../snowplow/tracker/MockNetworkConnection.kt | 2 +- .../snowplow/tracker/NetworkConnectionTest.kt | 2 +- .../java/com/snowplowanalytics/snowplow/tracker/PluginsTest.kt | 2 +- .../snowplowanalytics/snowplow/tracker/RequestResultTest.kt | 2 +- .../snowplowanalytics/snowplow/tracker/ServiceProviderTest.kt | 2 +- .../java/com/snowplowanalytics/snowplow/tracker/SessionTest.kt | 2 +- .../java/com/snowplowanalytics/snowplow/tracker/SubjectTest.kt | 2 +- .../snowplow/tracker/TrackerWebViewInterfaceTest.kt | 2 +- .../snowplow/tracker/emitter/TLSArgumentsTest.kt | 2 +- .../snowplow/tracker/integration/EventSendingTest.kt | 2 +- .../com/snowplowanalytics/snowplow/tracker/noise/NoiseTest.kt | 2 +- .../java/com/snowplowanalytics/snowplow/util/TestUtils.kt | 2 +- .../java/com/snowplowanalytics/snowplow/util/TimeTraveler.kt | 2 +- .../src/main/java/com/snowplowanalytics/core/Controller.kt | 2 +- .../java/com/snowplowanalytics/core/constants/Parameters.kt | 2 +- .../com/snowplowanalytics/core/constants/TrackerConstants.kt | 2 +- .../com/snowplowanalytics/core/ecommerce/EcommerceAction.kt | 2 +- .../core/ecommerce/EcommerceControllerImpl.kt | 2 +- .../main/java/com/snowplowanalytics/core/emitter/Emitter.kt | 2 +- .../core/emitter/EmitterConfigurationInterface.kt | 2 +- .../snowplowanalytics/core/emitter/EmitterControllerImpl.kt | 2 +- .../java/com/snowplowanalytics/core/emitter/EmitterDefaults.kt | 2 +- .../main/java/com/snowplowanalytics/core/emitter/Executor.kt | 2 +- .../core/emitter/NetworkConfigurationInterface.kt | 2 +- .../snowplowanalytics/core/emitter/NetworkControllerImpl.kt | 2 +- .../java/com/snowplowanalytics/core/emitter/TLSArguments.kt | 2 +- .../com/snowplowanalytics/core/emitter/TLSSocketFactory.kt | 2 +- .../main/java/com/snowplowanalytics/core/emitter/TLSVersion.kt | 2 +- .../snowplowanalytics/core/emitter/storage/EventStoreHelper.kt | 2 +- .../snowplowanalytics/core/emitter/storage/SQLiteEventStore.kt | 2 +- .../main/java/com/snowplowanalytics/core/event/ScreenEnd.kt | 2 +- .../src/main/java/com/snowplowanalytics/core/gdpr/Gdpr.kt | 2 +- .../snowplowanalytics/core/gdpr/GdprConfigurationInterface.kt | 2 +- .../java/com/snowplowanalytics/core/gdpr/GdprControllerImpl.kt | 2 +- .../core/globalcontexts/GlobalContextPluginConfiguration.kt | 2 +- .../globalcontexts/GlobalContextsConfigurationInterface.kt | 2 +- .../core/globalcontexts/GlobalContextsControllerImpl.kt | 2 +- .../java/com/snowplowanalytics/core/media/MediaSchemata.kt | 2 +- .../snowplowanalytics/core/media/controller/MediaAdTracking.kt | 2 +- .../core/media/controller/MediaControllerImpl.kt | 2 +- .../core/media/controller/MediaPingInterval.kt | 2 +- .../core/media/controller/MediaSessionTracking.kt | 2 +- .../core/media/controller/MediaSessionTrackingStats.kt | 2 +- .../core/media/controller/MediaTrackingImpl.kt | 2 +- .../snowplowanalytics/core/media/entity/MediaSessionEntity.kt | 2 +- .../core/media/event/MediaPercentProgressEvent.kt | 2 +- .../com/snowplowanalytics/core/media/event/MediaPingEvent.kt | 2 +- .../core/media/event/MediaPlayerUpdatingEvent.kt | 2 +- .../core/remoteconfiguration/RemoteConfigurationBundle.kt | 2 +- .../core/remoteconfiguration/RemoteConfigurationCache.kt | 2 +- .../core/remoteconfiguration/RemoteConfigurationFetcher.kt | 2 +- .../core/remoteconfiguration/RemoteConfigurationProvider.kt | 2 +- .../java/com/snowplowanalytics/core/screenviews/ScreenState.kt | 2 +- .../snowplowanalytics/core/screenviews/ScreenStateMachine.kt | 2 +- .../snowplowanalytics/core/screenviews/ScreenSummaryState.kt | 2 +- .../core/screenviews/ScreenSummaryStateMachine.kt | 2 +- .../main/java/com/snowplowanalytics/core/session/FileStore.kt | 2 +- .../java/com/snowplowanalytics/core/session/ProcessObserver.kt | 2 +- .../main/java/com/snowplowanalytics/core/session/Session.kt | 2 +- .../core/session/SessionConfigurationInterface.kt | 2 +- .../snowplowanalytics/core/session/SessionControllerImpl.kt | 2 +- .../com/snowplowanalytics/core/statemachine/DeepLinkState.kt | 2 +- .../core/statemachine/DeepLinkStateMachine.kt | 2 +- .../com/snowplowanalytics/core/statemachine/LifecycleState.kt | 2 +- .../core/statemachine/LifecycleStateMachine.kt | 2 +- .../snowplowanalytics/core/statemachine/PluginStateMachine.kt | 2 +- .../main/java/com/snowplowanalytics/core/statemachine/State.kt | 2 +- .../com/snowplowanalytics/core/statemachine/StateFuture.kt | 2 +- .../snowplowanalytics/core/statemachine/StateMachineEvent.kt | 2 +- .../core/statemachine/StateMachineInterface.kt | 2 +- .../com/snowplowanalytics/core/statemachine/StateManager.kt | 2 +- .../com/snowplowanalytics/core/statemachine/TrackerState.kt | 2 +- .../core/statemachine/TrackerStateSnapshot.kt | 2 +- .../snowplowanalytics/core/tracker/ActivityLifecycleHandler.kt | 2 +- .../snowplowanalytics/core/tracker/ApplicationInstallEvent.kt | 2 +- .../com/snowplowanalytics/core/tracker/ExceptionHandler.kt | 2 +- .../snowplowanalytics/core/tracker/InstallReferrerDetails.kt | 2 +- .../src/main/java/com/snowplowanalytics/core/tracker/Logger.kt | 2 +- .../java/com/snowplowanalytics/core/tracker/PlatformContext.kt | 2 +- .../snowplowanalytics/core/tracker/PluginsControllerImpl.kt | 2 +- .../main/java/com/snowplowanalytics/core/tracker/SchemaRule.kt | 2 +- .../java/com/snowplowanalytics/core/tracker/ServiceProvider.kt | 2 +- .../snowplowanalytics/core/tracker/ServiceProviderInterface.kt | 2 +- .../main/java/com/snowplowanalytics/core/tracker/Subject.kt | 2 +- .../core/tracker/SubjectConfigurationInterface.kt | 2 +- .../snowplowanalytics/core/tracker/SubjectControllerImpl.kt | 2 +- .../main/java/com/snowplowanalytics/core/tracker/Tracker.kt | 2 +- .../core/tracker/TrackerConfigurationInterface.kt | 2 +- .../snowplowanalytics/core/tracker/TrackerControllerImpl.kt | 2 +- .../java/com/snowplowanalytics/core/tracker/TrackerDefaults.kt | 2 +- .../java/com/snowplowanalytics/core/tracker/TrackerEvent.kt | 2 +- .../snowplowanalytics/core/tracker/TrackerWebViewInterface.kt | 2 +- .../java/com/snowplowanalytics/core/utils/DeviceInfoMonitor.kt | 2 +- .../main/java/com/snowplowanalytics/core/utils/JsonUtils.kt | 2 +- .../com/snowplowanalytics/core/utils/NotificationCenter.kt | 2 +- .../src/main/java/com/snowplowanalytics/core/utils/Util.kt | 2 +- .../src/main/java/com/snowplowanalytics/snowplow/Snowplow.kt | 2 +- .../snowplowanalytics/snowplow/configuration/Configuration.kt | 2 +- .../snowplow/configuration/ConfigurationBundle.kt | 2 +- .../snowplow/configuration/ConfigurationState.kt | 2 +- .../snowplow/configuration/EmitterConfiguration.kt | 2 +- .../snowplow/configuration/FocalMeterConfiguration.kt | 2 +- .../snowplow/configuration/GdprConfiguration.kt | 2 +- .../snowplow/configuration/GlobalContextsConfiguration.kt | 2 +- .../snowplow/configuration/NetworkConfiguration.kt | 2 +- .../snowplow/configuration/PlatformContextProperty.kt | 2 +- .../snowplow/configuration/PluginConfiguration.kt | 2 +- .../snowplow/configuration/RemoteConfiguration.kt | 2 +- .../snowplow/configuration/SessionConfiguration.kt | 2 +- .../snowplow/configuration/SubjectConfiguration.kt | 2 +- .../snowplow/configuration/TrackerConfiguration.kt | 2 +- .../snowplowanalytics/snowplow/controller/EmitterController.kt | 2 +- .../snowplowanalytics/snowplow/controller/GdprController.kt | 2 +- .../snowplow/controller/GlobalContextsController.kt | 2 +- .../snowplowanalytics/snowplow/controller/NetworkController.kt | 2 +- .../snowplowanalytics/snowplow/controller/PluginsController.kt | 2 +- .../snowplowanalytics/snowplow/controller/SessionController.kt | 2 +- .../snowplowanalytics/snowplow/controller/SubjectController.kt | 2 +- .../snowplowanalytics/snowplow/controller/TrackerController.kt | 2 +- .../snowplow/ecommerce/EcommerceController.kt | 2 +- .../java/com/snowplowanalytics/snowplow/ecommerce/ErrorType.kt | 2 +- .../snowplow/ecommerce/entities/CartEntity.kt | 2 +- .../snowplow/ecommerce/entities/EcommerceScreenEntity.kt | 2 +- .../snowplow/ecommerce/entities/EcommerceUserEntity.kt | 2 +- .../snowplow/ecommerce/entities/ProductEntity.kt | 2 +- .../snowplow/ecommerce/entities/PromotionEntity.kt | 2 +- .../snowplow/ecommerce/entities/TransactionEntity.kt | 2 +- .../snowplow/ecommerce/events/AddToCartEvent.kt | 2 +- .../snowplow/ecommerce/events/CheckoutStepEvent.kt | 2 +- .../snowplow/ecommerce/events/ProductListClickEvent.kt | 2 +- .../snowplow/ecommerce/events/ProductListViewEvent.kt | 2 +- .../snowplow/ecommerce/events/ProductViewEvent.kt | 2 +- .../snowplow/ecommerce/events/PromotionClickEvent.kt | 2 +- .../snowplow/ecommerce/events/PromotionViewEvent.kt | 2 +- .../snowplowanalytics/snowplow/ecommerce/events/RefundEvent.kt | 2 +- .../snowplow/ecommerce/events/RemoveFromCartEvent.kt | 2 +- .../snowplow/ecommerce/events/TransactionErrorEvent.kt | 2 +- .../snowplow/ecommerce/events/TransactionEvent.kt | 2 +- .../com/snowplowanalytics/snowplow/emitter/BufferOption.kt | 2 +- .../com/snowplowanalytics/snowplow/emitter/EmitterEvent.kt | 2 +- .../java/com/snowplowanalytics/snowplow/emitter/EventStore.kt | 2 +- .../snowplowanalytics/snowplow/entity/ClientSessionEntity.kt | 2 +- .../java/com/snowplowanalytics/snowplow/entity/DeepLink.kt | 2 +- .../com/snowplowanalytics/snowplow/entity/LifecycleEntity.kt | 2 +- .../java/com/snowplowanalytics/snowplow/event/AbstractEvent.kt | 2 +- .../com/snowplowanalytics/snowplow/event/AbstractPrimitive.kt | 2 +- .../snowplowanalytics/snowplow/event/AbstractSelfDescribing.kt | 2 +- .../java/com/snowplowanalytics/snowplow/event/Background.kt | 2 +- .../com/snowplowanalytics/snowplow/event/ConsentDocument.kt | 2 +- .../com/snowplowanalytics/snowplow/event/ConsentGranted.kt | 2 +- .../com/snowplowanalytics/snowplow/event/ConsentWithdrawn.kt | 2 +- .../com/snowplowanalytics/snowplow/event/DeepLinkReceived.kt | 2 +- .../snowplowanalytics/snowplow/event/EcommerceTransaction.kt | 2 +- .../snowplow/event/EcommerceTransactionItem.kt | 2 +- .../main/java/com/snowplowanalytics/snowplow/event/Event.kt | 2 +- .../java/com/snowplowanalytics/snowplow/event/Foreground.kt | 2 +- .../java/com/snowplowanalytics/snowplow/event/ListItemView.kt | 2 +- .../snowplowanalytics/snowplow/event/MessageNotification.kt | 2 +- .../snowplow/event/MessageNotificationAttachment.kt | 2 +- .../snowplow/event/MessageNotificationTrigger.kt | 2 +- .../main/java/com/snowplowanalytics/snowplow/event/PageView.kt | 2 +- .../java/com/snowplowanalytics/snowplow/event/ScreenView.kt | 2 +- .../java/com/snowplowanalytics/snowplow/event/ScrollChanged.kt | 2 +- .../com/snowplowanalytics/snowplow/event/SelfDescribing.kt | 2 +- .../java/com/snowplowanalytics/snowplow/event/Structured.kt | 2 +- .../main/java/com/snowplowanalytics/snowplow/event/Timing.kt | 2 +- .../java/com/snowplowanalytics/snowplow/event/TrackerError.kt | 2 +- .../snowplow/globalcontexts/ContextGenerator.kt | 2 +- .../snowplow/globalcontexts/FunctionalFilter.kt | 2 +- .../snowplow/globalcontexts/FunctionalGenerator.kt | 2 +- .../snowplowanalytics/snowplow/globalcontexts/GlobalContext.kt | 2 +- .../snowplowanalytics/snowplow/globalcontexts/SchemaRuleSet.kt | 2 +- .../snowplow/media/configuration/MediaTrackingConfiguration.kt | 2 +- .../snowplow/media/controller/MediaController.kt | 2 +- .../snowplow/media/controller/MediaTracking.kt | 2 +- .../snowplow/media/entity/MediaAdBreakEntity.kt | 2 +- .../snowplow/media/entity/MediaAdBreakType.kt | 2 +- .../snowplowanalytics/snowplow/media/entity/MediaAdEntity.kt | 2 +- .../snowplow/media/entity/MediaPlayerEntity.kt | 2 +- .../com/snowplowanalytics/snowplow/media/entity/MediaType.kt | 2 +- .../snowplow/media/event/MediaAdBreakEndEvent.kt | 2 +- .../snowplow/media/event/MediaAdBreakStartEvent.kt | 2 +- .../snowplow/media/event/MediaAdClickEvent.kt | 2 +- .../snowplow/media/event/MediaAdCompleteEvent.kt | 2 +- .../snowplow/media/event/MediaAdFirstQuartileEvent.kt | 2 +- .../snowplow/media/event/MediaAdMidpointEvent.kt | 2 +- .../snowplow/media/event/MediaAdPauseEvent.kt | 2 +- .../snowplow/media/event/MediaAdResumeEvent.kt | 2 +- .../snowplowanalytics/snowplow/media/event/MediaAdSkipEvent.kt | 2 +- .../snowplow/media/event/MediaAdStartEvent.kt | 2 +- .../snowplow/media/event/MediaAdThirdQuartileEvent.kt | 2 +- .../snowplow/media/event/MediaBufferEndEvent.kt | 2 +- .../snowplow/media/event/MediaBufferStartEvent.kt | 2 +- .../snowplowanalytics/snowplow/media/event/MediaEndEvent.kt | 2 +- .../snowplowanalytics/snowplow/media/event/MediaErrorEvent.kt | 2 +- .../snowplow/media/event/MediaFullscreenChangeEvent.kt | 2 +- .../snowplowanalytics/snowplow/media/event/MediaPauseEvent.kt | 2 +- .../snowplow/media/event/MediaPictureInPictureChangeEvent.kt | 2 +- .../snowplowanalytics/snowplow/media/event/MediaPlayEvent.kt | 2 +- .../snowplow/media/event/MediaPlaybackRateChangeEvent.kt | 2 +- .../snowplow/media/event/MediaQualityChangeEvent.kt | 2 +- .../snowplowanalytics/snowplow/media/event/MediaReadyEvent.kt | 2 +- .../snowplow/media/event/MediaSeekEndEvent.kt | 2 +- .../snowplow/media/event/MediaSeekStartEvent.kt | 2 +- .../snowplow/media/event/MediaVolumeChangeEvent.kt | 2 +- .../com/snowplowanalytics/snowplow/network/CollectorCookie.kt | 2 +- .../snowplowanalytics/snowplow/network/CollectorCookieJar.kt | 2 +- .../java/com/snowplowanalytics/snowplow/network/HttpMethod.kt | 2 +- .../snowplowanalytics/snowplow/network/NetworkConnection.kt | 2 +- .../snowplow/network/OkHttpNetworkConnection.kt | 2 +- .../java/com/snowplowanalytics/snowplow/network/Protocol.kt | 2 +- .../java/com/snowplowanalytics/snowplow/network/Request.kt | 2 +- .../com/snowplowanalytics/snowplow/network/RequestCallback.kt | 2 +- .../com/snowplowanalytics/snowplow/network/RequestResult.kt | 2 +- .../java/com/snowplowanalytics/snowplow/payload/Payload.kt | 2 +- .../snowplowanalytics/snowplow/payload/SelfDescribingJson.kt | 2 +- .../com/snowplowanalytics/snowplow/payload/TrackerPayload.kt | 2 +- .../snowplow/tracker/CrossDeviceParameterConfiguration.kt | 2 +- .../com/snowplowanalytics/snowplow/tracker/DevicePlatform.kt | 2 +- .../com/snowplowanalytics/snowplow/tracker/InspectableEvent.kt | 2 +- .../java/com/snowplowanalytics/snowplow/tracker/LogLevel.kt | 2 +- .../com/snowplowanalytics/snowplow/tracker/LoggerDelegate.kt | 2 +- .../com/snowplowanalytics/snowplow/tracker/SessionState.kt | 2 +- .../src/main/java/com/snowplowanalytics/snowplow/util/Basis.kt | 2 +- .../src/main/java/com/snowplowanalytics/snowplow/util/Size.kt | 2 +- .../java/com/snowplowanalytics/snowplow/util/TimeMeasure.kt | 2 +- 292 files changed, 292 insertions(+), 294 deletions(-) diff --git a/LICENSE b/LICENSE index 9354487b4..84c2ec9fd 100644 --- a/LICENSE +++ b/LICENSE @@ -186,7 +186,7 @@ same "printed page" as the copyright notice for easier identification within third-party archives. - Copyright 2023 Snowplow Analytics Ltd. + Copyright 2015-present Snowplow Analytics Ltd. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/README.md b/README.md index 786404888..57eba73cd 100644 --- a/README.md +++ b/README.md @@ -40,7 +40,7 @@ Three demo apps are included in this repository: one in [Java](https://github.co ## Copyright and license -The Snowplow Android Tracker is copyright 2015-2023 Snowplow Analytics Ltd. +The Snowplow Android Tracker is copyright 2015-present Snowplow Analytics Ltd. Licensed under the **[Apache License, Version 2.0][license]** (the "License"); you may not use this software except in compliance with the License. diff --git a/snowplow-demo-java/src/main/java/com/snowplowanalytics/snowplowtrackerdemojava/Demo.java b/snowplow-demo-java/src/main/java/com/snowplowanalytics/snowplowtrackerdemojava/Demo.java index 345c7d964..33057cf65 100644 --- a/snowplow-demo-java/src/main/java/com/snowplowanalytics/snowplowtrackerdemojava/Demo.java +++ b/snowplow-demo-java/src/main/java/com/snowplowanalytics/snowplowtrackerdemojava/Demo.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2015-2023 Snowplow Analytics Ltd. All rights reserved. + * Copyright (c) 2015-present Snowplow Analytics Ltd. All rights reserved. * * This program is licensed to you under the Apache License Version 2.0, * and you may not use this file except in compliance with the Apache License Version 2.0. diff --git a/snowplow-demo-java/src/main/java/com/snowplowanalytics/snowplowtrackerdemojava/MainActivity.java b/snowplow-demo-java/src/main/java/com/snowplowanalytics/snowplowtrackerdemojava/MainActivity.java index b4253b160..d331bd982 100644 --- a/snowplow-demo-java/src/main/java/com/snowplowanalytics/snowplowtrackerdemojava/MainActivity.java +++ b/snowplow-demo-java/src/main/java/com/snowplowanalytics/snowplowtrackerdemojava/MainActivity.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2015-2023 Snowplow Analytics Ltd. All rights reserved. + * Copyright (c) 2015-present Snowplow Analytics Ltd. All rights reserved. * * This program is licensed to you under the Apache License Version 2.0, * and you may not use this file except in compliance with the Apache License Version 2.0. diff --git a/snowplow-demo-java/src/main/java/com/snowplowanalytics/snowplowtrackerdemojava/utils/DemoUtils.java b/snowplow-demo-java/src/main/java/com/snowplowanalytics/snowplowtrackerdemojava/utils/DemoUtils.java index e0ae442d0..b3f3a54e2 100644 --- a/snowplow-demo-java/src/main/java/com/snowplowanalytics/snowplowtrackerdemojava/utils/DemoUtils.java +++ b/snowplow-demo-java/src/main/java/com/snowplowanalytics/snowplowtrackerdemojava/utils/DemoUtils.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2015-2023 Snowplow Analytics Ltd. All rights reserved. + * Copyright (c) 2015-present Snowplow Analytics Ltd. All rights reserved. * * This program is licensed to you under the Apache License Version 2.0, * and you may not use this file except in compliance with the Apache License Version 2.0. diff --git a/snowplow-demo-java/src/main/java/com/snowplowanalytics/snowplowtrackerdemojava/utils/TrackerEvents.java b/snowplow-demo-java/src/main/java/com/snowplowanalytics/snowplowtrackerdemojava/utils/TrackerEvents.java index 3cf899cd2..c861c3667 100644 --- a/snowplow-demo-java/src/main/java/com/snowplowanalytics/snowplowtrackerdemojava/utils/TrackerEvents.java +++ b/snowplow-demo-java/src/main/java/com/snowplowanalytics/snowplowtrackerdemojava/utils/TrackerEvents.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2015-2023 Snowplow Analytics Ltd. All rights reserved. + * Copyright (c) 2015-present Snowplow Analytics Ltd. All rights reserved. * * This program is licensed to you under the Apache License Version 2.0, * and you may not use this file except in compliance with the Apache License Version 2.0. diff --git a/snowplow-demo-kotlin/src/main/java/com/snowplowanalytics/snowplowdemokotlin/Demo.kt b/snowplow-demo-kotlin/src/main/java/com/snowplowanalytics/snowplowdemokotlin/Demo.kt index 1df596488..0a10a06f0 100644 --- a/snowplow-demo-kotlin/src/main/java/com/snowplowanalytics/snowplowdemokotlin/Demo.kt +++ b/snowplow-demo-kotlin/src/main/java/com/snowplowanalytics/snowplowdemokotlin/Demo.kt @@ -1,5 +1,5 @@ /* - * Copyright (c) 2015-2023 Snowplow Analytics Ltd. All rights reserved. + * Copyright (c) 2015-present Snowplow Analytics Ltd. All rights reserved. * * This program is licensed to you under the Apache License Version 2.0, * and you may not use this file except in compliance with the Apache License Version 2.0. diff --git a/snowplow-demo-kotlin/src/main/java/com/snowplowanalytics/snowplowdemokotlin/MainActivity.kt b/snowplow-demo-kotlin/src/main/java/com/snowplowanalytics/snowplowdemokotlin/MainActivity.kt index 26c26c317..fa02029cf 100644 --- a/snowplow-demo-kotlin/src/main/java/com/snowplowanalytics/snowplowdemokotlin/MainActivity.kt +++ b/snowplow-demo-kotlin/src/main/java/com/snowplowanalytics/snowplowdemokotlin/MainActivity.kt @@ -1,5 +1,5 @@ /* - * Copyright (c) 2015-2023 Snowplow Analytics Ltd. All rights reserved. + * Copyright (c) 2015-present Snowplow Analytics Ltd. All rights reserved. * * This program is licensed to you under the Apache License Version 2.0, * and you may not use this file except in compliance with the Apache License Version 2.0. diff --git a/snowplow-demo-kotlin/src/main/java/com/snowplowanalytics/snowplowdemokotlin/MediaActivity.kt b/snowplow-demo-kotlin/src/main/java/com/snowplowanalytics/snowplowdemokotlin/MediaActivity.kt index 7193dcd89..40ffeb441 100644 --- a/snowplow-demo-kotlin/src/main/java/com/snowplowanalytics/snowplowdemokotlin/MediaActivity.kt +++ b/snowplow-demo-kotlin/src/main/java/com/snowplowanalytics/snowplowdemokotlin/MediaActivity.kt @@ -1,5 +1,5 @@ /* - * Copyright (c) 2015-2023 Snowplow Analytics Ltd. All rights reserved. + * Copyright (c) 2015-present Snowplow Analytics Ltd. All rights reserved. * * This program is licensed to you under the Apache License Version 2.0, * and you may not use this file except in compliance with the Apache License Version 2.0. diff --git a/snowplow-demo-kotlin/src/main/java/com/snowplowanalytics/snowplowdemokotlin/media/VideoView.kt b/snowplow-demo-kotlin/src/main/java/com/snowplowanalytics/snowplowdemokotlin/media/VideoView.kt index cf46490d3..d80c6d9cd 100644 --- a/snowplow-demo-kotlin/src/main/java/com/snowplowanalytics/snowplowdemokotlin/media/VideoView.kt +++ b/snowplow-demo-kotlin/src/main/java/com/snowplowanalytics/snowplowdemokotlin/media/VideoView.kt @@ -1,5 +1,5 @@ /* - * Copyright (c) 2015-2023 Snowplow Analytics Ltd. All rights reserved. + * Copyright (c) 2015-present Snowplow Analytics Ltd. All rights reserved. * * This program is licensed to you under the Apache License Version 2.0, * and you may not use this file except in compliance with the Apache License Version 2.0. @@ -46,4 +46,3 @@ class VideoView : android.widget.VideoView { viewController?.onSeekStart() } } - diff --git a/snowplow-demo-kotlin/src/main/java/com/snowplowanalytics/snowplowdemokotlin/media/VideoViewController.kt b/snowplow-demo-kotlin/src/main/java/com/snowplowanalytics/snowplowdemokotlin/media/VideoViewController.kt index 843645f8c..4a5f64f13 100644 --- a/snowplow-demo-kotlin/src/main/java/com/snowplowanalytics/snowplowdemokotlin/media/VideoViewController.kt +++ b/snowplow-demo-kotlin/src/main/java/com/snowplowanalytics/snowplowdemokotlin/media/VideoViewController.kt @@ -1,5 +1,5 @@ /* - * Copyright (c) 2015-2023 Snowplow Analytics Ltd. All rights reserved. + * Copyright (c) 2015-present Snowplow Analytics Ltd. All rights reserved. * * This program is licensed to you under the Apache License Version 2.0, * and you may not use this file except in compliance with the Apache License Version 2.0. @@ -178,4 +178,3 @@ class VideoViewController(activity: Activity, uri: Uri) { private val TAG = VideoViewController::class.java.simpleName } } - diff --git a/snowplow-demo-kotlin/src/main/java/com/snowplowanalytics/snowplowdemokotlin/utils/DemoUtils.kt b/snowplow-demo-kotlin/src/main/java/com/snowplowanalytics/snowplowdemokotlin/utils/DemoUtils.kt index 68fc32e20..d8b9d5109 100644 --- a/snowplow-demo-kotlin/src/main/java/com/snowplowanalytics/snowplowdemokotlin/utils/DemoUtils.kt +++ b/snowplow-demo-kotlin/src/main/java/com/snowplowanalytics/snowplowdemokotlin/utils/DemoUtils.kt @@ -1,5 +1,5 @@ /* - * Copyright (c) 2015-2023 Snowplow Analytics Ltd. All rights reserved. + * Copyright (c) 2015-present Snowplow Analytics Ltd. All rights reserved. * * This program is licensed to you under the Apache License Version 2.0, * and you may not use this file except in compliance with the Apache License Version 2.0. diff --git a/snowplow-demo-kotlin/src/main/java/com/snowplowanalytics/snowplowdemokotlin/utils/TrackerEvents.kt b/snowplow-demo-kotlin/src/main/java/com/snowplowanalytics/snowplowdemokotlin/utils/TrackerEvents.kt index c826befcf..eed1dd3fa 100644 --- a/snowplow-demo-kotlin/src/main/java/com/snowplowanalytics/snowplowdemokotlin/utils/TrackerEvents.kt +++ b/snowplow-demo-kotlin/src/main/java/com/snowplowanalytics/snowplowdemokotlin/utils/TrackerEvents.kt @@ -1,5 +1,5 @@ /* - * Copyright (c) 2015-2023 Snowplow Analytics Ltd. All rights reserved. + * Copyright (c) 2015-present Snowplow Analytics Ltd. All rights reserved. * * This program is licensed to you under the Apache License Version 2.0, * and you may not use this file except in compliance with the Apache License Version 2.0. diff --git a/snowplow-tracker/src/androidTest/java/com/snowplowanalytics/snowplow/event/AbstractEventTest.kt b/snowplow-tracker/src/androidTest/java/com/snowplowanalytics/snowplow/event/AbstractEventTest.kt index e9c59eea8..427d50e9e 100644 --- a/snowplow-tracker/src/androidTest/java/com/snowplowanalytics/snowplow/event/AbstractEventTest.kt +++ b/snowplow-tracker/src/androidTest/java/com/snowplowanalytics/snowplow/event/AbstractEventTest.kt @@ -1,5 +1,5 @@ /* - * Copyright (c) 2015-2023 Snowplow Analytics Ltd. All rights reserved. + * Copyright (c) 2015-present Snowplow Analytics Ltd. All rights reserved. * * This program is licensed to you under the Apache License Version 2.0, * and you may not use this file except in compliance with the Apache License Version 2.0. diff --git a/snowplow-tracker/src/androidTest/java/com/snowplowanalytics/snowplow/event/AddToCartTest.kt b/snowplow-tracker/src/androidTest/java/com/snowplowanalytics/snowplow/event/AddToCartTest.kt index fb69a5e0e..1db145b0a 100644 --- a/snowplow-tracker/src/androidTest/java/com/snowplowanalytics/snowplow/event/AddToCartTest.kt +++ b/snowplow-tracker/src/androidTest/java/com/snowplowanalytics/snowplow/event/AddToCartTest.kt @@ -1,5 +1,5 @@ /* - * Copyright (c) 2015-2023 Snowplow Analytics Ltd. All rights reserved. + * Copyright (c) 2015-present Snowplow Analytics Ltd. All rights reserved. * * This program is licensed to you under the Apache License Version 2.0, * and you may not use this file except in compliance with the Apache License Version 2.0. diff --git a/snowplow-tracker/src/androidTest/java/com/snowplowanalytics/snowplow/event/ApplicationInstallEventTest.kt b/snowplow-tracker/src/androidTest/java/com/snowplowanalytics/snowplow/event/ApplicationInstallEventTest.kt index c0eaa9ec4..eb09f15b6 100644 --- a/snowplow-tracker/src/androidTest/java/com/snowplowanalytics/snowplow/event/ApplicationInstallEventTest.kt +++ b/snowplow-tracker/src/androidTest/java/com/snowplowanalytics/snowplow/event/ApplicationInstallEventTest.kt @@ -1,5 +1,5 @@ /* - * Copyright (c) 2015-2023 Snowplow Analytics Ltd. All rights reserved. + * Copyright (c) 2015-present Snowplow Analytics Ltd. All rights reserved. * * This program is licensed to you under the Apache License Version 2.0, * and you may not use this file except in compliance with the Apache License Version 2.0. diff --git a/snowplow-tracker/src/androidTest/java/com/snowplowanalytics/snowplow/event/CheckoutStepTest.kt b/snowplow-tracker/src/androidTest/java/com/snowplowanalytics/snowplow/event/CheckoutStepTest.kt index a1e824474..b6b2f8035 100644 --- a/snowplow-tracker/src/androidTest/java/com/snowplowanalytics/snowplow/event/CheckoutStepTest.kt +++ b/snowplow-tracker/src/androidTest/java/com/snowplowanalytics/snowplow/event/CheckoutStepTest.kt @@ -1,5 +1,5 @@ /* - * Copyright (c) 2015-2023 Snowplow Analytics Ltd. All rights reserved. + * Copyright (c) 2015-present Snowplow Analytics Ltd. All rights reserved. * * This program is licensed to you under the Apache License Version 2.0, * and you may not use this file except in compliance with the Apache License Version 2.0. diff --git a/snowplow-tracker/src/androidTest/java/com/snowplowanalytics/snowplow/event/ConsentGrantedTest.kt b/snowplow-tracker/src/androidTest/java/com/snowplowanalytics/snowplow/event/ConsentGrantedTest.kt index 136035b6b..4e4dc3eed 100644 --- a/snowplow-tracker/src/androidTest/java/com/snowplowanalytics/snowplow/event/ConsentGrantedTest.kt +++ b/snowplow-tracker/src/androidTest/java/com/snowplowanalytics/snowplow/event/ConsentGrantedTest.kt @@ -1,5 +1,5 @@ /* - * Copyright (c) 2015-2023 Snowplow Analytics Ltd. All rights reserved. + * Copyright (c) 2015-present Snowplow Analytics Ltd. All rights reserved. * * This program is licensed to you under the Apache License Version 2.0, * and you may not use this file except in compliance with the Apache License Version 2.0. diff --git a/snowplow-tracker/src/androidTest/java/com/snowplowanalytics/snowplow/event/ConsentWithdrawnTest.kt b/snowplow-tracker/src/androidTest/java/com/snowplowanalytics/snowplow/event/ConsentWithdrawnTest.kt index 1c771129b..b58e44377 100644 --- a/snowplow-tracker/src/androidTest/java/com/snowplowanalytics/snowplow/event/ConsentWithdrawnTest.kt +++ b/snowplow-tracker/src/androidTest/java/com/snowplowanalytics/snowplow/event/ConsentWithdrawnTest.kt @@ -1,5 +1,5 @@ /* - * Copyright (c) 2015-2023 Snowplow Analytics Ltd. All rights reserved. + * Copyright (c) 2015-present Snowplow Analytics Ltd. All rights reserved. * * This program is licensed to you under the Apache License Version 2.0, * and you may not use this file except in compliance with the Apache License Version 2.0. diff --git a/snowplow-tracker/src/androidTest/java/com/snowplowanalytics/snowplow/event/DeepLinkReceivedTest.kt b/snowplow-tracker/src/androidTest/java/com/snowplowanalytics/snowplow/event/DeepLinkReceivedTest.kt index 2c9a87ca4..dedb56500 100644 --- a/snowplow-tracker/src/androidTest/java/com/snowplowanalytics/snowplow/event/DeepLinkReceivedTest.kt +++ b/snowplow-tracker/src/androidTest/java/com/snowplowanalytics/snowplow/event/DeepLinkReceivedTest.kt @@ -1,5 +1,5 @@ /* - * Copyright (c) 2015-2023 Snowplow Analytics Ltd. All rights reserved. + * Copyright (c) 2015-present Snowplow Analytics Ltd. All rights reserved. * * This program is licensed to you under the Apache License Version 2.0, * and you may not use this file except in compliance with the Apache License Version 2.0. diff --git a/snowplow-tracker/src/androidTest/java/com/snowplowanalytics/snowplow/event/EcommerceItemTest.kt b/snowplow-tracker/src/androidTest/java/com/snowplowanalytics/snowplow/event/EcommerceItemTest.kt index 956c5cc6f..7c876b157 100644 --- a/snowplow-tracker/src/androidTest/java/com/snowplowanalytics/snowplow/event/EcommerceItemTest.kt +++ b/snowplow-tracker/src/androidTest/java/com/snowplowanalytics/snowplow/event/EcommerceItemTest.kt @@ -1,5 +1,5 @@ /* - * Copyright (c) 2015-2023 Snowplow Analytics Ltd. All rights reserved. + * Copyright (c) 2015-present Snowplow Analytics Ltd. All rights reserved. * * This program is licensed to you under the Apache License Version 2.0, * and you may not use this file except in compliance with the Apache License Version 2.0. diff --git a/snowplow-tracker/src/androidTest/java/com/snowplowanalytics/snowplow/event/EcommerceTransactionTest.kt b/snowplow-tracker/src/androidTest/java/com/snowplowanalytics/snowplow/event/EcommerceTransactionTest.kt index eddb510af..e9cb4cfc7 100644 --- a/snowplow-tracker/src/androidTest/java/com/snowplowanalytics/snowplow/event/EcommerceTransactionTest.kt +++ b/snowplow-tracker/src/androidTest/java/com/snowplowanalytics/snowplow/event/EcommerceTransactionTest.kt @@ -1,5 +1,5 @@ /* - * Copyright (c) 2015-2023 Snowplow Analytics Ltd. All rights reserved. + * Copyright (c) 2015-present Snowplow Analytics Ltd. All rights reserved. * * This program is licensed to you under the Apache License Version 2.0, * and you may not use this file except in compliance with the Apache License Version 2.0. diff --git a/snowplow-tracker/src/androidTest/java/com/snowplowanalytics/snowplow/event/MessageNotificationTest.kt b/snowplow-tracker/src/androidTest/java/com/snowplowanalytics/snowplow/event/MessageNotificationTest.kt index d8d269ebf..42e082c11 100644 --- a/snowplow-tracker/src/androidTest/java/com/snowplowanalytics/snowplow/event/MessageNotificationTest.kt +++ b/snowplow-tracker/src/androidTest/java/com/snowplowanalytics/snowplow/event/MessageNotificationTest.kt @@ -1,5 +1,5 @@ /* - * Copyright (c) 2015-2023 Snowplow Analytics Ltd. All rights reserved. + * Copyright (c) 2015-present Snowplow Analytics Ltd. All rights reserved. * * This program is licensed to you under the Apache License Version 2.0, * and you may not use this file except in compliance with the Apache License Version 2.0. diff --git a/snowplow-tracker/src/androidTest/java/com/snowplowanalytics/snowplow/event/PageViewTest.kt b/snowplow-tracker/src/androidTest/java/com/snowplowanalytics/snowplow/event/PageViewTest.kt index 3141d7d9e..f1eb710af 100644 --- a/snowplow-tracker/src/androidTest/java/com/snowplowanalytics/snowplow/event/PageViewTest.kt +++ b/snowplow-tracker/src/androidTest/java/com/snowplowanalytics/snowplow/event/PageViewTest.kt @@ -1,5 +1,5 @@ /* - * Copyright (c) 2015-2023 Snowplow Analytics Ltd. All rights reserved. + * Copyright (c) 2015-present Snowplow Analytics Ltd. All rights reserved. * * This program is licensed to you under the Apache License Version 2.0, * and you may not use this file except in compliance with the Apache License Version 2.0. diff --git a/snowplow-tracker/src/androidTest/java/com/snowplowanalytics/snowplow/event/ProductListClickTest.kt b/snowplow-tracker/src/androidTest/java/com/snowplowanalytics/snowplow/event/ProductListClickTest.kt index 4b0b819da..92a1485d3 100644 --- a/snowplow-tracker/src/androidTest/java/com/snowplowanalytics/snowplow/event/ProductListClickTest.kt +++ b/snowplow-tracker/src/androidTest/java/com/snowplowanalytics/snowplow/event/ProductListClickTest.kt @@ -1,5 +1,5 @@ /* - * Copyright (c) 2015-2023 Snowplow Analytics Ltd. All rights reserved. + * Copyright (c) 2015-present Snowplow Analytics Ltd. All rights reserved. * * This program is licensed to you under the Apache License Version 2.0, * and you may not use this file except in compliance with the Apache License Version 2.0. diff --git a/snowplow-tracker/src/androidTest/java/com/snowplowanalytics/snowplow/event/ProductListViewTest.kt b/snowplow-tracker/src/androidTest/java/com/snowplowanalytics/snowplow/event/ProductListViewTest.kt index 21823241a..abc57a5db 100644 --- a/snowplow-tracker/src/androidTest/java/com/snowplowanalytics/snowplow/event/ProductListViewTest.kt +++ b/snowplow-tracker/src/androidTest/java/com/snowplowanalytics/snowplow/event/ProductListViewTest.kt @@ -1,5 +1,5 @@ /* - * Copyright (c) 2015-2023 Snowplow Analytics Ltd. All rights reserved. + * Copyright (c) 2015-present Snowplow Analytics Ltd. All rights reserved. * * This program is licensed to you under the Apache License Version 2.0, * and you may not use this file except in compliance with the Apache License Version 2.0. diff --git a/snowplow-tracker/src/androidTest/java/com/snowplowanalytics/snowplow/event/ProductViewTest.kt b/snowplow-tracker/src/androidTest/java/com/snowplowanalytics/snowplow/event/ProductViewTest.kt index a7c5c3980..4bbe9dd16 100644 --- a/snowplow-tracker/src/androidTest/java/com/snowplowanalytics/snowplow/event/ProductViewTest.kt +++ b/snowplow-tracker/src/androidTest/java/com/snowplowanalytics/snowplow/event/ProductViewTest.kt @@ -1,5 +1,5 @@ /* - * Copyright (c) 2015-2023 Snowplow Analytics Ltd. All rights reserved. + * Copyright (c) 2015-present Snowplow Analytics Ltd. All rights reserved. * * This program is licensed to you under the Apache License Version 2.0, * and you may not use this file except in compliance with the Apache License Version 2.0. diff --git a/snowplow-tracker/src/androidTest/java/com/snowplowanalytics/snowplow/event/PromotionClickTest.kt b/snowplow-tracker/src/androidTest/java/com/snowplowanalytics/snowplow/event/PromotionClickTest.kt index dbe25464b..f5a5c1bca 100644 --- a/snowplow-tracker/src/androidTest/java/com/snowplowanalytics/snowplow/event/PromotionClickTest.kt +++ b/snowplow-tracker/src/androidTest/java/com/snowplowanalytics/snowplow/event/PromotionClickTest.kt @@ -1,5 +1,5 @@ /* - * Copyright (c) 2015-2023 Snowplow Analytics Ltd. All rights reserved. + * Copyright (c) 2015-present Snowplow Analytics Ltd. All rights reserved. * * This program is licensed to you under the Apache License Version 2.0, * and you may not use this file except in compliance with the Apache License Version 2.0. diff --git a/snowplow-tracker/src/androidTest/java/com/snowplowanalytics/snowplow/event/PromotionViewTest.kt b/snowplow-tracker/src/androidTest/java/com/snowplowanalytics/snowplow/event/PromotionViewTest.kt index df78eba1c..945e9271c 100644 --- a/snowplow-tracker/src/androidTest/java/com/snowplowanalytics/snowplow/event/PromotionViewTest.kt +++ b/snowplow-tracker/src/androidTest/java/com/snowplowanalytics/snowplow/event/PromotionViewTest.kt @@ -1,5 +1,5 @@ /* - * Copyright (c) 2015-2023 Snowplow Analytics Ltd. All rights reserved. + * Copyright (c) 2015-present Snowplow Analytics Ltd. All rights reserved. * * This program is licensed to you under the Apache License Version 2.0, * and you may not use this file except in compliance with the Apache License Version 2.0. diff --git a/snowplow-tracker/src/androidTest/java/com/snowplowanalytics/snowplow/event/RefundTest.kt b/snowplow-tracker/src/androidTest/java/com/snowplowanalytics/snowplow/event/RefundTest.kt index 0fb795b76..a4aa10cbc 100644 --- a/snowplow-tracker/src/androidTest/java/com/snowplowanalytics/snowplow/event/RefundTest.kt +++ b/snowplow-tracker/src/androidTest/java/com/snowplowanalytics/snowplow/event/RefundTest.kt @@ -1,5 +1,5 @@ /* - * Copyright (c) 2015-2023 Snowplow Analytics Ltd. All rights reserved. + * Copyright (c) 2015-present Snowplow Analytics Ltd. All rights reserved. * * This program is licensed to you under the Apache License Version 2.0, * and you may not use this file except in compliance with the Apache License Version 2.0. diff --git a/snowplow-tracker/src/androidTest/java/com/snowplowanalytics/snowplow/event/RemoveFromCartTest.kt b/snowplow-tracker/src/androidTest/java/com/snowplowanalytics/snowplow/event/RemoveFromCartTest.kt index 2728f646e..aa1924d65 100644 --- a/snowplow-tracker/src/androidTest/java/com/snowplowanalytics/snowplow/event/RemoveFromCartTest.kt +++ b/snowplow-tracker/src/androidTest/java/com/snowplowanalytics/snowplow/event/RemoveFromCartTest.kt @@ -1,5 +1,5 @@ /* - * Copyright (c) 2015-2023 Snowplow Analytics Ltd. All rights reserved. + * Copyright (c) 2015-present Snowplow Analytics Ltd. All rights reserved. * * This program is licensed to you under the Apache License Version 2.0, * and you may not use this file except in compliance with the Apache License Version 2.0. diff --git a/snowplow-tracker/src/androidTest/java/com/snowplowanalytics/snowplow/event/ScreenViewTest.kt b/snowplow-tracker/src/androidTest/java/com/snowplowanalytics/snowplow/event/ScreenViewTest.kt index b0dc76e73..4799c9572 100644 --- a/snowplow-tracker/src/androidTest/java/com/snowplowanalytics/snowplow/event/ScreenViewTest.kt +++ b/snowplow-tracker/src/androidTest/java/com/snowplowanalytics/snowplow/event/ScreenViewTest.kt @@ -1,5 +1,5 @@ /* - * Copyright (c) 2015-2023 Snowplow Analytics Ltd. All rights reserved. + * Copyright (c) 2015-present Snowplow Analytics Ltd. All rights reserved. * * This program is licensed to you under the Apache License Version 2.0, * and you may not use this file except in compliance with the Apache License Version 2.0. diff --git a/snowplow-tracker/src/androidTest/java/com/snowplowanalytics/snowplow/event/SelfDescribingTest.kt b/snowplow-tracker/src/androidTest/java/com/snowplowanalytics/snowplow/event/SelfDescribingTest.kt index f4de15603..05379965f 100644 --- a/snowplow-tracker/src/androidTest/java/com/snowplowanalytics/snowplow/event/SelfDescribingTest.kt +++ b/snowplow-tracker/src/androidTest/java/com/snowplowanalytics/snowplow/event/SelfDescribingTest.kt @@ -1,5 +1,5 @@ /* - * Copyright (c) 2015-2023 Snowplow Analytics Ltd. All rights reserved. + * Copyright (c) 2015-present Snowplow Analytics Ltd. All rights reserved. * * This program is licensed to you under the Apache License Version 2.0, * and you may not use this file except in compliance with the Apache License Version 2.0. diff --git a/snowplow-tracker/src/androidTest/java/com/snowplowanalytics/snowplow/event/StructuredTest.kt b/snowplow-tracker/src/androidTest/java/com/snowplowanalytics/snowplow/event/StructuredTest.kt index 31e65003c..785add07a 100644 --- a/snowplow-tracker/src/androidTest/java/com/snowplowanalytics/snowplow/event/StructuredTest.kt +++ b/snowplow-tracker/src/androidTest/java/com/snowplowanalytics/snowplow/event/StructuredTest.kt @@ -1,5 +1,5 @@ /* - * Copyright (c) 2015-2023 Snowplow Analytics Ltd. All rights reserved. + * Copyright (c) 2015-present Snowplow Analytics Ltd. All rights reserved. * * This program is licensed to you under the Apache License Version 2.0, * and you may not use this file except in compliance with the Apache License Version 2.0. diff --git a/snowplow-tracker/src/androidTest/java/com/snowplowanalytics/snowplow/event/TimingTest.kt b/snowplow-tracker/src/androidTest/java/com/snowplowanalytics/snowplow/event/TimingTest.kt index cdbb5243e..46e98f2d2 100644 --- a/snowplow-tracker/src/androidTest/java/com/snowplowanalytics/snowplow/event/TimingTest.kt +++ b/snowplow-tracker/src/androidTest/java/com/snowplowanalytics/snowplow/event/TimingTest.kt @@ -1,5 +1,5 @@ /* - * Copyright (c) 2015-2023 Snowplow Analytics Ltd. All rights reserved. + * Copyright (c) 2015-present Snowplow Analytics Ltd. All rights reserved. * * This program is licensed to you under the Apache License Version 2.0, * and you may not use this file except in compliance with the Apache License Version 2.0. diff --git a/snowplow-tracker/src/androidTest/java/com/snowplowanalytics/snowplow/event/TransactionErrorTest.kt b/snowplow-tracker/src/androidTest/java/com/snowplowanalytics/snowplow/event/TransactionErrorTest.kt index 8e52cc002..d3c6dac72 100644 --- a/snowplow-tracker/src/androidTest/java/com/snowplowanalytics/snowplow/event/TransactionErrorTest.kt +++ b/snowplow-tracker/src/androidTest/java/com/snowplowanalytics/snowplow/event/TransactionErrorTest.kt @@ -1,5 +1,5 @@ /* - * Copyright (c) 2015-2023 Snowplow Analytics Ltd. All rights reserved. + * Copyright (c) 2015-present Snowplow Analytics Ltd. All rights reserved. * * This program is licensed to you under the Apache License Version 2.0, * and you may not use this file except in compliance with the Apache License Version 2.0. diff --git a/snowplow-tracker/src/androidTest/java/com/snowplowanalytics/snowplow/event/TransactionTest.kt b/snowplow-tracker/src/androidTest/java/com/snowplowanalytics/snowplow/event/TransactionTest.kt index f43c780da..3d312d2a5 100644 --- a/snowplow-tracker/src/androidTest/java/com/snowplowanalytics/snowplow/event/TransactionTest.kt +++ b/snowplow-tracker/src/androidTest/java/com/snowplowanalytics/snowplow/event/TransactionTest.kt @@ -1,5 +1,5 @@ /* - * Copyright (c) 2015-2023 Snowplow Analytics Ltd. All rights reserved. + * Copyright (c) 2015-present Snowplow Analytics Ltd. All rights reserved. * * This program is licensed to you under the Apache License Version 2.0, * and you may not use this file except in compliance with the Apache License Version 2.0. diff --git a/snowplow-tracker/src/androidTest/java/com/snowplowanalytics/snowplow/globalcontexts/GlobalContextTest.kt b/snowplow-tracker/src/androidTest/java/com/snowplowanalytics/snowplow/globalcontexts/GlobalContextTest.kt index daad3c3d2..98006a742 100644 --- a/snowplow-tracker/src/androidTest/java/com/snowplowanalytics/snowplow/globalcontexts/GlobalContextTest.kt +++ b/snowplow-tracker/src/androidTest/java/com/snowplowanalytics/snowplow/globalcontexts/GlobalContextTest.kt @@ -1,5 +1,5 @@ /* - * Copyright (c) 2015-2023 Snowplow Analytics Ltd. All rights reserved. + * Copyright (c) 2015-present Snowplow Analytics Ltd. All rights reserved. * * This program is licensed to you under the Apache License Version 2.0, * and you may not use this file except in compliance with the Apache License Version 2.0. diff --git a/snowplow-tracker/src/androidTest/java/com/snowplowanalytics/snowplow/globalcontexts/SchemaRuleSetTest.kt b/snowplow-tracker/src/androidTest/java/com/snowplowanalytics/snowplow/globalcontexts/SchemaRuleSetTest.kt index 5ef1a82aa..b8a5cb23e 100644 --- a/snowplow-tracker/src/androidTest/java/com/snowplowanalytics/snowplow/globalcontexts/SchemaRuleSetTest.kt +++ b/snowplow-tracker/src/androidTest/java/com/snowplowanalytics/snowplow/globalcontexts/SchemaRuleSetTest.kt @@ -1,5 +1,5 @@ /* - * Copyright (c) 2015-2023 Snowplow Analytics Ltd. All rights reserved. + * Copyright (c) 2015-present Snowplow Analytics Ltd. All rights reserved. * * This program is licensed to you under the Apache License Version 2.0, * and you may not use this file except in compliance with the Apache License Version 2.0. diff --git a/snowplow-tracker/src/androidTest/java/com/snowplowanalytics/snowplow/internal/emitter/storage/EventStoreTest.kt b/snowplow-tracker/src/androidTest/java/com/snowplowanalytics/snowplow/internal/emitter/storage/EventStoreTest.kt index 27c649cf4..672f61f6e 100755 --- a/snowplow-tracker/src/androidTest/java/com/snowplowanalytics/snowplow/internal/emitter/storage/EventStoreTest.kt +++ b/snowplow-tracker/src/androidTest/java/com/snowplowanalytics/snowplow/internal/emitter/storage/EventStoreTest.kt @@ -1,5 +1,5 @@ /* - * Copyright (c) 2015-2023 Snowplow Analytics Ltd. All rights reserved. + * Copyright (c) 2015-present Snowplow Analytics Ltd. All rights reserved. * * This program is licensed to you under the Apache License Version 2.0, * and you may not use this file except in compliance with the Apache License Version 2.0. diff --git a/snowplow-tracker/src/androidTest/java/com/snowplowanalytics/snowplow/internal/remoteconfiguration/RemoteConfigurationTest.kt b/snowplow-tracker/src/androidTest/java/com/snowplowanalytics/snowplow/internal/remoteconfiguration/RemoteConfigurationTest.kt index a1557518e..fd9e46be5 100644 --- a/snowplow-tracker/src/androidTest/java/com/snowplowanalytics/snowplow/internal/remoteconfiguration/RemoteConfigurationTest.kt +++ b/snowplow-tracker/src/androidTest/java/com/snowplowanalytics/snowplow/internal/remoteconfiguration/RemoteConfigurationTest.kt @@ -1,5 +1,5 @@ /* - * Copyright (c) 2015-2023 Snowplow Analytics Ltd. All rights reserved. + * Copyright (c) 2015-present Snowplow Analytics Ltd. All rights reserved. * * This program is licensed to you under the Apache License Version 2.0, * and you may not use this file except in compliance with the Apache License Version 2.0. diff --git a/snowplow-tracker/src/androidTest/java/com/snowplowanalytics/snowplow/internal/tracker/ConfigurationTest.kt b/snowplow-tracker/src/androidTest/java/com/snowplowanalytics/snowplow/internal/tracker/ConfigurationTest.kt index cfcf4e21f..1b058e2a0 100644 --- a/snowplow-tracker/src/androidTest/java/com/snowplowanalytics/snowplow/internal/tracker/ConfigurationTest.kt +++ b/snowplow-tracker/src/androidTest/java/com/snowplowanalytics/snowplow/internal/tracker/ConfigurationTest.kt @@ -1,5 +1,5 @@ /* - * Copyright (c) 2015-2023 Snowplow Analytics Ltd. All rights reserved. + * Copyright (c) 2015-present Snowplow Analytics Ltd. All rights reserved. * * This program is licensed to you under the Apache License Version 2.0, * and you may not use this file except in compliance with the Apache License Version 2.0. diff --git a/snowplow-tracker/src/androidTest/java/com/snowplowanalytics/snowplow/internal/tracker/EcommerceTest.kt b/snowplow-tracker/src/androidTest/java/com/snowplowanalytics/snowplow/internal/tracker/EcommerceTest.kt index fcacab032..e913c5ac3 100644 --- a/snowplow-tracker/src/androidTest/java/com/snowplowanalytics/snowplow/internal/tracker/EcommerceTest.kt +++ b/snowplow-tracker/src/androidTest/java/com/snowplowanalytics/snowplow/internal/tracker/EcommerceTest.kt @@ -1,5 +1,5 @@ /* - * Copyright (c) 2015-2023 Snowplow Analytics Ltd. All rights reserved. + * Copyright (c) 2015-present Snowplow Analytics Ltd. All rights reserved. * * This program is licensed to you under the Apache License Version 2.0, * and you may not use this file except in compliance with the Apache License Version 2.0. diff --git a/snowplow-tracker/src/androidTest/java/com/snowplowanalytics/snowplow/internal/tracker/MockDeviceInfoMonitor.kt b/snowplow-tracker/src/androidTest/java/com/snowplowanalytics/snowplow/internal/tracker/MockDeviceInfoMonitor.kt index 8a55dfc38..7346702f7 100644 --- a/snowplow-tracker/src/androidTest/java/com/snowplowanalytics/snowplow/internal/tracker/MockDeviceInfoMonitor.kt +++ b/snowplow-tracker/src/androidTest/java/com/snowplowanalytics/snowplow/internal/tracker/MockDeviceInfoMonitor.kt @@ -1,5 +1,5 @@ /* - * Copyright (c) 2015-2023 Snowplow Analytics Ltd. All rights reserved. + * Copyright (c) 2015-present Snowplow Analytics Ltd. All rights reserved. * * This program is licensed to you under the Apache License Version 2.0, * and you may not use this file except in compliance with the Apache License Version 2.0. diff --git a/snowplow-tracker/src/androidTest/java/com/snowplowanalytics/snowplow/internal/tracker/MultipleInstancesTest.kt b/snowplow-tracker/src/androidTest/java/com/snowplowanalytics/snowplow/internal/tracker/MultipleInstancesTest.kt index a495601dc..913f5583f 100644 --- a/snowplow-tracker/src/androidTest/java/com/snowplowanalytics/snowplow/internal/tracker/MultipleInstancesTest.kt +++ b/snowplow-tracker/src/androidTest/java/com/snowplowanalytics/snowplow/internal/tracker/MultipleInstancesTest.kt @@ -1,5 +1,5 @@ /* - * Copyright (c) 2015-2023 Snowplow Analytics Ltd. All rights reserved. + * Copyright (c) 2015-present Snowplow Analytics Ltd. All rights reserved. * * This program is licensed to you under the Apache License Version 2.0, * and you may not use this file except in compliance with the Apache License Version 2.0. diff --git a/snowplow-tracker/src/androidTest/java/com/snowplowanalytics/snowplow/internal/tracker/PlatformContextTest.kt b/snowplow-tracker/src/androidTest/java/com/snowplowanalytics/snowplow/internal/tracker/PlatformContextTest.kt index 381c38c6f..a96a87c45 100644 --- a/snowplow-tracker/src/androidTest/java/com/snowplowanalytics/snowplow/internal/tracker/PlatformContextTest.kt +++ b/snowplow-tracker/src/androidTest/java/com/snowplowanalytics/snowplow/internal/tracker/PlatformContextTest.kt @@ -1,5 +1,5 @@ /* - * Copyright (c) 2015-2023 Snowplow Analytics Ltd. All rights reserved. + * Copyright (c) 2015-present Snowplow Analytics Ltd. All rights reserved. * * This program is licensed to you under the Apache License Version 2.0, * and you may not use this file except in compliance with the Apache License Version 2.0. diff --git a/snowplow-tracker/src/androidTest/java/com/snowplowanalytics/snowplow/internal/tracker/StateManagerTest.kt b/snowplow-tracker/src/androidTest/java/com/snowplowanalytics/snowplow/internal/tracker/StateManagerTest.kt index 02c944d6a..5211763d1 100644 --- a/snowplow-tracker/src/androidTest/java/com/snowplowanalytics/snowplow/internal/tracker/StateManagerTest.kt +++ b/snowplow-tracker/src/androidTest/java/com/snowplowanalytics/snowplow/internal/tracker/StateManagerTest.kt @@ -1,5 +1,5 @@ /* - * Copyright (c) 2015-2023 Snowplow Analytics Ltd. All rights reserved. + * Copyright (c) 2015-present Snowplow Analytics Ltd. All rights reserved. * * This program is licensed to you under the Apache License Version 2.0, * and you may not use this file except in compliance with the Apache License Version 2.0. diff --git a/snowplow-tracker/src/androidTest/java/com/snowplowanalytics/snowplow/internal/tracker/TrackerTest.kt b/snowplow-tracker/src/androidTest/java/com/snowplowanalytics/snowplow/internal/tracker/TrackerTest.kt index b82f06b47..975681a77 100755 --- a/snowplow-tracker/src/androidTest/java/com/snowplowanalytics/snowplow/internal/tracker/TrackerTest.kt +++ b/snowplow-tracker/src/androidTest/java/com/snowplowanalytics/snowplow/internal/tracker/TrackerTest.kt @@ -1,5 +1,5 @@ /* - * Copyright (c) 2015-2023 Snowplow Analytics Ltd. All rights reserved. + * Copyright (c) 2015-present Snowplow Analytics Ltd. All rights reserved. * * This program is licensed to you under the Apache License Version 2.0, * and you may not use this file except in compliance with the Apache License Version 2.0. diff --git a/snowplow-tracker/src/androidTest/java/com/snowplowanalytics/snowplow/internal/utils/FileStoreTest.kt b/snowplow-tracker/src/androidTest/java/com/snowplowanalytics/snowplow/internal/utils/FileStoreTest.kt index e502ae35e..d0f697d84 100644 --- a/snowplow-tracker/src/androidTest/java/com/snowplowanalytics/snowplow/internal/utils/FileStoreTest.kt +++ b/snowplow-tracker/src/androidTest/java/com/snowplowanalytics/snowplow/internal/utils/FileStoreTest.kt @@ -1,5 +1,5 @@ /* - * Copyright (c) 2015-2023 Snowplow Analytics Ltd. All rights reserved. + * Copyright (c) 2015-present Snowplow Analytics Ltd. All rights reserved. * * This program is licensed to you under the Apache License Version 2.0, * and you may not use this file except in compliance with the Apache License Version 2.0. diff --git a/snowplow-tracker/src/androidTest/java/com/snowplowanalytics/snowplow/internal/utils/NotificationCenterTest.kt b/snowplow-tracker/src/androidTest/java/com/snowplowanalytics/snowplow/internal/utils/NotificationCenterTest.kt index 218129c59..41b635ad9 100644 --- a/snowplow-tracker/src/androidTest/java/com/snowplowanalytics/snowplow/internal/utils/NotificationCenterTest.kt +++ b/snowplow-tracker/src/androidTest/java/com/snowplowanalytics/snowplow/internal/utils/NotificationCenterTest.kt @@ -1,5 +1,5 @@ /* - * Copyright (c) 2015-2023 Snowplow Analytics Ltd. All rights reserved. + * Copyright (c) 2015-present Snowplow Analytics Ltd. All rights reserved. * * This program is licensed to you under the Apache License Version 2.0, * and you may not use this file except in compliance with the Apache License Version 2.0. diff --git a/snowplow-tracker/src/androidTest/java/com/snowplowanalytics/snowplow/internal/utils/UtilTest.kt b/snowplow-tracker/src/androidTest/java/com/snowplowanalytics/snowplow/internal/utils/UtilTest.kt index 348592d6e..fa61c8519 100644 --- a/snowplow-tracker/src/androidTest/java/com/snowplowanalytics/snowplow/internal/utils/UtilTest.kt +++ b/snowplow-tracker/src/androidTest/java/com/snowplowanalytics/snowplow/internal/utils/UtilTest.kt @@ -1,5 +1,5 @@ /* - * Copyright (c) 2015-2023 Snowplow Analytics Ltd. All rights reserved. + * Copyright (c) 2015-present Snowplow Analytics Ltd. All rights reserved. * * This program is licensed to you under the Apache License Version 2.0, * and you may not use this file except in compliance with the Apache License Version 2.0. diff --git a/snowplow-tracker/src/androidTest/java/com/snowplowanalytics/snowplow/media/MediaAdTrackingTest.kt b/snowplow-tracker/src/androidTest/java/com/snowplowanalytics/snowplow/media/MediaAdTrackingTest.kt index 086a0f18d..4f9765fcf 100644 --- a/snowplow-tracker/src/androidTest/java/com/snowplowanalytics/snowplow/media/MediaAdTrackingTest.kt +++ b/snowplow-tracker/src/androidTest/java/com/snowplowanalytics/snowplow/media/MediaAdTrackingTest.kt @@ -1,5 +1,5 @@ /* - * Copyright (c) 2015-2023 Snowplow Analytics Ltd. All rights reserved. + * Copyright (c) 2015-present Snowplow Analytics Ltd. All rights reserved. * * This program is licensed to you under the Apache License Version 2.0, * and you may not use this file except in compliance with the Apache License Version 2.0. diff --git a/snowplow-tracker/src/androidTest/java/com/snowplowanalytics/snowplow/media/MediaEventAndEntitySerializationTest.kt b/snowplow-tracker/src/androidTest/java/com/snowplowanalytics/snowplow/media/MediaEventAndEntitySerializationTest.kt index 52db0e2e4..bfc2a7fdd 100644 --- a/snowplow-tracker/src/androidTest/java/com/snowplowanalytics/snowplow/media/MediaEventAndEntitySerializationTest.kt +++ b/snowplow-tracker/src/androidTest/java/com/snowplowanalytics/snowplow/media/MediaEventAndEntitySerializationTest.kt @@ -1,5 +1,5 @@ /* - * Copyright (c) 2015-2023 Snowplow Analytics Ltd. All rights reserved. + * Copyright (c) 2015-present Snowplow Analytics Ltd. All rights reserved. * * This program is licensed to you under the Apache License Version 2.0, * and you may not use this file except in compliance with the Apache License Version 2.0. diff --git a/snowplow-tracker/src/androidTest/java/com/snowplowanalytics/snowplow/media/MediaSessionTrackingStatsTest.kt b/snowplow-tracker/src/androidTest/java/com/snowplowanalytics/snowplow/media/MediaSessionTrackingStatsTest.kt index b9fa8c7c6..fda79fc5a 100644 --- a/snowplow-tracker/src/androidTest/java/com/snowplowanalytics/snowplow/media/MediaSessionTrackingStatsTest.kt +++ b/snowplow-tracker/src/androidTest/java/com/snowplowanalytics/snowplow/media/MediaSessionTrackingStatsTest.kt @@ -1,5 +1,5 @@ /* - * Copyright (c) 2015-2023 Snowplow Analytics Ltd. All rights reserved. + * Copyright (c) 2015-present Snowplow Analytics Ltd. All rights reserved. * * This program is licensed to you under the Apache License Version 2.0, * and you may not use this file except in compliance with the Apache License Version 2.0. diff --git a/snowplow-tracker/src/androidTest/java/com/snowplowanalytics/snowplow/media/TestMediaController.kt b/snowplow-tracker/src/androidTest/java/com/snowplowanalytics/snowplow/media/TestMediaController.kt index bb3e399b4..a5210e0f3 100644 --- a/snowplow-tracker/src/androidTest/java/com/snowplowanalytics/snowplow/media/TestMediaController.kt +++ b/snowplow-tracker/src/androidTest/java/com/snowplowanalytics/snowplow/media/TestMediaController.kt @@ -1,5 +1,5 @@ /* - * Copyright (c) 2015-2023 Snowplow Analytics Ltd. All rights reserved. + * Copyright (c) 2015-present Snowplow Analytics Ltd. All rights reserved. * * This program is licensed to you under the Apache License Version 2.0, * and you may not use this file except in compliance with the Apache License Version 2.0. diff --git a/snowplow-tracker/src/androidTest/java/com/snowplowanalytics/snowplow/payload/SelfDescribingJsonTest.kt b/snowplow-tracker/src/androidTest/java/com/snowplowanalytics/snowplow/payload/SelfDescribingJsonTest.kt index 6ff56d987..334ec7cc4 100755 --- a/snowplow-tracker/src/androidTest/java/com/snowplowanalytics/snowplow/payload/SelfDescribingJsonTest.kt +++ b/snowplow-tracker/src/androidTest/java/com/snowplowanalytics/snowplow/payload/SelfDescribingJsonTest.kt @@ -1,5 +1,5 @@ /* - * Copyright (c) 2015-2023 Snowplow Analytics Ltd. All rights reserved. + * Copyright (c) 2015-present Snowplow Analytics Ltd. All rights reserved. * * This program is licensed to you under the Apache License Version 2.0, * and you may not use this file except in compliance with the Apache License Version 2.0. diff --git a/snowplow-tracker/src/androidTest/java/com/snowplowanalytics/snowplow/payload/TrackerPayloadTest.kt b/snowplow-tracker/src/androidTest/java/com/snowplowanalytics/snowplow/payload/TrackerPayloadTest.kt index 534e247f3..3e95f2a97 100755 --- a/snowplow-tracker/src/androidTest/java/com/snowplowanalytics/snowplow/payload/TrackerPayloadTest.kt +++ b/snowplow-tracker/src/androidTest/java/com/snowplowanalytics/snowplow/payload/TrackerPayloadTest.kt @@ -1,5 +1,5 @@ /* - * Copyright (c) 2015-2023 Snowplow Analytics Ltd. All rights reserved. + * Copyright (c) 2015-present Snowplow Analytics Ltd. All rights reserved. * * This program is licensed to you under the Apache License Version 2.0, * and you may not use this file except in compliance with the Apache License Version 2.0. diff --git a/snowplow-tracker/src/androidTest/java/com/snowplowanalytics/snowplow/screen/ScreenViewAutotrackingTest.kt b/snowplow-tracker/src/androidTest/java/com/snowplowanalytics/snowplow/screen/ScreenViewAutotrackingTest.kt index f94ce985e..a0fd293e2 100644 --- a/snowplow-tracker/src/androidTest/java/com/snowplowanalytics/snowplow/screen/ScreenViewAutotrackingTest.kt +++ b/snowplow-tracker/src/androidTest/java/com/snowplowanalytics/snowplow/screen/ScreenViewAutotrackingTest.kt @@ -1,5 +1,5 @@ /* - * Copyright (c) 2015-2023 Snowplow Analytics Ltd. All rights reserved. + * Copyright (c) 2015-present Snowplow Analytics Ltd. All rights reserved. * * This program is licensed to you under the Apache License Version 2.0, * and you may not use this file except in compliance with the Apache License Version 2.0. diff --git a/snowplow-tracker/src/androidTest/java/com/snowplowanalytics/snowplow/screenviews/ScreenSummaryStateMachineTest.kt b/snowplow-tracker/src/androidTest/java/com/snowplowanalytics/snowplow/screenviews/ScreenSummaryStateMachineTest.kt index 3eaddc8fe..93d3a8a33 100644 --- a/snowplow-tracker/src/androidTest/java/com/snowplowanalytics/snowplow/screenviews/ScreenSummaryStateMachineTest.kt +++ b/snowplow-tracker/src/androidTest/java/com/snowplowanalytics/snowplow/screenviews/ScreenSummaryStateMachineTest.kt @@ -1,5 +1,5 @@ /* - * Copyright (c) 2015-2023 Snowplow Analytics Ltd. All rights reserved. + * Copyright (c) 2015-present Snowplow Analytics Ltd. All rights reserved. * * This program is licensed to you under the Apache License Version 2.0, * and you may not use this file except in compliance with the Apache License Version 2.0. diff --git a/snowplow-tracker/src/androidTest/java/com/snowplowanalytics/snowplow/tracker/CollectorCookieJarTest.kt b/snowplow-tracker/src/androidTest/java/com/snowplowanalytics/snowplow/tracker/CollectorCookieJarTest.kt index e7dacb9a3..65f582bf9 100644 --- a/snowplow-tracker/src/androidTest/java/com/snowplowanalytics/snowplow/tracker/CollectorCookieJarTest.kt +++ b/snowplow-tracker/src/androidTest/java/com/snowplowanalytics/snowplow/tracker/CollectorCookieJarTest.kt @@ -1,5 +1,5 @@ /* - * Copyright (c) 2015-2023 Snowplow Analytics Ltd. All rights reserved. + * Copyright (c) 2015-present Snowplow Analytics Ltd. All rights reserved. * * This program is licensed to you under the Apache License Version 2.0, * and you may not use this file except in compliance with the Apache License Version 2.0. diff --git a/snowplow-tracker/src/androidTest/java/com/snowplowanalytics/snowplow/tracker/DevicePlatformTest.kt b/snowplow-tracker/src/androidTest/java/com/snowplowanalytics/snowplow/tracker/DevicePlatformTest.kt index 060189047..cb3b1715e 100644 --- a/snowplow-tracker/src/androidTest/java/com/snowplowanalytics/snowplow/tracker/DevicePlatformTest.kt +++ b/snowplow-tracker/src/androidTest/java/com/snowplowanalytics/snowplow/tracker/DevicePlatformTest.kt @@ -1,5 +1,5 @@ /* - * Copyright (c) 2015-2023 Snowplow Analytics Ltd. All rights reserved. + * Copyright (c) 2015-present Snowplow Analytics Ltd. All rights reserved. * * This program is licensed to you under the Apache License Version 2.0, * and you may not use this file except in compliance with the Apache License Version 2.0. diff --git a/snowplow-tracker/src/androidTest/java/com/snowplowanalytics/snowplow/tracker/EmitterTest.kt b/snowplow-tracker/src/androidTest/java/com/snowplowanalytics/snowplow/tracker/EmitterTest.kt index 13968bd46..39b6296fe 100755 --- a/snowplow-tracker/src/androidTest/java/com/snowplowanalytics/snowplow/tracker/EmitterTest.kt +++ b/snowplow-tracker/src/androidTest/java/com/snowplowanalytics/snowplow/tracker/EmitterTest.kt @@ -1,5 +1,5 @@ /* - * Copyright (c) 2015-2023 Snowplow Analytics Ltd. All rights reserved. + * Copyright (c) 2015-present Snowplow Analytics Ltd. All rights reserved. * * This program is licensed to you under the Apache License Version 2.0, * and you may not use this file except in compliance with the Apache License Version 2.0. diff --git a/snowplow-tracker/src/androidTest/java/com/snowplowanalytics/snowplow/tracker/ExecutorTest.kt b/snowplow-tracker/src/androidTest/java/com/snowplowanalytics/snowplow/tracker/ExecutorTest.kt index 94a224c3e..195cccfb6 100644 --- a/snowplow-tracker/src/androidTest/java/com/snowplowanalytics/snowplow/tracker/ExecutorTest.kt +++ b/snowplow-tracker/src/androidTest/java/com/snowplowanalytics/snowplow/tracker/ExecutorTest.kt @@ -1,5 +1,5 @@ /* - * Copyright (c) 2015-2023 Snowplow Analytics Ltd. All rights reserved. + * Copyright (c) 2015-present Snowplow Analytics Ltd. All rights reserved. * * This program is licensed to you under the Apache License Version 2.0, * and you may not use this file except in compliance with the Apache License Version 2.0. diff --git a/snowplow-tracker/src/androidTest/java/com/snowplowanalytics/snowplow/tracker/FocalMeterConfigurationTest.kt b/snowplow-tracker/src/androidTest/java/com/snowplowanalytics/snowplow/tracker/FocalMeterConfigurationTest.kt index e999361da..57f471dd2 100644 --- a/snowplow-tracker/src/androidTest/java/com/snowplowanalytics/snowplow/tracker/FocalMeterConfigurationTest.kt +++ b/snowplow-tracker/src/androidTest/java/com/snowplowanalytics/snowplow/tracker/FocalMeterConfigurationTest.kt @@ -1,5 +1,5 @@ /* - * Copyright (c) 2015-2023 Snowplow Analytics Ltd. All rights reserved. + * Copyright (c) 2015-present Snowplow Analytics Ltd. All rights reserved. * * This program is licensed to you under the Apache License Version 2.0, * and you may not use this file except in compliance with the Apache License Version 2.0. diff --git a/snowplow-tracker/src/androidTest/java/com/snowplowanalytics/snowplow/tracker/LoggingTest.kt b/snowplow-tracker/src/androidTest/java/com/snowplowanalytics/snowplow/tracker/LoggingTest.kt index 656bbf177..2c3f68d4d 100644 --- a/snowplow-tracker/src/androidTest/java/com/snowplowanalytics/snowplow/tracker/LoggingTest.kt +++ b/snowplow-tracker/src/androidTest/java/com/snowplowanalytics/snowplow/tracker/LoggingTest.kt @@ -1,5 +1,5 @@ /* - * Copyright (c) 2015-2023 Snowplow Analytics Ltd. All rights reserved. + * Copyright (c) 2015-present Snowplow Analytics Ltd. All rights reserved. * * This program is licensed to you under the Apache License Version 2.0, * and you may not use this file except in compliance with the Apache License Version 2.0. diff --git a/snowplow-tracker/src/androidTest/java/com/snowplowanalytics/snowplow/tracker/MockEventStore.kt b/snowplow-tracker/src/androidTest/java/com/snowplowanalytics/snowplow/tracker/MockEventStore.kt index 07b1a1310..9f4930b83 100644 --- a/snowplow-tracker/src/androidTest/java/com/snowplowanalytics/snowplow/tracker/MockEventStore.kt +++ b/snowplow-tracker/src/androidTest/java/com/snowplowanalytics/snowplow/tracker/MockEventStore.kt @@ -1,5 +1,5 @@ /* - * Copyright (c) 2015-2023 Snowplow Analytics Ltd. All rights reserved. + * Copyright (c) 2015-present Snowplow Analytics Ltd. All rights reserved. * * This program is licensed to you under the Apache License Version 2.0, * and you may not use this file except in compliance with the Apache License Version 2.0. diff --git a/snowplow-tracker/src/androidTest/java/com/snowplowanalytics/snowplow/tracker/MockNetworkConnection.kt b/snowplow-tracker/src/androidTest/java/com/snowplowanalytics/snowplow/tracker/MockNetworkConnection.kt index 5f2a41665..adba3b334 100644 --- a/snowplow-tracker/src/androidTest/java/com/snowplowanalytics/snowplow/tracker/MockNetworkConnection.kt +++ b/snowplow-tracker/src/androidTest/java/com/snowplowanalytics/snowplow/tracker/MockNetworkConnection.kt @@ -1,5 +1,5 @@ /* - * Copyright (c) 2015-2023 Snowplow Analytics Ltd. All rights reserved. + * Copyright (c) 2015-present Snowplow Analytics Ltd. All rights reserved. * * This program is licensed to you under the Apache License Version 2.0, * and you may not use this file except in compliance with the Apache License Version 2.0. diff --git a/snowplow-tracker/src/androidTest/java/com/snowplowanalytics/snowplow/tracker/NetworkConnectionTest.kt b/snowplow-tracker/src/androidTest/java/com/snowplowanalytics/snowplow/tracker/NetworkConnectionTest.kt index 94ca1ec7a..8236d4ccc 100644 --- a/snowplow-tracker/src/androidTest/java/com/snowplowanalytics/snowplow/tracker/NetworkConnectionTest.kt +++ b/snowplow-tracker/src/androidTest/java/com/snowplowanalytics/snowplow/tracker/NetworkConnectionTest.kt @@ -1,5 +1,5 @@ /* - * Copyright (c) 2015-2023 Snowplow Analytics Ltd. All rights reserved. + * Copyright (c) 2015-present Snowplow Analytics Ltd. All rights reserved. * * This program is licensed to you under the Apache License Version 2.0, * and you may not use this file except in compliance with the Apache License Version 2.0. diff --git a/snowplow-tracker/src/androidTest/java/com/snowplowanalytics/snowplow/tracker/PluginsTest.kt b/snowplow-tracker/src/androidTest/java/com/snowplowanalytics/snowplow/tracker/PluginsTest.kt index 6b1ffad6b..6c173512c 100644 --- a/snowplow-tracker/src/androidTest/java/com/snowplowanalytics/snowplow/tracker/PluginsTest.kt +++ b/snowplow-tracker/src/androidTest/java/com/snowplowanalytics/snowplow/tracker/PluginsTest.kt @@ -1,5 +1,5 @@ /* - * Copyright (c) 2015-2023 Snowplow Analytics Ltd. All rights reserved. + * Copyright (c) 2015-present Snowplow Analytics Ltd. All rights reserved. * * This program is licensed to you under the Apache License Version 2.0, * and you may not use this file except in compliance with the Apache License Version 2.0. diff --git a/snowplow-tracker/src/androidTest/java/com/snowplowanalytics/snowplow/tracker/RequestResultTest.kt b/snowplow-tracker/src/androidTest/java/com/snowplowanalytics/snowplow/tracker/RequestResultTest.kt index bba0dd2f0..11088420d 100644 --- a/snowplow-tracker/src/androidTest/java/com/snowplowanalytics/snowplow/tracker/RequestResultTest.kt +++ b/snowplow-tracker/src/androidTest/java/com/snowplowanalytics/snowplow/tracker/RequestResultTest.kt @@ -1,5 +1,5 @@ /* - * Copyright (c) 2015-2023 Snowplow Analytics Ltd. All rights reserved. + * Copyright (c) 2015-present Snowplow Analytics Ltd. All rights reserved. * * This program is licensed to you under the Apache License Version 2.0, * and you may not use this file except in compliance with the Apache License Version 2.0. diff --git a/snowplow-tracker/src/androidTest/java/com/snowplowanalytics/snowplow/tracker/ServiceProviderTest.kt b/snowplow-tracker/src/androidTest/java/com/snowplowanalytics/snowplow/tracker/ServiceProviderTest.kt index 6383fb945..f45a42f09 100644 --- a/snowplow-tracker/src/androidTest/java/com/snowplowanalytics/snowplow/tracker/ServiceProviderTest.kt +++ b/snowplow-tracker/src/androidTest/java/com/snowplowanalytics/snowplow/tracker/ServiceProviderTest.kt @@ -1,5 +1,5 @@ /* - * Copyright (c) 2015-2023 Snowplow Analytics Ltd. All rights reserved. + * Copyright (c) 2015-present Snowplow Analytics Ltd. All rights reserved. * * This program is licensed to you under the Apache License Version 2.0, * and you may not use this file except in compliance with the Apache License Version 2.0. diff --git a/snowplow-tracker/src/androidTest/java/com/snowplowanalytics/snowplow/tracker/SessionTest.kt b/snowplow-tracker/src/androidTest/java/com/snowplowanalytics/snowplow/tracker/SessionTest.kt index 015625ba5..062d575c9 100644 --- a/snowplow-tracker/src/androidTest/java/com/snowplowanalytics/snowplow/tracker/SessionTest.kt +++ b/snowplow-tracker/src/androidTest/java/com/snowplowanalytics/snowplow/tracker/SessionTest.kt @@ -1,5 +1,5 @@ /* - * Copyright (c) 2015-2023 Snowplow Analytics Ltd. All rights reserved. + * Copyright (c) 2015-present Snowplow Analytics Ltd. All rights reserved. * * This program is licensed to you under the Apache License Version 2.0, * and you may not use this file except in compliance with the Apache License Version 2.0. diff --git a/snowplow-tracker/src/androidTest/java/com/snowplowanalytics/snowplow/tracker/SubjectTest.kt b/snowplow-tracker/src/androidTest/java/com/snowplowanalytics/snowplow/tracker/SubjectTest.kt index e63b75d16..ab21f1f16 100755 --- a/snowplow-tracker/src/androidTest/java/com/snowplowanalytics/snowplow/tracker/SubjectTest.kt +++ b/snowplow-tracker/src/androidTest/java/com/snowplowanalytics/snowplow/tracker/SubjectTest.kt @@ -1,5 +1,5 @@ /* - * Copyright (c) 2015-2023 Snowplow Analytics Ltd. All rights reserved. + * Copyright (c) 2015-present Snowplow Analytics Ltd. All rights reserved. * * This program is licensed to you under the Apache License Version 2.0, * and you may not use this file except in compliance with the Apache License Version 2.0. diff --git a/snowplow-tracker/src/androidTest/java/com/snowplowanalytics/snowplow/tracker/TrackerWebViewInterfaceTest.kt b/snowplow-tracker/src/androidTest/java/com/snowplowanalytics/snowplow/tracker/TrackerWebViewInterfaceTest.kt index ab5bcac2e..caaa4dd05 100644 --- a/snowplow-tracker/src/androidTest/java/com/snowplowanalytics/snowplow/tracker/TrackerWebViewInterfaceTest.kt +++ b/snowplow-tracker/src/androidTest/java/com/snowplowanalytics/snowplow/tracker/TrackerWebViewInterfaceTest.kt @@ -1,5 +1,5 @@ /* - * Copyright (c) 2015-2023 Snowplow Analytics Ltd. All rights reserved. + * Copyright (c) 2015-present Snowplow Analytics Ltd. All rights reserved. * * This program is licensed to you under the Apache License Version 2.0, * and you may not use this file except in compliance with the Apache License Version 2.0. diff --git a/snowplow-tracker/src/androidTest/java/com/snowplowanalytics/snowplow/tracker/emitter/TLSArgumentsTest.kt b/snowplow-tracker/src/androidTest/java/com/snowplowanalytics/snowplow/tracker/emitter/TLSArgumentsTest.kt index b91991555..ecdf6a655 100644 --- a/snowplow-tracker/src/androidTest/java/com/snowplowanalytics/snowplow/tracker/emitter/TLSArgumentsTest.kt +++ b/snowplow-tracker/src/androidTest/java/com/snowplowanalytics/snowplow/tracker/emitter/TLSArgumentsTest.kt @@ -1,5 +1,5 @@ /* - * Copyright (c) 2015-2023 Snowplow Analytics Ltd. All rights reserved. + * Copyright (c) 2015-present Snowplow Analytics Ltd. All rights reserved. * * This program is licensed to you under the Apache License Version 2.0, * and you may not use this file except in compliance with the Apache License Version 2.0. diff --git a/snowplow-tracker/src/androidTest/java/com/snowplowanalytics/snowplow/tracker/integration/EventSendingTest.kt b/snowplow-tracker/src/androidTest/java/com/snowplowanalytics/snowplow/tracker/integration/EventSendingTest.kt index a3db9c82b..99031d24e 100644 --- a/snowplow-tracker/src/androidTest/java/com/snowplowanalytics/snowplow/tracker/integration/EventSendingTest.kt +++ b/snowplow-tracker/src/androidTest/java/com/snowplowanalytics/snowplow/tracker/integration/EventSendingTest.kt @@ -1,5 +1,5 @@ /* - * Copyright (c) 2015-2023 Snowplow Analytics Ltd. All rights reserved. + * Copyright (c) 2015-present Snowplow Analytics Ltd. All rights reserved. * * This program is licensed to you under the Apache License Version 2.0, * and you may not use this file except in compliance with the Apache License Version 2.0. diff --git a/snowplow-tracker/src/androidTest/java/com/snowplowanalytics/snowplow/tracker/noise/NoiseTest.kt b/snowplow-tracker/src/androidTest/java/com/snowplowanalytics/snowplow/tracker/noise/NoiseTest.kt index bc568b311..704c204f2 100644 --- a/snowplow-tracker/src/androidTest/java/com/snowplowanalytics/snowplow/tracker/noise/NoiseTest.kt +++ b/snowplow-tracker/src/androidTest/java/com/snowplowanalytics/snowplow/tracker/noise/NoiseTest.kt @@ -1,5 +1,5 @@ /* - * Copyright (c) 2015-2023 Snowplow Analytics Ltd. All rights reserved. + * Copyright (c) 2015-present Snowplow Analytics Ltd. All rights reserved. * * This program is licensed to you under the Apache License Version 2.0, * and you may not use this file except in compliance with the Apache License Version 2.0. diff --git a/snowplow-tracker/src/androidTest/java/com/snowplowanalytics/snowplow/util/TestUtils.kt b/snowplow-tracker/src/androidTest/java/com/snowplowanalytics/snowplow/util/TestUtils.kt index 99c6163a4..b12936985 100644 --- a/snowplow-tracker/src/androidTest/java/com/snowplowanalytics/snowplow/util/TestUtils.kt +++ b/snowplow-tracker/src/androidTest/java/com/snowplowanalytics/snowplow/util/TestUtils.kt @@ -1,5 +1,5 @@ /* - * Copyright (c) 2015-2023 Snowplow Analytics Ltd. All rights reserved. + * Copyright (c) 2015-present Snowplow Analytics Ltd. All rights reserved. * * This program is licensed to you under the Apache License Version 2.0, * and you may not use this file except in compliance with the Apache License Version 2.0. diff --git a/snowplow-tracker/src/androidTest/java/com/snowplowanalytics/snowplow/util/TimeTraveler.kt b/snowplow-tracker/src/androidTest/java/com/snowplowanalytics/snowplow/util/TimeTraveler.kt index 31edd6850..156601ebb 100644 --- a/snowplow-tracker/src/androidTest/java/com/snowplowanalytics/snowplow/util/TimeTraveler.kt +++ b/snowplow-tracker/src/androidTest/java/com/snowplowanalytics/snowplow/util/TimeTraveler.kt @@ -1,5 +1,5 @@ /* - * Copyright (c) 2015-2023 Snowplow Analytics Ltd. All rights reserved. + * Copyright (c) 2015-present Snowplow Analytics Ltd. All rights reserved. * * This program is licensed to you under the Apache License Version 2.0, * and you may not use this file except in compliance with the Apache License Version 2.0. diff --git a/snowplow-tracker/src/main/java/com/snowplowanalytics/core/Controller.kt b/snowplow-tracker/src/main/java/com/snowplowanalytics/core/Controller.kt index 5a0c7f708..bdecf3046 100644 --- a/snowplow-tracker/src/main/java/com/snowplowanalytics/core/Controller.kt +++ b/snowplow-tracker/src/main/java/com/snowplowanalytics/core/Controller.kt @@ -1,5 +1,5 @@ /* - * Copyright (c) 2015-2023 Snowplow Analytics Ltd. All rights reserved. + * Copyright (c) 2015-present Snowplow Analytics Ltd. All rights reserved. * * This program is licensed to you under the Apache License Version 2.0, * and you may not use this file except in compliance with the Apache License Version 2.0. diff --git a/snowplow-tracker/src/main/java/com/snowplowanalytics/core/constants/Parameters.kt b/snowplow-tracker/src/main/java/com/snowplowanalytics/core/constants/Parameters.kt index 36af0bb57..f29d85ae5 100755 --- a/snowplow-tracker/src/main/java/com/snowplowanalytics/core/constants/Parameters.kt +++ b/snowplow-tracker/src/main/java/com/snowplowanalytics/core/constants/Parameters.kt @@ -1,5 +1,5 @@ /* - * Copyright (c) 2015-2023 Snowplow Analytics Ltd. All rights reserved. + * Copyright (c) 2015-present Snowplow Analytics Ltd. All rights reserved. * * This program is licensed to you under the Apache License Version 2.0, * and you may not use this file except in compliance with the Apache License Version 2.0. diff --git a/snowplow-tracker/src/main/java/com/snowplowanalytics/core/constants/TrackerConstants.kt b/snowplow-tracker/src/main/java/com/snowplowanalytics/core/constants/TrackerConstants.kt index e0b9a4281..fd67e360b 100755 --- a/snowplow-tracker/src/main/java/com/snowplowanalytics/core/constants/TrackerConstants.kt +++ b/snowplow-tracker/src/main/java/com/snowplowanalytics/core/constants/TrackerConstants.kt @@ -1,5 +1,5 @@ /* - * Copyright (c) 2015-2023 Snowplow Analytics Ltd. All rights reserved. + * Copyright (c) 2015-present Snowplow Analytics Ltd. All rights reserved. * * This program is licensed to you under the Apache License Version 2.0, * and you may not use this file except in compliance with the Apache License Version 2.0. diff --git a/snowplow-tracker/src/main/java/com/snowplowanalytics/core/ecommerce/EcommerceAction.kt b/snowplow-tracker/src/main/java/com/snowplowanalytics/core/ecommerce/EcommerceAction.kt index c175a7034..cfabb54bf 100644 --- a/snowplow-tracker/src/main/java/com/snowplowanalytics/core/ecommerce/EcommerceAction.kt +++ b/snowplow-tracker/src/main/java/com/snowplowanalytics/core/ecommerce/EcommerceAction.kt @@ -1,5 +1,5 @@ /* - * Copyright (c) 2015-2023 Snowplow Analytics Ltd. All rights reserved. + * Copyright (c) 2015-present Snowplow Analytics Ltd. All rights reserved. * * This program is licensed to you under the Apache License Version 2.0, * and you may not use this file except in compliance with the Apache License Version 2.0. diff --git a/snowplow-tracker/src/main/java/com/snowplowanalytics/core/ecommerce/EcommerceControllerImpl.kt b/snowplow-tracker/src/main/java/com/snowplowanalytics/core/ecommerce/EcommerceControllerImpl.kt index 35d38eeb3..5305338ab 100644 --- a/snowplow-tracker/src/main/java/com/snowplowanalytics/core/ecommerce/EcommerceControllerImpl.kt +++ b/snowplow-tracker/src/main/java/com/snowplowanalytics/core/ecommerce/EcommerceControllerImpl.kt @@ -1,5 +1,5 @@ /* - * Copyright (c) 2015-2023 Snowplow Analytics Ltd. All rights reserved. + * Copyright (c) 2015-present Snowplow Analytics Ltd. All rights reserved. * * This program is licensed to you under the Apache License Version 2.0, * and you may not use this file except in compliance with the Apache License Version 2.0. diff --git a/snowplow-tracker/src/main/java/com/snowplowanalytics/core/emitter/Emitter.kt b/snowplow-tracker/src/main/java/com/snowplowanalytics/core/emitter/Emitter.kt index 849eb50b5..220acef7a 100755 --- a/snowplow-tracker/src/main/java/com/snowplowanalytics/core/emitter/Emitter.kt +++ b/snowplow-tracker/src/main/java/com/snowplowanalytics/core/emitter/Emitter.kt @@ -1,5 +1,5 @@ /* - * Copyright (c) 2015-2023 Snowplow Analytics Ltd. All rights reserved. + * Copyright (c) 2015-present Snowplow Analytics Ltd. All rights reserved. * * This program is licensed to you under the Apache License Version 2.0, * and you may not use this file except in compliance with the Apache License Version 2.0. diff --git a/snowplow-tracker/src/main/java/com/snowplowanalytics/core/emitter/EmitterConfigurationInterface.kt b/snowplow-tracker/src/main/java/com/snowplowanalytics/core/emitter/EmitterConfigurationInterface.kt index bae69d0b6..3ced5c392 100644 --- a/snowplow-tracker/src/main/java/com/snowplowanalytics/core/emitter/EmitterConfigurationInterface.kt +++ b/snowplow-tracker/src/main/java/com/snowplowanalytics/core/emitter/EmitterConfigurationInterface.kt @@ -1,5 +1,5 @@ /* - * Copyright (c) 2015-2023 Snowplow Analytics Ltd. All rights reserved. + * Copyright (c) 2015-present Snowplow Analytics Ltd. All rights reserved. * * This program is licensed to you under the Apache License Version 2.0, * and you may not use this file except in compliance with the Apache License Version 2.0. diff --git a/snowplow-tracker/src/main/java/com/snowplowanalytics/core/emitter/EmitterControllerImpl.kt b/snowplow-tracker/src/main/java/com/snowplowanalytics/core/emitter/EmitterControllerImpl.kt index 03e51374e..8cd1d27fe 100644 --- a/snowplow-tracker/src/main/java/com/snowplowanalytics/core/emitter/EmitterControllerImpl.kt +++ b/snowplow-tracker/src/main/java/com/snowplowanalytics/core/emitter/EmitterControllerImpl.kt @@ -1,5 +1,5 @@ /* - * Copyright (c) 2015-2023 Snowplow Analytics Ltd. All rights reserved. + * Copyright (c) 2015-present Snowplow Analytics Ltd. All rights reserved. * * This program is licensed to you under the Apache License Version 2.0, * and you may not use this file except in compliance with the Apache License Version 2.0. diff --git a/snowplow-tracker/src/main/java/com/snowplowanalytics/core/emitter/EmitterDefaults.kt b/snowplow-tracker/src/main/java/com/snowplowanalytics/core/emitter/EmitterDefaults.kt index 8a5c96b58..6ff9e8abb 100644 --- a/snowplow-tracker/src/main/java/com/snowplowanalytics/core/emitter/EmitterDefaults.kt +++ b/snowplow-tracker/src/main/java/com/snowplowanalytics/core/emitter/EmitterDefaults.kt @@ -1,5 +1,5 @@ /* - * Copyright (c) 2015-2023 Snowplow Analytics Ltd. All rights reserved. + * Copyright (c) 2015-present Snowplow Analytics Ltd. All rights reserved. * * This program is licensed to you under the Apache License Version 2.0, * and you may not use this file except in compliance with the Apache License Version 2.0. diff --git a/snowplow-tracker/src/main/java/com/snowplowanalytics/core/emitter/Executor.kt b/snowplow-tracker/src/main/java/com/snowplowanalytics/core/emitter/Executor.kt index 99069b96d..41356b8f8 100755 --- a/snowplow-tracker/src/main/java/com/snowplowanalytics/core/emitter/Executor.kt +++ b/snowplow-tracker/src/main/java/com/snowplowanalytics/core/emitter/Executor.kt @@ -1,5 +1,5 @@ /* - * Copyright (c) 2015-2023 Snowplow Analytics Ltd. All rights reserved. + * Copyright (c) 2015-present Snowplow Analytics Ltd. All rights reserved. * * This program is licensed to you under the Apache License Version 2.0, * and you may not use this file except in compliance with the Apache License Version 2.0. diff --git a/snowplow-tracker/src/main/java/com/snowplowanalytics/core/emitter/NetworkConfigurationInterface.kt b/snowplow-tracker/src/main/java/com/snowplowanalytics/core/emitter/NetworkConfigurationInterface.kt index a611a503b..8e793a79d 100644 --- a/snowplow-tracker/src/main/java/com/snowplowanalytics/core/emitter/NetworkConfigurationInterface.kt +++ b/snowplow-tracker/src/main/java/com/snowplowanalytics/core/emitter/NetworkConfigurationInterface.kt @@ -1,5 +1,5 @@ /* - * Copyright (c) 2015-2023 Snowplow Analytics Ltd. All rights reserved. + * Copyright (c) 2015-present Snowplow Analytics Ltd. All rights reserved. * * This program is licensed to you under the Apache License Version 2.0, * and you may not use this file except in compliance with the Apache License Version 2.0. diff --git a/snowplow-tracker/src/main/java/com/snowplowanalytics/core/emitter/NetworkControllerImpl.kt b/snowplow-tracker/src/main/java/com/snowplowanalytics/core/emitter/NetworkControllerImpl.kt index 7ba78052d..81b21c983 100644 --- a/snowplow-tracker/src/main/java/com/snowplowanalytics/core/emitter/NetworkControllerImpl.kt +++ b/snowplow-tracker/src/main/java/com/snowplowanalytics/core/emitter/NetworkControllerImpl.kt @@ -1,5 +1,5 @@ /* - * Copyright (c) 2015-2023 Snowplow Analytics Ltd. All rights reserved. + * Copyright (c) 2015-present Snowplow Analytics Ltd. All rights reserved. * * This program is licensed to you under the Apache License Version 2.0, * and you may not use this file except in compliance with the Apache License Version 2.0. diff --git a/snowplow-tracker/src/main/java/com/snowplowanalytics/core/emitter/TLSArguments.kt b/snowplow-tracker/src/main/java/com/snowplowanalytics/core/emitter/TLSArguments.kt index 7bad62f87..56cbfa03e 100644 --- a/snowplow-tracker/src/main/java/com/snowplowanalytics/core/emitter/TLSArguments.kt +++ b/snowplow-tracker/src/main/java/com/snowplowanalytics/core/emitter/TLSArguments.kt @@ -1,5 +1,5 @@ /* - * Copyright (c) 2015-2023 Snowplow Analytics Ltd. All rights reserved. + * Copyright (c) 2015-present Snowplow Analytics Ltd. All rights reserved. * * This program is licensed to you under the Apache License Version 2.0, * and you may not use this file except in compliance with the Apache License Version 2.0. diff --git a/snowplow-tracker/src/main/java/com/snowplowanalytics/core/emitter/TLSSocketFactory.kt b/snowplow-tracker/src/main/java/com/snowplowanalytics/core/emitter/TLSSocketFactory.kt index 04db4fab1..9e5513cef 100644 --- a/snowplow-tracker/src/main/java/com/snowplowanalytics/core/emitter/TLSSocketFactory.kt +++ b/snowplow-tracker/src/main/java/com/snowplowanalytics/core/emitter/TLSSocketFactory.kt @@ -1,5 +1,5 @@ /* - * Copyright (c) 2015-2023 Snowplow Analytics Ltd. All rights reserved. + * Copyright (c) 2015-present Snowplow Analytics Ltd. All rights reserved. * * This program is licensed to you under the Apache License Version 2.0, * and you may not use this file except in compliance with the Apache License Version 2.0. diff --git a/snowplow-tracker/src/main/java/com/snowplowanalytics/core/emitter/TLSVersion.kt b/snowplow-tracker/src/main/java/com/snowplowanalytics/core/emitter/TLSVersion.kt index 4ea812bd2..4a8f8c9d0 100644 --- a/snowplow-tracker/src/main/java/com/snowplowanalytics/core/emitter/TLSVersion.kt +++ b/snowplow-tracker/src/main/java/com/snowplowanalytics/core/emitter/TLSVersion.kt @@ -1,5 +1,5 @@ /* - * Copyright (c) 2015-2023 Snowplow Analytics Ltd. All rights reserved. + * Copyright (c) 2015-present Snowplow Analytics Ltd. All rights reserved. * * This program is licensed to you under the Apache License Version 2.0, * and you may not use this file except in compliance with the Apache License Version 2.0. diff --git a/snowplow-tracker/src/main/java/com/snowplowanalytics/core/emitter/storage/EventStoreHelper.kt b/snowplow-tracker/src/main/java/com/snowplowanalytics/core/emitter/storage/EventStoreHelper.kt index a2856a4da..856e52110 100755 --- a/snowplow-tracker/src/main/java/com/snowplowanalytics/core/emitter/storage/EventStoreHelper.kt +++ b/snowplow-tracker/src/main/java/com/snowplowanalytics/core/emitter/storage/EventStoreHelper.kt @@ -1,5 +1,5 @@ /* - * Copyright (c) 2015-2023 Snowplow Analytics Ltd. All rights reserved. + * Copyright (c) 2015-present Snowplow Analytics Ltd. All rights reserved. * * This program is licensed to you under the Apache License Version 2.0, * and you may not use this file except in compliance with the Apache License Version 2.0. diff --git a/snowplow-tracker/src/main/java/com/snowplowanalytics/core/emitter/storage/SQLiteEventStore.kt b/snowplow-tracker/src/main/java/com/snowplowanalytics/core/emitter/storage/SQLiteEventStore.kt index a2fc02a4b..75ae8f8aa 100755 --- a/snowplow-tracker/src/main/java/com/snowplowanalytics/core/emitter/storage/SQLiteEventStore.kt +++ b/snowplow-tracker/src/main/java/com/snowplowanalytics/core/emitter/storage/SQLiteEventStore.kt @@ -1,5 +1,5 @@ /* - * Copyright (c) 2015-2023 Snowplow Analytics Ltd. All rights reserved. + * Copyright (c) 2015-present Snowplow Analytics Ltd. All rights reserved. * * This program is licensed to you under the Apache License Version 2.0, * and you may not use this file except in compliance with the Apache License Version 2.0. diff --git a/snowplow-tracker/src/main/java/com/snowplowanalytics/core/event/ScreenEnd.kt b/snowplow-tracker/src/main/java/com/snowplowanalytics/core/event/ScreenEnd.kt index a6d22a3a5..5aceecb16 100644 --- a/snowplow-tracker/src/main/java/com/snowplowanalytics/core/event/ScreenEnd.kt +++ b/snowplow-tracker/src/main/java/com/snowplowanalytics/core/event/ScreenEnd.kt @@ -1,5 +1,5 @@ /* - * Copyright (c) 2015-2023 Snowplow Analytics Ltd. All rights reserved. + * Copyright (c) 2015-present Snowplow Analytics Ltd. All rights reserved. * * This program is licensed to you under the Apache License Version 2.0, * and you may not use this file except in compliance with the Apache License Version 2.0. diff --git a/snowplow-tracker/src/main/java/com/snowplowanalytics/core/gdpr/Gdpr.kt b/snowplow-tracker/src/main/java/com/snowplowanalytics/core/gdpr/Gdpr.kt index 60189776e..36642a686 100644 --- a/snowplow-tracker/src/main/java/com/snowplowanalytics/core/gdpr/Gdpr.kt +++ b/snowplow-tracker/src/main/java/com/snowplowanalytics/core/gdpr/Gdpr.kt @@ -1,5 +1,5 @@ /* - * Copyright (c) 2015-2023 Snowplow Analytics Ltd. All rights reserved. + * Copyright (c) 2015-present Snowplow Analytics Ltd. All rights reserved. * * This program is licensed to you under the Apache License Version 2.0, * and you may not use this file except in compliance with the Apache License Version 2.0. diff --git a/snowplow-tracker/src/main/java/com/snowplowanalytics/core/gdpr/GdprConfigurationInterface.kt b/snowplow-tracker/src/main/java/com/snowplowanalytics/core/gdpr/GdprConfigurationInterface.kt index 3b0f79810..be09d2e96 100644 --- a/snowplow-tracker/src/main/java/com/snowplowanalytics/core/gdpr/GdprConfigurationInterface.kt +++ b/snowplow-tracker/src/main/java/com/snowplowanalytics/core/gdpr/GdprConfigurationInterface.kt @@ -1,5 +1,5 @@ /* - * Copyright (c) 2015-2023 Snowplow Analytics Ltd. All rights reserved. + * Copyright (c) 2015-present Snowplow Analytics Ltd. All rights reserved. * * This program is licensed to you under the Apache License Version 2.0, * and you may not use this file except in compliance with the Apache License Version 2.0. diff --git a/snowplow-tracker/src/main/java/com/snowplowanalytics/core/gdpr/GdprControllerImpl.kt b/snowplow-tracker/src/main/java/com/snowplowanalytics/core/gdpr/GdprControllerImpl.kt index 397804d81..fc1d4eef0 100644 --- a/snowplow-tracker/src/main/java/com/snowplowanalytics/core/gdpr/GdprControllerImpl.kt +++ b/snowplow-tracker/src/main/java/com/snowplowanalytics/core/gdpr/GdprControllerImpl.kt @@ -1,5 +1,5 @@ /* - * Copyright (c) 2015-2023 Snowplow Analytics Ltd. All rights reserved. + * Copyright (c) 2015-present Snowplow Analytics Ltd. All rights reserved. * * This program is licensed to you under the Apache License Version 2.0, * and you may not use this file except in compliance with the Apache License Version 2.0. diff --git a/snowplow-tracker/src/main/java/com/snowplowanalytics/core/globalcontexts/GlobalContextPluginConfiguration.kt b/snowplow-tracker/src/main/java/com/snowplowanalytics/core/globalcontexts/GlobalContextPluginConfiguration.kt index c2ad47a7d..dac87eff1 100644 --- a/snowplow-tracker/src/main/java/com/snowplowanalytics/core/globalcontexts/GlobalContextPluginConfiguration.kt +++ b/snowplow-tracker/src/main/java/com/snowplowanalytics/core/globalcontexts/GlobalContextPluginConfiguration.kt @@ -1,5 +1,5 @@ /* - * Copyright (c) 2015-2023 Snowplow Analytics Ltd. All rights reserved. + * Copyright (c) 2015-present Snowplow Analytics Ltd. All rights reserved. * * This program is licensed to you under the Apache License Version 2.0, * and you may not use this file except in compliance with the Apache License Version 2.0. diff --git a/snowplow-tracker/src/main/java/com/snowplowanalytics/core/globalcontexts/GlobalContextsConfigurationInterface.kt b/snowplow-tracker/src/main/java/com/snowplowanalytics/core/globalcontexts/GlobalContextsConfigurationInterface.kt index d5c2d718c..7a24928dd 100644 --- a/snowplow-tracker/src/main/java/com/snowplowanalytics/core/globalcontexts/GlobalContextsConfigurationInterface.kt +++ b/snowplow-tracker/src/main/java/com/snowplowanalytics/core/globalcontexts/GlobalContextsConfigurationInterface.kt @@ -1,5 +1,5 @@ /* - * Copyright (c) 2015-2023 Snowplow Analytics Ltd. All rights reserved. + * Copyright (c) 2015-present Snowplow Analytics Ltd. All rights reserved. * * This program is licensed to you under the Apache License Version 2.0, * and you may not use this file except in compliance with the Apache License Version 2.0. diff --git a/snowplow-tracker/src/main/java/com/snowplowanalytics/core/globalcontexts/GlobalContextsControllerImpl.kt b/snowplow-tracker/src/main/java/com/snowplowanalytics/core/globalcontexts/GlobalContextsControllerImpl.kt index 2f2038bb1..f02ef252a 100644 --- a/snowplow-tracker/src/main/java/com/snowplowanalytics/core/globalcontexts/GlobalContextsControllerImpl.kt +++ b/snowplow-tracker/src/main/java/com/snowplowanalytics/core/globalcontexts/GlobalContextsControllerImpl.kt @@ -1,5 +1,5 @@ /* - * Copyright (c) 2015-2023 Snowplow Analytics Ltd. All rights reserved. + * Copyright (c) 2015-present Snowplow Analytics Ltd. All rights reserved. * * This program is licensed to you under the Apache License Version 2.0, * and you may not use this file except in compliance with the Apache License Version 2.0. diff --git a/snowplow-tracker/src/main/java/com/snowplowanalytics/core/media/MediaSchemata.kt b/snowplow-tracker/src/main/java/com/snowplowanalytics/core/media/MediaSchemata.kt index cad0d7936..42869c94a 100644 --- a/snowplow-tracker/src/main/java/com/snowplowanalytics/core/media/MediaSchemata.kt +++ b/snowplow-tracker/src/main/java/com/snowplowanalytics/core/media/MediaSchemata.kt @@ -1,5 +1,5 @@ /* - * Copyright (c) 2015-2023 Snowplow Analytics Ltd. All rights reserved. + * Copyright (c) 2015-present Snowplow Analytics Ltd. All rights reserved. * * This program is licensed to you under the Apache License Version 2.0, * and you may not use this file except in compliance with the Apache License Version 2.0. diff --git a/snowplow-tracker/src/main/java/com/snowplowanalytics/core/media/controller/MediaAdTracking.kt b/snowplow-tracker/src/main/java/com/snowplowanalytics/core/media/controller/MediaAdTracking.kt index 732b87a55..876b18d8e 100644 --- a/snowplow-tracker/src/main/java/com/snowplowanalytics/core/media/controller/MediaAdTracking.kt +++ b/snowplow-tracker/src/main/java/com/snowplowanalytics/core/media/controller/MediaAdTracking.kt @@ -1,5 +1,5 @@ /* - * Copyright (c) 2015-2023 Snowplow Analytics Ltd. All rights reserved. + * Copyright (c) 2015-present Snowplow Analytics Ltd. All rights reserved. * * This program is licensed to you under the Apache License Version 2.0, * and you may not use this file except in compliance with the Apache License Version 2.0. diff --git a/snowplow-tracker/src/main/java/com/snowplowanalytics/core/media/controller/MediaControllerImpl.kt b/snowplow-tracker/src/main/java/com/snowplowanalytics/core/media/controller/MediaControllerImpl.kt index 946c5be5e..8fb5f32ff 100644 --- a/snowplow-tracker/src/main/java/com/snowplowanalytics/core/media/controller/MediaControllerImpl.kt +++ b/snowplow-tracker/src/main/java/com/snowplowanalytics/core/media/controller/MediaControllerImpl.kt @@ -1,5 +1,5 @@ /* - * Copyright (c) 2015-2023 Snowplow Analytics Ltd. All rights reserved. + * Copyright (c) 2015-present Snowplow Analytics Ltd. All rights reserved. * * This program is licensed to you under the Apache License Version 2.0, * and you may not use this file except in compliance with the Apache License Version 2.0. diff --git a/snowplow-tracker/src/main/java/com/snowplowanalytics/core/media/controller/MediaPingInterval.kt b/snowplow-tracker/src/main/java/com/snowplowanalytics/core/media/controller/MediaPingInterval.kt index 37a0bd331..fc1915ebd 100644 --- a/snowplow-tracker/src/main/java/com/snowplowanalytics/core/media/controller/MediaPingInterval.kt +++ b/snowplow-tracker/src/main/java/com/snowplowanalytics/core/media/controller/MediaPingInterval.kt @@ -1,5 +1,5 @@ /* - * Copyright (c) 2015-2023 Snowplow Analytics Ltd. All rights reserved. + * Copyright (c) 2015-present Snowplow Analytics Ltd. All rights reserved. * * This program is licensed to you under the Apache License Version 2.0, * and you may not use this file except in compliance with the Apache License Version 2.0. diff --git a/snowplow-tracker/src/main/java/com/snowplowanalytics/core/media/controller/MediaSessionTracking.kt b/snowplow-tracker/src/main/java/com/snowplowanalytics/core/media/controller/MediaSessionTracking.kt index 0a1235de3..28e9c0d3e 100644 --- a/snowplow-tracker/src/main/java/com/snowplowanalytics/core/media/controller/MediaSessionTracking.kt +++ b/snowplow-tracker/src/main/java/com/snowplowanalytics/core/media/controller/MediaSessionTracking.kt @@ -1,5 +1,5 @@ /* - * Copyright (c) 2015-2023 Snowplow Analytics Ltd. All rights reserved. + * Copyright (c) 2015-present Snowplow Analytics Ltd. All rights reserved. * * This program is licensed to you under the Apache License Version 2.0, * and you may not use this file except in compliance with the Apache License Version 2.0. diff --git a/snowplow-tracker/src/main/java/com/snowplowanalytics/core/media/controller/MediaSessionTrackingStats.kt b/snowplow-tracker/src/main/java/com/snowplowanalytics/core/media/controller/MediaSessionTrackingStats.kt index f047054d0..91b49d7d1 100644 --- a/snowplow-tracker/src/main/java/com/snowplowanalytics/core/media/controller/MediaSessionTrackingStats.kt +++ b/snowplow-tracker/src/main/java/com/snowplowanalytics/core/media/controller/MediaSessionTrackingStats.kt @@ -1,5 +1,5 @@ /* - * Copyright (c) 2015-2023 Snowplow Analytics Ltd. All rights reserved. + * Copyright (c) 2015-present Snowplow Analytics Ltd. All rights reserved. * * This program is licensed to you under the Apache License Version 2.0, * and you may not use this file except in compliance with the Apache License Version 2.0. diff --git a/snowplow-tracker/src/main/java/com/snowplowanalytics/core/media/controller/MediaTrackingImpl.kt b/snowplow-tracker/src/main/java/com/snowplowanalytics/core/media/controller/MediaTrackingImpl.kt index b9df49c84..2d7bf0063 100644 --- a/snowplow-tracker/src/main/java/com/snowplowanalytics/core/media/controller/MediaTrackingImpl.kt +++ b/snowplow-tracker/src/main/java/com/snowplowanalytics/core/media/controller/MediaTrackingImpl.kt @@ -1,5 +1,5 @@ /* - * Copyright (c) 2015-2023 Snowplow Analytics Ltd. All rights reserved. + * Copyright (c) 2015-present Snowplow Analytics Ltd. All rights reserved. * * This program is licensed to you under the Apache License Version 2.0, * and you may not use this file except in compliance with the Apache License Version 2.0. diff --git a/snowplow-tracker/src/main/java/com/snowplowanalytics/core/media/entity/MediaSessionEntity.kt b/snowplow-tracker/src/main/java/com/snowplowanalytics/core/media/entity/MediaSessionEntity.kt index 64f811965..e81829b78 100644 --- a/snowplow-tracker/src/main/java/com/snowplowanalytics/core/media/entity/MediaSessionEntity.kt +++ b/snowplow-tracker/src/main/java/com/snowplowanalytics/core/media/entity/MediaSessionEntity.kt @@ -1,5 +1,5 @@ /* - * Copyright (c) 2015-2023 Snowplow Analytics Ltd. All rights reserved. + * Copyright (c) 2015-present Snowplow Analytics Ltd. All rights reserved. * * This program is licensed to you under the Apache License Version 2.0, * and you may not use this file except in compliance with the Apache License Version 2.0. diff --git a/snowplow-tracker/src/main/java/com/snowplowanalytics/core/media/event/MediaPercentProgressEvent.kt b/snowplow-tracker/src/main/java/com/snowplowanalytics/core/media/event/MediaPercentProgressEvent.kt index 0e94d0fdb..df1f3dbfe 100644 --- a/snowplow-tracker/src/main/java/com/snowplowanalytics/core/media/event/MediaPercentProgressEvent.kt +++ b/snowplow-tracker/src/main/java/com/snowplowanalytics/core/media/event/MediaPercentProgressEvent.kt @@ -1,5 +1,5 @@ /* - * Copyright (c) 2015-2023 Snowplow Analytics Ltd. All rights reserved. + * Copyright (c) 2015-present Snowplow Analytics Ltd. All rights reserved. * * This program is licensed to you under the Apache License Version 2.0, * and you may not use this file except in compliance with the Apache License Version 2.0. diff --git a/snowplow-tracker/src/main/java/com/snowplowanalytics/core/media/event/MediaPingEvent.kt b/snowplow-tracker/src/main/java/com/snowplowanalytics/core/media/event/MediaPingEvent.kt index 2e1d2be55..5f848ad8c 100644 --- a/snowplow-tracker/src/main/java/com/snowplowanalytics/core/media/event/MediaPingEvent.kt +++ b/snowplow-tracker/src/main/java/com/snowplowanalytics/core/media/event/MediaPingEvent.kt @@ -1,5 +1,5 @@ /* - * Copyright (c) 2015-2023 Snowplow Analytics Ltd. All rights reserved. + * Copyright (c) 2015-present Snowplow Analytics Ltd. All rights reserved. * * This program is licensed to you under the Apache License Version 2.0, * and you may not use this file except in compliance with the Apache License Version 2.0. diff --git a/snowplow-tracker/src/main/java/com/snowplowanalytics/core/media/event/MediaPlayerUpdatingEvent.kt b/snowplow-tracker/src/main/java/com/snowplowanalytics/core/media/event/MediaPlayerUpdatingEvent.kt index d4bb11b8e..68db2d80a 100644 --- a/snowplow-tracker/src/main/java/com/snowplowanalytics/core/media/event/MediaPlayerUpdatingEvent.kt +++ b/snowplow-tracker/src/main/java/com/snowplowanalytics/core/media/event/MediaPlayerUpdatingEvent.kt @@ -1,5 +1,5 @@ /* - * Copyright (c) 2015-2023 Snowplow Analytics Ltd. All rights reserved. + * Copyright (c) 2015-present Snowplow Analytics Ltd. All rights reserved. * * This program is licensed to you under the Apache License Version 2.0, * and you may not use this file except in compliance with the Apache License Version 2.0. diff --git a/snowplow-tracker/src/main/java/com/snowplowanalytics/core/remoteconfiguration/RemoteConfigurationBundle.kt b/snowplow-tracker/src/main/java/com/snowplowanalytics/core/remoteconfiguration/RemoteConfigurationBundle.kt index 4cacd73e4..f58f78f84 100644 --- a/snowplow-tracker/src/main/java/com/snowplowanalytics/core/remoteconfiguration/RemoteConfigurationBundle.kt +++ b/snowplow-tracker/src/main/java/com/snowplowanalytics/core/remoteconfiguration/RemoteConfigurationBundle.kt @@ -1,5 +1,5 @@ /* - * Copyright (c) 2015-2023 Snowplow Analytics Ltd. All rights reserved. + * Copyright (c) 2015-present Snowplow Analytics Ltd. All rights reserved. * * This program is licensed to you under the Apache License Version 2.0, * and you may not use this file except in compliance with the Apache License Version 2.0. diff --git a/snowplow-tracker/src/main/java/com/snowplowanalytics/core/remoteconfiguration/RemoteConfigurationCache.kt b/snowplow-tracker/src/main/java/com/snowplowanalytics/core/remoteconfiguration/RemoteConfigurationCache.kt index 036e3a901..98a92a4df 100644 --- a/snowplow-tracker/src/main/java/com/snowplowanalytics/core/remoteconfiguration/RemoteConfigurationCache.kt +++ b/snowplow-tracker/src/main/java/com/snowplowanalytics/core/remoteconfiguration/RemoteConfigurationCache.kt @@ -1,5 +1,5 @@ /* - * Copyright (c) 2015-2023 Snowplow Analytics Ltd. All rights reserved. + * Copyright (c) 2015-present Snowplow Analytics Ltd. All rights reserved. * * This program is licensed to you under the Apache License Version 2.0, * and you may not use this file except in compliance with the Apache License Version 2.0. diff --git a/snowplow-tracker/src/main/java/com/snowplowanalytics/core/remoteconfiguration/RemoteConfigurationFetcher.kt b/snowplow-tracker/src/main/java/com/snowplowanalytics/core/remoteconfiguration/RemoteConfigurationFetcher.kt index efc39d5fd..95a1866d6 100644 --- a/snowplow-tracker/src/main/java/com/snowplowanalytics/core/remoteconfiguration/RemoteConfigurationFetcher.kt +++ b/snowplow-tracker/src/main/java/com/snowplowanalytics/core/remoteconfiguration/RemoteConfigurationFetcher.kt @@ -1,5 +1,5 @@ /* - * Copyright (c) 2015-2023 Snowplow Analytics Ltd. All rights reserved. + * Copyright (c) 2015-present Snowplow Analytics Ltd. All rights reserved. * * This program is licensed to you under the Apache License Version 2.0, * and you may not use this file except in compliance with the Apache License Version 2.0. diff --git a/snowplow-tracker/src/main/java/com/snowplowanalytics/core/remoteconfiguration/RemoteConfigurationProvider.kt b/snowplow-tracker/src/main/java/com/snowplowanalytics/core/remoteconfiguration/RemoteConfigurationProvider.kt index a9652defc..76b571e2c 100644 --- a/snowplow-tracker/src/main/java/com/snowplowanalytics/core/remoteconfiguration/RemoteConfigurationProvider.kt +++ b/snowplow-tracker/src/main/java/com/snowplowanalytics/core/remoteconfiguration/RemoteConfigurationProvider.kt @@ -1,5 +1,5 @@ /* - * Copyright (c) 2015-2023 Snowplow Analytics Ltd. All rights reserved. + * Copyright (c) 2015-present Snowplow Analytics Ltd. All rights reserved. * * This program is licensed to you under the Apache License Version 2.0, * and you may not use this file except in compliance with the Apache License Version 2.0. diff --git a/snowplow-tracker/src/main/java/com/snowplowanalytics/core/screenviews/ScreenState.kt b/snowplow-tracker/src/main/java/com/snowplowanalytics/core/screenviews/ScreenState.kt index f5da381d6..50cec9ddd 100644 --- a/snowplow-tracker/src/main/java/com/snowplowanalytics/core/screenviews/ScreenState.kt +++ b/snowplow-tracker/src/main/java/com/snowplowanalytics/core/screenviews/ScreenState.kt @@ -1,5 +1,5 @@ /* - * Copyright (c) 2015-2023 Snowplow Analytics Ltd. All rights reserved. + * Copyright (c) 2015-present Snowplow Analytics Ltd. All rights reserved. * * This program is licensed to you under the Apache License Version 2.0, * and you may not use this file except in compliance with the Apache License Version 2.0. diff --git a/snowplow-tracker/src/main/java/com/snowplowanalytics/core/screenviews/ScreenStateMachine.kt b/snowplow-tracker/src/main/java/com/snowplowanalytics/core/screenviews/ScreenStateMachine.kt index f353da21f..ad8bb6ee1 100644 --- a/snowplow-tracker/src/main/java/com/snowplowanalytics/core/screenviews/ScreenStateMachine.kt +++ b/snowplow-tracker/src/main/java/com/snowplowanalytics/core/screenviews/ScreenStateMachine.kt @@ -1,5 +1,5 @@ /* - * Copyright (c) 2015-2023 Snowplow Analytics Ltd. All rights reserved. + * Copyright (c) 2015-present Snowplow Analytics Ltd. All rights reserved. * * This program is licensed to you under the Apache License Version 2.0, * and you may not use this file except in compliance with the Apache License Version 2.0. diff --git a/snowplow-tracker/src/main/java/com/snowplowanalytics/core/screenviews/ScreenSummaryState.kt b/snowplow-tracker/src/main/java/com/snowplowanalytics/core/screenviews/ScreenSummaryState.kt index ca89297cd..ff43aabe9 100644 --- a/snowplow-tracker/src/main/java/com/snowplowanalytics/core/screenviews/ScreenSummaryState.kt +++ b/snowplow-tracker/src/main/java/com/snowplowanalytics/core/screenviews/ScreenSummaryState.kt @@ -1,5 +1,5 @@ /* - * Copyright (c) 2015-2023 Snowplow Analytics Ltd. All rights reserved. + * Copyright (c) 2015-present Snowplow Analytics Ltd. All rights reserved. * * This program is licensed to you under the Apache License Version 2.0, * and you may not use this file except in compliance with the Apache License Version 2.0. diff --git a/snowplow-tracker/src/main/java/com/snowplowanalytics/core/screenviews/ScreenSummaryStateMachine.kt b/snowplow-tracker/src/main/java/com/snowplowanalytics/core/screenviews/ScreenSummaryStateMachine.kt index c87b55405..08d7e79da 100644 --- a/snowplow-tracker/src/main/java/com/snowplowanalytics/core/screenviews/ScreenSummaryStateMachine.kt +++ b/snowplow-tracker/src/main/java/com/snowplowanalytics/core/screenviews/ScreenSummaryStateMachine.kt @@ -1,5 +1,5 @@ /* - * Copyright (c) 2015-2023 Snowplow Analytics Ltd. All rights reserved. + * Copyright (c) 2015-present Snowplow Analytics Ltd. All rights reserved. * * This program is licensed to you under the Apache License Version 2.0, * and you may not use this file except in compliance with the Apache License Version 2.0. diff --git a/snowplow-tracker/src/main/java/com/snowplowanalytics/core/session/FileStore.kt b/snowplow-tracker/src/main/java/com/snowplowanalytics/core/session/FileStore.kt index cec8ca733..864950ff9 100644 --- a/snowplow-tracker/src/main/java/com/snowplowanalytics/core/session/FileStore.kt +++ b/snowplow-tracker/src/main/java/com/snowplowanalytics/core/session/FileStore.kt @@ -1,5 +1,5 @@ /* - * Copyright (c) 2015-2023 Snowplow Analytics Ltd. All rights reserved. + * Copyright (c) 2015-present Snowplow Analytics Ltd. All rights reserved. * * This program is licensed to you under the Apache License Version 2.0, * and you may not use this file except in compliance with the Apache License Version 2.0. diff --git a/snowplow-tracker/src/main/java/com/snowplowanalytics/core/session/ProcessObserver.kt b/snowplow-tracker/src/main/java/com/snowplowanalytics/core/session/ProcessObserver.kt index 97a2d791d..f33a58831 100644 --- a/snowplow-tracker/src/main/java/com/snowplowanalytics/core/session/ProcessObserver.kt +++ b/snowplow-tracker/src/main/java/com/snowplowanalytics/core/session/ProcessObserver.kt @@ -1,5 +1,5 @@ /* - * Copyright (c) 2015-2023 Snowplow Analytics Ltd. All rights reserved. + * Copyright (c) 2015-present Snowplow Analytics Ltd. All rights reserved. * * This program is licensed to you under the Apache License Version 2.0, * and you may not use this file except in compliance with the Apache License Version 2.0. diff --git a/snowplow-tracker/src/main/java/com/snowplowanalytics/core/session/Session.kt b/snowplow-tracker/src/main/java/com/snowplowanalytics/core/session/Session.kt index 6eb737c2b..ebc89fd92 100644 --- a/snowplow-tracker/src/main/java/com/snowplowanalytics/core/session/Session.kt +++ b/snowplow-tracker/src/main/java/com/snowplowanalytics/core/session/Session.kt @@ -1,5 +1,5 @@ /* - * Copyright (c) 2015-2023 Snowplow Analytics Ltd. All rights reserved. + * Copyright (c) 2015-present Snowplow Analytics Ltd. All rights reserved. * * This program is licensed to you under the Apache License Version 2.0, * and you may not use this file except in compliance with the Apache License Version 2.0. diff --git a/snowplow-tracker/src/main/java/com/snowplowanalytics/core/session/SessionConfigurationInterface.kt b/snowplow-tracker/src/main/java/com/snowplowanalytics/core/session/SessionConfigurationInterface.kt index e5f1c6dea..a7c9d6abf 100644 --- a/snowplow-tracker/src/main/java/com/snowplowanalytics/core/session/SessionConfigurationInterface.kt +++ b/snowplow-tracker/src/main/java/com/snowplowanalytics/core/session/SessionConfigurationInterface.kt @@ -1,5 +1,5 @@ /* - * Copyright (c) 2015-2023 Snowplow Analytics Ltd. All rights reserved. + * Copyright (c) 2015-present Snowplow Analytics Ltd. All rights reserved. * * This program is licensed to you under the Apache License Version 2.0, * and you may not use this file except in compliance with the Apache License Version 2.0. diff --git a/snowplow-tracker/src/main/java/com/snowplowanalytics/core/session/SessionControllerImpl.kt b/snowplow-tracker/src/main/java/com/snowplowanalytics/core/session/SessionControllerImpl.kt index ea2857564..6d723900e 100644 --- a/snowplow-tracker/src/main/java/com/snowplowanalytics/core/session/SessionControllerImpl.kt +++ b/snowplow-tracker/src/main/java/com/snowplowanalytics/core/session/SessionControllerImpl.kt @@ -1,5 +1,5 @@ /* - * Copyright (c) 2015-2023 Snowplow Analytics Ltd. All rights reserved. + * Copyright (c) 2015-present Snowplow Analytics Ltd. All rights reserved. * * This program is licensed to you under the Apache License Version 2.0, * and you may not use this file except in compliance with the Apache License Version 2.0. diff --git a/snowplow-tracker/src/main/java/com/snowplowanalytics/core/statemachine/DeepLinkState.kt b/snowplow-tracker/src/main/java/com/snowplowanalytics/core/statemachine/DeepLinkState.kt index 2613ee649..3c245f19f 100644 --- a/snowplow-tracker/src/main/java/com/snowplowanalytics/core/statemachine/DeepLinkState.kt +++ b/snowplow-tracker/src/main/java/com/snowplowanalytics/core/statemachine/DeepLinkState.kt @@ -1,5 +1,5 @@ /* - * Copyright (c) 2015-2023 Snowplow Analytics Ltd. All rights reserved. + * Copyright (c) 2015-present Snowplow Analytics Ltd. All rights reserved. * * This program is licensed to you under the Apache License Version 2.0, * and you may not use this file except in compliance with the Apache License Version 2.0. diff --git a/snowplow-tracker/src/main/java/com/snowplowanalytics/core/statemachine/DeepLinkStateMachine.kt b/snowplow-tracker/src/main/java/com/snowplowanalytics/core/statemachine/DeepLinkStateMachine.kt index fc9e79853..ca148dbce 100644 --- a/snowplow-tracker/src/main/java/com/snowplowanalytics/core/statemachine/DeepLinkStateMachine.kt +++ b/snowplow-tracker/src/main/java/com/snowplowanalytics/core/statemachine/DeepLinkStateMachine.kt @@ -1,5 +1,5 @@ /* - * Copyright (c) 2015-2023 Snowplow Analytics Ltd. All rights reserved. + * Copyright (c) 2015-present Snowplow Analytics Ltd. All rights reserved. * * This program is licensed to you under the Apache License Version 2.0, * and you may not use this file except in compliance with the Apache License Version 2.0. diff --git a/snowplow-tracker/src/main/java/com/snowplowanalytics/core/statemachine/LifecycleState.kt b/snowplow-tracker/src/main/java/com/snowplowanalytics/core/statemachine/LifecycleState.kt index 970cb0955..ce5a3d919 100644 --- a/snowplow-tracker/src/main/java/com/snowplowanalytics/core/statemachine/LifecycleState.kt +++ b/snowplow-tracker/src/main/java/com/snowplowanalytics/core/statemachine/LifecycleState.kt @@ -1,5 +1,5 @@ /* - * Copyright (c) 2015-2023 Snowplow Analytics Ltd. All rights reserved. + * Copyright (c) 2015-present Snowplow Analytics Ltd. All rights reserved. * * This program is licensed to you under the Apache License Version 2.0, * and you may not use this file except in compliance with the Apache License Version 2.0. diff --git a/snowplow-tracker/src/main/java/com/snowplowanalytics/core/statemachine/LifecycleStateMachine.kt b/snowplow-tracker/src/main/java/com/snowplowanalytics/core/statemachine/LifecycleStateMachine.kt index bf072b0ce..ce508bad1 100644 --- a/snowplow-tracker/src/main/java/com/snowplowanalytics/core/statemachine/LifecycleStateMachine.kt +++ b/snowplow-tracker/src/main/java/com/snowplowanalytics/core/statemachine/LifecycleStateMachine.kt @@ -1,5 +1,5 @@ /* - * Copyright (c) 2015-2023 Snowplow Analytics Ltd. All rights reserved. + * Copyright (c) 2015-present Snowplow Analytics Ltd. All rights reserved. * * This program is licensed to you under the Apache License Version 2.0, * and you may not use this file except in compliance with the Apache License Version 2.0. diff --git a/snowplow-tracker/src/main/java/com/snowplowanalytics/core/statemachine/PluginStateMachine.kt b/snowplow-tracker/src/main/java/com/snowplowanalytics/core/statemachine/PluginStateMachine.kt index e981a02e4..18908939a 100644 --- a/snowplow-tracker/src/main/java/com/snowplowanalytics/core/statemachine/PluginStateMachine.kt +++ b/snowplow-tracker/src/main/java/com/snowplowanalytics/core/statemachine/PluginStateMachine.kt @@ -1,5 +1,5 @@ /* - * Copyright (c) 2015-2023 Snowplow Analytics Ltd. All rights reserved. + * Copyright (c) 2015-present Snowplow Analytics Ltd. All rights reserved. * * This program is licensed to you under the Apache License Version 2.0, * and you may not use this file except in compliance with the Apache License Version 2.0. diff --git a/snowplow-tracker/src/main/java/com/snowplowanalytics/core/statemachine/State.kt b/snowplow-tracker/src/main/java/com/snowplowanalytics/core/statemachine/State.kt index f1ca6b500..4f5be5c7a 100644 --- a/snowplow-tracker/src/main/java/com/snowplowanalytics/core/statemachine/State.kt +++ b/snowplow-tracker/src/main/java/com/snowplowanalytics/core/statemachine/State.kt @@ -1,5 +1,5 @@ /* - * Copyright (c) 2015-2023 Snowplow Analytics Ltd. All rights reserved. + * Copyright (c) 2015-present Snowplow Analytics Ltd. All rights reserved. * * This program is licensed to you under the Apache License Version 2.0, * and you may not use this file except in compliance with the Apache License Version 2.0. diff --git a/snowplow-tracker/src/main/java/com/snowplowanalytics/core/statemachine/StateFuture.kt b/snowplow-tracker/src/main/java/com/snowplowanalytics/core/statemachine/StateFuture.kt index 07996891d..1a54957bb 100644 --- a/snowplow-tracker/src/main/java/com/snowplowanalytics/core/statemachine/StateFuture.kt +++ b/snowplow-tracker/src/main/java/com/snowplowanalytics/core/statemachine/StateFuture.kt @@ -1,5 +1,5 @@ /* - * Copyright (c) 2015-2023 Snowplow Analytics Ltd. All rights reserved. + * Copyright (c) 2015-present Snowplow Analytics Ltd. All rights reserved. * * This program is licensed to you under the Apache License Version 2.0, * and you may not use this file except in compliance with the Apache License Version 2.0. diff --git a/snowplow-tracker/src/main/java/com/snowplowanalytics/core/statemachine/StateMachineEvent.kt b/snowplow-tracker/src/main/java/com/snowplowanalytics/core/statemachine/StateMachineEvent.kt index e4c71acf3..a04fdf347 100644 --- a/snowplow-tracker/src/main/java/com/snowplowanalytics/core/statemachine/StateMachineEvent.kt +++ b/snowplow-tracker/src/main/java/com/snowplowanalytics/core/statemachine/StateMachineEvent.kt @@ -1,5 +1,5 @@ /* - * Copyright (c) 2015-2023 Snowplow Analytics Ltd. All rights reserved. + * Copyright (c) 2015-present Snowplow Analytics Ltd. All rights reserved. * * This program is licensed to you under the Apache License Version 2.0, * and you may not use this file except in compliance with the Apache License Version 2.0. diff --git a/snowplow-tracker/src/main/java/com/snowplowanalytics/core/statemachine/StateMachineInterface.kt b/snowplow-tracker/src/main/java/com/snowplowanalytics/core/statemachine/StateMachineInterface.kt index 1a139869f..e54f59e66 100644 --- a/snowplow-tracker/src/main/java/com/snowplowanalytics/core/statemachine/StateMachineInterface.kt +++ b/snowplow-tracker/src/main/java/com/snowplowanalytics/core/statemachine/StateMachineInterface.kt @@ -1,5 +1,5 @@ /* - * Copyright (c) 2015-2023 Snowplow Analytics Ltd. All rights reserved. + * Copyright (c) 2015-present Snowplow Analytics Ltd. All rights reserved. * * This program is licensed to you under the Apache License Version 2.0, * and you may not use this file except in compliance with the Apache License Version 2.0. diff --git a/snowplow-tracker/src/main/java/com/snowplowanalytics/core/statemachine/StateManager.kt b/snowplow-tracker/src/main/java/com/snowplowanalytics/core/statemachine/StateManager.kt index 83488e282..8a39e61df 100644 --- a/snowplow-tracker/src/main/java/com/snowplowanalytics/core/statemachine/StateManager.kt +++ b/snowplow-tracker/src/main/java/com/snowplowanalytics/core/statemachine/StateManager.kt @@ -1,5 +1,5 @@ /* - * Copyright (c) 2015-2023 Snowplow Analytics Ltd. All rights reserved. + * Copyright (c) 2015-present Snowplow Analytics Ltd. All rights reserved. * * This program is licensed to you under the Apache License Version 2.0, * and you may not use this file except in compliance with the Apache License Version 2.0. diff --git a/snowplow-tracker/src/main/java/com/snowplowanalytics/core/statemachine/TrackerState.kt b/snowplow-tracker/src/main/java/com/snowplowanalytics/core/statemachine/TrackerState.kt index 7a450dcf5..eebfa122a 100644 --- a/snowplow-tracker/src/main/java/com/snowplowanalytics/core/statemachine/TrackerState.kt +++ b/snowplow-tracker/src/main/java/com/snowplowanalytics/core/statemachine/TrackerState.kt @@ -1,5 +1,5 @@ /* - * Copyright (c) 2015-2023 Snowplow Analytics Ltd. All rights reserved. + * Copyright (c) 2015-present Snowplow Analytics Ltd. All rights reserved. * * This program is licensed to you under the Apache License Version 2.0, * and you may not use this file except in compliance with the Apache License Version 2.0. diff --git a/snowplow-tracker/src/main/java/com/snowplowanalytics/core/statemachine/TrackerStateSnapshot.kt b/snowplow-tracker/src/main/java/com/snowplowanalytics/core/statemachine/TrackerStateSnapshot.kt index c1960117a..e5928e826 100644 --- a/snowplow-tracker/src/main/java/com/snowplowanalytics/core/statemachine/TrackerStateSnapshot.kt +++ b/snowplow-tracker/src/main/java/com/snowplowanalytics/core/statemachine/TrackerStateSnapshot.kt @@ -1,5 +1,5 @@ /* - * Copyright (c) 2015-2023 Snowplow Analytics Ltd. All rights reserved. + * Copyright (c) 2015-present Snowplow Analytics Ltd. All rights reserved. * * This program is licensed to you under the Apache License Version 2.0, * and you may not use this file except in compliance with the Apache License Version 2.0. diff --git a/snowplow-tracker/src/main/java/com/snowplowanalytics/core/tracker/ActivityLifecycleHandler.kt b/snowplow-tracker/src/main/java/com/snowplowanalytics/core/tracker/ActivityLifecycleHandler.kt index d6195f0d5..c95bcac4b 100644 --- a/snowplow-tracker/src/main/java/com/snowplowanalytics/core/tracker/ActivityLifecycleHandler.kt +++ b/snowplow-tracker/src/main/java/com/snowplowanalytics/core/tracker/ActivityLifecycleHandler.kt @@ -1,5 +1,5 @@ /* - * Copyright (c) 2015-2023 Snowplow Analytics Ltd. All rights reserved. + * Copyright (c) 2015-present Snowplow Analytics Ltd. All rights reserved. * * This program is licensed to you under the Apache License Version 2.0, * and you may not use this file except in compliance with the Apache License Version 2.0. diff --git a/snowplow-tracker/src/main/java/com/snowplowanalytics/core/tracker/ApplicationInstallEvent.kt b/snowplow-tracker/src/main/java/com/snowplowanalytics/core/tracker/ApplicationInstallEvent.kt index c2a54807b..b2c1a4fb2 100644 --- a/snowplow-tracker/src/main/java/com/snowplowanalytics/core/tracker/ApplicationInstallEvent.kt +++ b/snowplow-tracker/src/main/java/com/snowplowanalytics/core/tracker/ApplicationInstallEvent.kt @@ -1,5 +1,5 @@ /* - * Copyright (c) 2015-2023 Snowplow Analytics Ltd. All rights reserved. + * Copyright (c) 2015-present Snowplow Analytics Ltd. All rights reserved. * * This program is licensed to you under the Apache License Version 2.0, * and you may not use this file except in compliance with the Apache License Version 2.0. diff --git a/snowplow-tracker/src/main/java/com/snowplowanalytics/core/tracker/ExceptionHandler.kt b/snowplow-tracker/src/main/java/com/snowplowanalytics/core/tracker/ExceptionHandler.kt index 828d1920f..fee7b12c5 100644 --- a/snowplow-tracker/src/main/java/com/snowplowanalytics/core/tracker/ExceptionHandler.kt +++ b/snowplow-tracker/src/main/java/com/snowplowanalytics/core/tracker/ExceptionHandler.kt @@ -1,5 +1,5 @@ /* - * Copyright (c) 2015-2023 Snowplow Analytics Ltd. All rights reserved. + * Copyright (c) 2015-present Snowplow Analytics Ltd. All rights reserved. * * This program is licensed to you under the Apache License Version 2.0, * and you may not use this file except in compliance with the Apache License Version 2.0. diff --git a/snowplow-tracker/src/main/java/com/snowplowanalytics/core/tracker/InstallReferrerDetails.kt b/snowplow-tracker/src/main/java/com/snowplowanalytics/core/tracker/InstallReferrerDetails.kt index 7ff985bfc..8999024ad 100644 --- a/snowplow-tracker/src/main/java/com/snowplowanalytics/core/tracker/InstallReferrerDetails.kt +++ b/snowplow-tracker/src/main/java/com/snowplowanalytics/core/tracker/InstallReferrerDetails.kt @@ -1,5 +1,5 @@ /* - * Copyright (c) 2015-2023 Snowplow Analytics Ltd. All rights reserved. + * Copyright (c) 2015-present Snowplow Analytics Ltd. All rights reserved. * * This program is licensed to you under the Apache License Version 2.0, * and you may not use this file except in compliance with the Apache License Version 2.0. diff --git a/snowplow-tracker/src/main/java/com/snowplowanalytics/core/tracker/Logger.kt b/snowplow-tracker/src/main/java/com/snowplowanalytics/core/tracker/Logger.kt index 10cde60f5..d1ac75bf2 100755 --- a/snowplow-tracker/src/main/java/com/snowplowanalytics/core/tracker/Logger.kt +++ b/snowplow-tracker/src/main/java/com/snowplowanalytics/core/tracker/Logger.kt @@ -1,5 +1,5 @@ /* - * Copyright (c) 2015-2023 Snowplow Analytics Ltd. All rights reserved. + * Copyright (c) 2015-present Snowplow Analytics Ltd. All rights reserved. * * This program is licensed to you under the Apache License Version 2.0, * and you may not use this file except in compliance with the Apache License Version 2.0. diff --git a/snowplow-tracker/src/main/java/com/snowplowanalytics/core/tracker/PlatformContext.kt b/snowplow-tracker/src/main/java/com/snowplowanalytics/core/tracker/PlatformContext.kt index 31de79bda..a11a85f82 100644 --- a/snowplow-tracker/src/main/java/com/snowplowanalytics/core/tracker/PlatformContext.kt +++ b/snowplow-tracker/src/main/java/com/snowplowanalytics/core/tracker/PlatformContext.kt @@ -1,5 +1,5 @@ /* - * Copyright (c) 2015-2023 Snowplow Analytics Ltd. All rights reserved. + * Copyright (c) 2015-present Snowplow Analytics Ltd. All rights reserved. * * This program is licensed to you under the Apache License Version 2.0, * and you may not use this file except in compliance with the Apache License Version 2.0. diff --git a/snowplow-tracker/src/main/java/com/snowplowanalytics/core/tracker/PluginsControllerImpl.kt b/snowplow-tracker/src/main/java/com/snowplowanalytics/core/tracker/PluginsControllerImpl.kt index a312e1eca..60f7f970b 100644 --- a/snowplow-tracker/src/main/java/com/snowplowanalytics/core/tracker/PluginsControllerImpl.kt +++ b/snowplow-tracker/src/main/java/com/snowplowanalytics/core/tracker/PluginsControllerImpl.kt @@ -1,5 +1,5 @@ /* - * Copyright (c) 2015-2023 Snowplow Analytics Ltd. All rights reserved. + * Copyright (c) 2015-present Snowplow Analytics Ltd. All rights reserved. * * This program is licensed to you under the Apache License Version 2.0, * and you may not use this file except in compliance with the Apache License Version 2.0. diff --git a/snowplow-tracker/src/main/java/com/snowplowanalytics/core/tracker/SchemaRule.kt b/snowplow-tracker/src/main/java/com/snowplowanalytics/core/tracker/SchemaRule.kt index 1cb41c12d..2f7999a28 100644 --- a/snowplow-tracker/src/main/java/com/snowplowanalytics/core/tracker/SchemaRule.kt +++ b/snowplow-tracker/src/main/java/com/snowplowanalytics/core/tracker/SchemaRule.kt @@ -1,5 +1,5 @@ /* - * Copyright (c) 2015-2023 Snowplow Analytics Ltd. All rights reserved. + * Copyright (c) 2015-present Snowplow Analytics Ltd. All rights reserved. * * This program is licensed to you under the Apache License Version 2.0, * and you may not use this file except in compliance with the Apache License Version 2.0. diff --git a/snowplow-tracker/src/main/java/com/snowplowanalytics/core/tracker/ServiceProvider.kt b/snowplow-tracker/src/main/java/com/snowplowanalytics/core/tracker/ServiceProvider.kt index 059113282..ff765b26c 100644 --- a/snowplow-tracker/src/main/java/com/snowplowanalytics/core/tracker/ServiceProvider.kt +++ b/snowplow-tracker/src/main/java/com/snowplowanalytics/core/tracker/ServiceProvider.kt @@ -1,5 +1,5 @@ /* - * Copyright (c) 2015-2023 Snowplow Analytics Ltd. All rights reserved. + * Copyright (c) 2015-present Snowplow Analytics Ltd. All rights reserved. * * This program is licensed to you under the Apache License Version 2.0, * and you may not use this file except in compliance with the Apache License Version 2.0. diff --git a/snowplow-tracker/src/main/java/com/snowplowanalytics/core/tracker/ServiceProviderInterface.kt b/snowplow-tracker/src/main/java/com/snowplowanalytics/core/tracker/ServiceProviderInterface.kt index 6b6bb69c7..14f7a97be 100644 --- a/snowplow-tracker/src/main/java/com/snowplowanalytics/core/tracker/ServiceProviderInterface.kt +++ b/snowplow-tracker/src/main/java/com/snowplowanalytics/core/tracker/ServiceProviderInterface.kt @@ -1,5 +1,5 @@ /* - * Copyright (c) 2015-2023 Snowplow Analytics Ltd. All rights reserved. + * Copyright (c) 2015-present Snowplow Analytics Ltd. All rights reserved. * * This program is licensed to you under the Apache License Version 2.0, * and you may not use this file except in compliance with the Apache License Version 2.0. diff --git a/snowplow-tracker/src/main/java/com/snowplowanalytics/core/tracker/Subject.kt b/snowplow-tracker/src/main/java/com/snowplowanalytics/core/tracker/Subject.kt index 8ecdde838..92c33e9c6 100755 --- a/snowplow-tracker/src/main/java/com/snowplowanalytics/core/tracker/Subject.kt +++ b/snowplow-tracker/src/main/java/com/snowplowanalytics/core/tracker/Subject.kt @@ -1,5 +1,5 @@ /* - * Copyright (c) 2015-2023 Snowplow Analytics Ltd. All rights reserved. + * Copyright (c) 2015-present Snowplow Analytics Ltd. All rights reserved. * * This program is licensed to you under the Apache License Version 2.0, * and you may not use this file except in compliance with the Apache License Version 2.0. diff --git a/snowplow-tracker/src/main/java/com/snowplowanalytics/core/tracker/SubjectConfigurationInterface.kt b/snowplow-tracker/src/main/java/com/snowplowanalytics/core/tracker/SubjectConfigurationInterface.kt index 8c3e0a183..21a6073b2 100644 --- a/snowplow-tracker/src/main/java/com/snowplowanalytics/core/tracker/SubjectConfigurationInterface.kt +++ b/snowplow-tracker/src/main/java/com/snowplowanalytics/core/tracker/SubjectConfigurationInterface.kt @@ -1,5 +1,5 @@ /* - * Copyright (c) 2015-2023 Snowplow Analytics Ltd. All rights reserved. + * Copyright (c) 2015-present Snowplow Analytics Ltd. All rights reserved. * * This program is licensed to you under the Apache License Version 2.0, * and you may not use this file except in compliance with the Apache License Version 2.0. diff --git a/snowplow-tracker/src/main/java/com/snowplowanalytics/core/tracker/SubjectControllerImpl.kt b/snowplow-tracker/src/main/java/com/snowplowanalytics/core/tracker/SubjectControllerImpl.kt index 4485bba4a..ff54153d4 100644 --- a/snowplow-tracker/src/main/java/com/snowplowanalytics/core/tracker/SubjectControllerImpl.kt +++ b/snowplow-tracker/src/main/java/com/snowplowanalytics/core/tracker/SubjectControllerImpl.kt @@ -1,5 +1,5 @@ /* - * Copyright (c) 2015-2023 Snowplow Analytics Ltd. All rights reserved. + * Copyright (c) 2015-present Snowplow Analytics Ltd. All rights reserved. * * This program is licensed to you under the Apache License Version 2.0, * and you may not use this file except in compliance with the Apache License Version 2.0. diff --git a/snowplow-tracker/src/main/java/com/snowplowanalytics/core/tracker/Tracker.kt b/snowplow-tracker/src/main/java/com/snowplowanalytics/core/tracker/Tracker.kt index 779e38743..4a32ea29c 100755 --- a/snowplow-tracker/src/main/java/com/snowplowanalytics/core/tracker/Tracker.kt +++ b/snowplow-tracker/src/main/java/com/snowplowanalytics/core/tracker/Tracker.kt @@ -1,5 +1,5 @@ /* - * Copyright (c) 2015-2023 Snowplow Analytics Ltd. All rights reserved. + * Copyright (c) 2015-present Snowplow Analytics Ltd. All rights reserved. * * This program is licensed to you under the Apache License Version 2.0, * and you may not use this file except in compliance with the Apache License Version 2.0. diff --git a/snowplow-tracker/src/main/java/com/snowplowanalytics/core/tracker/TrackerConfigurationInterface.kt b/snowplow-tracker/src/main/java/com/snowplowanalytics/core/tracker/TrackerConfigurationInterface.kt index 2b55cfcd3..74772e35a 100644 --- a/snowplow-tracker/src/main/java/com/snowplowanalytics/core/tracker/TrackerConfigurationInterface.kt +++ b/snowplow-tracker/src/main/java/com/snowplowanalytics/core/tracker/TrackerConfigurationInterface.kt @@ -1,5 +1,5 @@ /* - * Copyright (c) 2015-2023 Snowplow Analytics Ltd. All rights reserved. + * Copyright (c) 2015-present Snowplow Analytics Ltd. All rights reserved. * * This program is licensed to you under the Apache License Version 2.0, * and you may not use this file except in compliance with the Apache License Version 2.0. diff --git a/snowplow-tracker/src/main/java/com/snowplowanalytics/core/tracker/TrackerControllerImpl.kt b/snowplow-tracker/src/main/java/com/snowplowanalytics/core/tracker/TrackerControllerImpl.kt index 43595821c..6f94083b7 100644 --- a/snowplow-tracker/src/main/java/com/snowplowanalytics/core/tracker/TrackerControllerImpl.kt +++ b/snowplow-tracker/src/main/java/com/snowplowanalytics/core/tracker/TrackerControllerImpl.kt @@ -1,5 +1,5 @@ /* - * Copyright (c) 2015-2023 Snowplow Analytics Ltd. All rights reserved. + * Copyright (c) 2015-present Snowplow Analytics Ltd. All rights reserved. * * This program is licensed to you under the Apache License Version 2.0, * and you may not use this file except in compliance with the Apache License Version 2.0. diff --git a/snowplow-tracker/src/main/java/com/snowplowanalytics/core/tracker/TrackerDefaults.kt b/snowplow-tracker/src/main/java/com/snowplowanalytics/core/tracker/TrackerDefaults.kt index 653458713..e16d43c4b 100644 --- a/snowplow-tracker/src/main/java/com/snowplowanalytics/core/tracker/TrackerDefaults.kt +++ b/snowplow-tracker/src/main/java/com/snowplowanalytics/core/tracker/TrackerDefaults.kt @@ -1,5 +1,5 @@ /* - * Copyright (c) 2015-2023 Snowplow Analytics Ltd. All rights reserved. + * Copyright (c) 2015-present Snowplow Analytics Ltd. All rights reserved. * * This program is licensed to you under the Apache License Version 2.0, * and you may not use this file except in compliance with the Apache License Version 2.0. diff --git a/snowplow-tracker/src/main/java/com/snowplowanalytics/core/tracker/TrackerEvent.kt b/snowplow-tracker/src/main/java/com/snowplowanalytics/core/tracker/TrackerEvent.kt index d40542291..f5e5e7185 100644 --- a/snowplow-tracker/src/main/java/com/snowplowanalytics/core/tracker/TrackerEvent.kt +++ b/snowplow-tracker/src/main/java/com/snowplowanalytics/core/tracker/TrackerEvent.kt @@ -1,5 +1,5 @@ /* - * Copyright (c) 2015-2023 Snowplow Analytics Ltd. All rights reserved. + * Copyright (c) 2015-present Snowplow Analytics Ltd. All rights reserved. * * This program is licensed to you under the Apache License Version 2.0, * and you may not use this file except in compliance with the Apache License Version 2.0. diff --git a/snowplow-tracker/src/main/java/com/snowplowanalytics/core/tracker/TrackerWebViewInterface.kt b/snowplow-tracker/src/main/java/com/snowplowanalytics/core/tracker/TrackerWebViewInterface.kt index cb6c0dd4a..32ec77a8e 100644 --- a/snowplow-tracker/src/main/java/com/snowplowanalytics/core/tracker/TrackerWebViewInterface.kt +++ b/snowplow-tracker/src/main/java/com/snowplowanalytics/core/tracker/TrackerWebViewInterface.kt @@ -1,5 +1,5 @@ /* - * Copyright (c) 2015-2023 Snowplow Analytics Ltd. All rights reserved. + * Copyright (c) 2015-present Snowplow Analytics Ltd. All rights reserved. * * This program is licensed to you under the Apache License Version 2.0, * and you may not use this file except in compliance with the Apache License Version 2.0. diff --git a/snowplow-tracker/src/main/java/com/snowplowanalytics/core/utils/DeviceInfoMonitor.kt b/snowplow-tracker/src/main/java/com/snowplowanalytics/core/utils/DeviceInfoMonitor.kt index e6e3d33ea..be4a3aab9 100644 --- a/snowplow-tracker/src/main/java/com/snowplowanalytics/core/utils/DeviceInfoMonitor.kt +++ b/snowplow-tracker/src/main/java/com/snowplowanalytics/core/utils/DeviceInfoMonitor.kt @@ -1,5 +1,5 @@ /* - * Copyright (c) 2015-2023 Snowplow Analytics Ltd. All rights reserved. + * Copyright (c) 2015-present Snowplow Analytics Ltd. All rights reserved. * * This program is licensed to you under the Apache License Version 2.0, * and you may not use this file except in compliance with the Apache License Version 2.0. diff --git a/snowplow-tracker/src/main/java/com/snowplowanalytics/core/utils/JsonUtils.kt b/snowplow-tracker/src/main/java/com/snowplowanalytics/core/utils/JsonUtils.kt index 8181c3cf5..9be89bf54 100644 --- a/snowplow-tracker/src/main/java/com/snowplowanalytics/core/utils/JsonUtils.kt +++ b/snowplow-tracker/src/main/java/com/snowplowanalytics/core/utils/JsonUtils.kt @@ -1,5 +1,5 @@ /* - * Copyright (c) 2015-2023 Snowplow Analytics Ltd. All rights reserved. + * Copyright (c) 2015-present Snowplow Analytics Ltd. All rights reserved. * * This program is licensed to you under the Apache License Version 2.0, * and you may not use this file except in compliance with the Apache License Version 2.0. diff --git a/snowplow-tracker/src/main/java/com/snowplowanalytics/core/utils/NotificationCenter.kt b/snowplow-tracker/src/main/java/com/snowplowanalytics/core/utils/NotificationCenter.kt index 312ede4f7..b67638717 100644 --- a/snowplow-tracker/src/main/java/com/snowplowanalytics/core/utils/NotificationCenter.kt +++ b/snowplow-tracker/src/main/java/com/snowplowanalytics/core/utils/NotificationCenter.kt @@ -1,5 +1,5 @@ /* - * Copyright (c) 2015-2023 Snowplow Analytics Ltd. All rights reserved. + * Copyright (c) 2015-present Snowplow Analytics Ltd. All rights reserved. * * This program is licensed to you under the Apache License Version 2.0, * and you may not use this file except in compliance with the Apache License Version 2.0. diff --git a/snowplow-tracker/src/main/java/com/snowplowanalytics/core/utils/Util.kt b/snowplow-tracker/src/main/java/com/snowplowanalytics/core/utils/Util.kt index 85e020ca7..12ca32945 100755 --- a/snowplow-tracker/src/main/java/com/snowplowanalytics/core/utils/Util.kt +++ b/snowplow-tracker/src/main/java/com/snowplowanalytics/core/utils/Util.kt @@ -1,5 +1,5 @@ /* - * Copyright (c) 2015-2023 Snowplow Analytics Ltd. All rights reserved. + * Copyright (c) 2015-present Snowplow Analytics Ltd. All rights reserved. * * This program is licensed to you under the Apache License Version 2.0, * and you may not use this file except in compliance with the Apache License Version 2.0. diff --git a/snowplow-tracker/src/main/java/com/snowplowanalytics/snowplow/Snowplow.kt b/snowplow-tracker/src/main/java/com/snowplowanalytics/snowplow/Snowplow.kt index 6ec2d3205..95cc4af2c 100644 --- a/snowplow-tracker/src/main/java/com/snowplowanalytics/snowplow/Snowplow.kt +++ b/snowplow-tracker/src/main/java/com/snowplowanalytics/snowplow/Snowplow.kt @@ -1,5 +1,5 @@ /* - * Copyright (c) 2015-2023 Snowplow Analytics Ltd. All rights reserved. + * Copyright (c) 2015-present Snowplow Analytics Ltd. All rights reserved. * * This program is licensed to you under the Apache License Version 2.0, * and you may not use this file except in compliance with the Apache License Version 2.0. diff --git a/snowplow-tracker/src/main/java/com/snowplowanalytics/snowplow/configuration/Configuration.kt b/snowplow-tracker/src/main/java/com/snowplowanalytics/snowplow/configuration/Configuration.kt index 7e479b370..8b5452dff 100644 --- a/snowplow-tracker/src/main/java/com/snowplowanalytics/snowplow/configuration/Configuration.kt +++ b/snowplow-tracker/src/main/java/com/snowplowanalytics/snowplow/configuration/Configuration.kt @@ -1,5 +1,5 @@ /* - * Copyright (c) 2015-2023 Snowplow Analytics Ltd. All rights reserved. + * Copyright (c) 2015-present Snowplow Analytics Ltd. All rights reserved. * * This program is licensed to you under the Apache License Version 2.0, * and you may not use this file except in compliance with the Apache License Version 2.0. diff --git a/snowplow-tracker/src/main/java/com/snowplowanalytics/snowplow/configuration/ConfigurationBundle.kt b/snowplow-tracker/src/main/java/com/snowplowanalytics/snowplow/configuration/ConfigurationBundle.kt index af23d369c..ad0445b32 100644 --- a/snowplow-tracker/src/main/java/com/snowplowanalytics/snowplow/configuration/ConfigurationBundle.kt +++ b/snowplow-tracker/src/main/java/com/snowplowanalytics/snowplow/configuration/ConfigurationBundle.kt @@ -1,5 +1,5 @@ /* - * Copyright (c) 2015-2023 Snowplow Analytics Ltd. All rights reserved. + * Copyright (c) 2015-present Snowplow Analytics Ltd. All rights reserved. * * This program is licensed to you under the Apache License Version 2.0, * and you may not use this file except in compliance with the Apache License Version 2.0. diff --git a/snowplow-tracker/src/main/java/com/snowplowanalytics/snowplow/configuration/ConfigurationState.kt b/snowplow-tracker/src/main/java/com/snowplowanalytics/snowplow/configuration/ConfigurationState.kt index 8f1eec52b..5d71c458a 100644 --- a/snowplow-tracker/src/main/java/com/snowplowanalytics/snowplow/configuration/ConfigurationState.kt +++ b/snowplow-tracker/src/main/java/com/snowplowanalytics/snowplow/configuration/ConfigurationState.kt @@ -1,5 +1,5 @@ /* - * Copyright (c) 2015-2023 Snowplow Analytics Ltd. All rights reserved. + * Copyright (c) 2015-present Snowplow Analytics Ltd. All rights reserved. * * This program is licensed to you under the Apache License Version 2.0, * and you may not use this file except in compliance with the Apache License Version 2.0. diff --git a/snowplow-tracker/src/main/java/com/snowplowanalytics/snowplow/configuration/EmitterConfiguration.kt b/snowplow-tracker/src/main/java/com/snowplowanalytics/snowplow/configuration/EmitterConfiguration.kt index 5578a30ee..d83950b7f 100644 --- a/snowplow-tracker/src/main/java/com/snowplowanalytics/snowplow/configuration/EmitterConfiguration.kt +++ b/snowplow-tracker/src/main/java/com/snowplowanalytics/snowplow/configuration/EmitterConfiguration.kt @@ -1,5 +1,5 @@ /* - * Copyright (c) 2015-2023 Snowplow Analytics Ltd. All rights reserved. + * Copyright (c) 2015-present Snowplow Analytics Ltd. All rights reserved. * * This program is licensed to you under the Apache License Version 2.0, * and you may not use this file except in compliance with the Apache License Version 2.0. diff --git a/snowplow-tracker/src/main/java/com/snowplowanalytics/snowplow/configuration/FocalMeterConfiguration.kt b/snowplow-tracker/src/main/java/com/snowplowanalytics/snowplow/configuration/FocalMeterConfiguration.kt index fe533762b..8018a9d57 100644 --- a/snowplow-tracker/src/main/java/com/snowplowanalytics/snowplow/configuration/FocalMeterConfiguration.kt +++ b/snowplow-tracker/src/main/java/com/snowplowanalytics/snowplow/configuration/FocalMeterConfiguration.kt @@ -1,5 +1,5 @@ /* - * Copyright (c) 2015-2023 Snowplow Analytics Ltd. All rights reserved. + * Copyright (c) 2015-present Snowplow Analytics Ltd. All rights reserved. * * This program is licensed to you under the Apache License Version 2.0, * and you may not use this file except in compliance with the Apache License Version 2.0. diff --git a/snowplow-tracker/src/main/java/com/snowplowanalytics/snowplow/configuration/GdprConfiguration.kt b/snowplow-tracker/src/main/java/com/snowplowanalytics/snowplow/configuration/GdprConfiguration.kt index c64320cc7..77316d7b1 100644 --- a/snowplow-tracker/src/main/java/com/snowplowanalytics/snowplow/configuration/GdprConfiguration.kt +++ b/snowplow-tracker/src/main/java/com/snowplowanalytics/snowplow/configuration/GdprConfiguration.kt @@ -1,5 +1,5 @@ /* - * Copyright (c) 2015-2023 Snowplow Analytics Ltd. All rights reserved. + * Copyright (c) 2015-present Snowplow Analytics Ltd. All rights reserved. * * This program is licensed to you under the Apache License Version 2.0, * and you may not use this file except in compliance with the Apache License Version 2.0. diff --git a/snowplow-tracker/src/main/java/com/snowplowanalytics/snowplow/configuration/GlobalContextsConfiguration.kt b/snowplow-tracker/src/main/java/com/snowplowanalytics/snowplow/configuration/GlobalContextsConfiguration.kt index 93034ad82..339ea71ba 100644 --- a/snowplow-tracker/src/main/java/com/snowplowanalytics/snowplow/configuration/GlobalContextsConfiguration.kt +++ b/snowplow-tracker/src/main/java/com/snowplowanalytics/snowplow/configuration/GlobalContextsConfiguration.kt @@ -1,5 +1,5 @@ /* - * Copyright (c) 2015-2023 Snowplow Analytics Ltd. All rights reserved. + * Copyright (c) 2015-present Snowplow Analytics Ltd. All rights reserved. * * This program is licensed to you under the Apache License Version 2.0, * and you may not use this file except in compliance with the Apache License Version 2.0. diff --git a/snowplow-tracker/src/main/java/com/snowplowanalytics/snowplow/configuration/NetworkConfiguration.kt b/snowplow-tracker/src/main/java/com/snowplowanalytics/snowplow/configuration/NetworkConfiguration.kt index 4541d8fa6..faa269ee9 100644 --- a/snowplow-tracker/src/main/java/com/snowplowanalytics/snowplow/configuration/NetworkConfiguration.kt +++ b/snowplow-tracker/src/main/java/com/snowplowanalytics/snowplow/configuration/NetworkConfiguration.kt @@ -1,5 +1,5 @@ /* - * Copyright (c) 2015-2023 Snowplow Analytics Ltd. All rights reserved. + * Copyright (c) 2015-present Snowplow Analytics Ltd. All rights reserved. * * This program is licensed to you under the Apache License Version 2.0, * and you may not use this file except in compliance with the Apache License Version 2.0. diff --git a/snowplow-tracker/src/main/java/com/snowplowanalytics/snowplow/configuration/PlatformContextProperty.kt b/snowplow-tracker/src/main/java/com/snowplowanalytics/snowplow/configuration/PlatformContextProperty.kt index 942f53bba..9ec779bb9 100644 --- a/snowplow-tracker/src/main/java/com/snowplowanalytics/snowplow/configuration/PlatformContextProperty.kt +++ b/snowplow-tracker/src/main/java/com/snowplowanalytics/snowplow/configuration/PlatformContextProperty.kt @@ -1,5 +1,5 @@ /* - * Copyright (c) 2015-2023 Snowplow Analytics Ltd. All rights reserved. + * Copyright (c) 2015-present Snowplow Analytics Ltd. All rights reserved. * * This program is licensed to you under the Apache License Version 2.0, * and you may not use this file except in compliance with the Apache License Version 2.0. diff --git a/snowplow-tracker/src/main/java/com/snowplowanalytics/snowplow/configuration/PluginConfiguration.kt b/snowplow-tracker/src/main/java/com/snowplowanalytics/snowplow/configuration/PluginConfiguration.kt index bfc61e78a..4da0084ee 100644 --- a/snowplow-tracker/src/main/java/com/snowplowanalytics/snowplow/configuration/PluginConfiguration.kt +++ b/snowplow-tracker/src/main/java/com/snowplowanalytics/snowplow/configuration/PluginConfiguration.kt @@ -1,5 +1,5 @@ /* - * Copyright (c) 2015-2023 Snowplow Analytics Ltd. All rights reserved. + * Copyright (c) 2015-present Snowplow Analytics Ltd. All rights reserved. * * This program is licensed to you under the Apache License Version 2.0, * and you may not use this file except in compliance with the Apache License Version 2.0. diff --git a/snowplow-tracker/src/main/java/com/snowplowanalytics/snowplow/configuration/RemoteConfiguration.kt b/snowplow-tracker/src/main/java/com/snowplowanalytics/snowplow/configuration/RemoteConfiguration.kt index 565c72107..0f3d71cc8 100644 --- a/snowplow-tracker/src/main/java/com/snowplowanalytics/snowplow/configuration/RemoteConfiguration.kt +++ b/snowplow-tracker/src/main/java/com/snowplowanalytics/snowplow/configuration/RemoteConfiguration.kt @@ -1,5 +1,5 @@ /* - * Copyright (c) 2015-2023 Snowplow Analytics Ltd. All rights reserved. + * Copyright (c) 2015-present Snowplow Analytics Ltd. All rights reserved. * * This program is licensed to you under the Apache License Version 2.0, * and you may not use this file except in compliance with the Apache License Version 2.0. diff --git a/snowplow-tracker/src/main/java/com/snowplowanalytics/snowplow/configuration/SessionConfiguration.kt b/snowplow-tracker/src/main/java/com/snowplowanalytics/snowplow/configuration/SessionConfiguration.kt index c12294089..d6a2647b5 100644 --- a/snowplow-tracker/src/main/java/com/snowplowanalytics/snowplow/configuration/SessionConfiguration.kt +++ b/snowplow-tracker/src/main/java/com/snowplowanalytics/snowplow/configuration/SessionConfiguration.kt @@ -1,5 +1,5 @@ /* - * Copyright (c) 2015-2023 Snowplow Analytics Ltd. All rights reserved. + * Copyright (c) 2015-present Snowplow Analytics Ltd. All rights reserved. * * This program is licensed to you under the Apache License Version 2.0, * and you may not use this file except in compliance with the Apache License Version 2.0. diff --git a/snowplow-tracker/src/main/java/com/snowplowanalytics/snowplow/configuration/SubjectConfiguration.kt b/snowplow-tracker/src/main/java/com/snowplowanalytics/snowplow/configuration/SubjectConfiguration.kt index 3e15d81c3..617d4b4e4 100644 --- a/snowplow-tracker/src/main/java/com/snowplowanalytics/snowplow/configuration/SubjectConfiguration.kt +++ b/snowplow-tracker/src/main/java/com/snowplowanalytics/snowplow/configuration/SubjectConfiguration.kt @@ -1,5 +1,5 @@ /* - * Copyright (c) 2015-2023 Snowplow Analytics Ltd. All rights reserved. + * Copyright (c) 2015-present Snowplow Analytics Ltd. All rights reserved. * * This program is licensed to you under the Apache License Version 2.0, * and you may not use this file except in compliance with the Apache License Version 2.0. diff --git a/snowplow-tracker/src/main/java/com/snowplowanalytics/snowplow/configuration/TrackerConfiguration.kt b/snowplow-tracker/src/main/java/com/snowplowanalytics/snowplow/configuration/TrackerConfiguration.kt index f8f78cbe3..ff4697af7 100644 --- a/snowplow-tracker/src/main/java/com/snowplowanalytics/snowplow/configuration/TrackerConfiguration.kt +++ b/snowplow-tracker/src/main/java/com/snowplowanalytics/snowplow/configuration/TrackerConfiguration.kt @@ -1,5 +1,5 @@ /* - * Copyright (c) 2015-2023 Snowplow Analytics Ltd. All rights reserved. + * Copyright (c) 2015-present Snowplow Analytics Ltd. All rights reserved. * * This program is licensed to you under the Apache License Version 2.0, * and you may not use this file except in compliance with the Apache License Version 2.0. diff --git a/snowplow-tracker/src/main/java/com/snowplowanalytics/snowplow/controller/EmitterController.kt b/snowplow-tracker/src/main/java/com/snowplowanalytics/snowplow/controller/EmitterController.kt index ff9edf1e2..afeff0c2b 100644 --- a/snowplow-tracker/src/main/java/com/snowplowanalytics/snowplow/controller/EmitterController.kt +++ b/snowplow-tracker/src/main/java/com/snowplowanalytics/snowplow/controller/EmitterController.kt @@ -1,5 +1,5 @@ /* - * Copyright (c) 2015-2023 Snowplow Analytics Ltd. All rights reserved. + * Copyright (c) 2015-present Snowplow Analytics Ltd. All rights reserved. * * This program is licensed to you under the Apache License Version 2.0, * and you may not use this file except in compliance with the Apache License Version 2.0. diff --git a/snowplow-tracker/src/main/java/com/snowplowanalytics/snowplow/controller/GdprController.kt b/snowplow-tracker/src/main/java/com/snowplowanalytics/snowplow/controller/GdprController.kt index 96c8cab33..5cc92c1f0 100644 --- a/snowplow-tracker/src/main/java/com/snowplowanalytics/snowplow/controller/GdprController.kt +++ b/snowplow-tracker/src/main/java/com/snowplowanalytics/snowplow/controller/GdprController.kt @@ -1,5 +1,5 @@ /* - * Copyright (c) 2015-2023 Snowplow Analytics Ltd. All rights reserved. + * Copyright (c) 2015-present Snowplow Analytics Ltd. All rights reserved. * * This program is licensed to you under the Apache License Version 2.0, * and you may not use this file except in compliance with the Apache License Version 2.0. diff --git a/snowplow-tracker/src/main/java/com/snowplowanalytics/snowplow/controller/GlobalContextsController.kt b/snowplow-tracker/src/main/java/com/snowplowanalytics/snowplow/controller/GlobalContextsController.kt index d2fadee57..35e13c833 100644 --- a/snowplow-tracker/src/main/java/com/snowplowanalytics/snowplow/controller/GlobalContextsController.kt +++ b/snowplow-tracker/src/main/java/com/snowplowanalytics/snowplow/controller/GlobalContextsController.kt @@ -1,5 +1,5 @@ /* - * Copyright (c) 2015-2023 Snowplow Analytics Ltd. All rights reserved. + * Copyright (c) 2015-present Snowplow Analytics Ltd. All rights reserved. * * This program is licensed to you under the Apache License Version 2.0, * and you may not use this file except in compliance with the Apache License Version 2.0. diff --git a/snowplow-tracker/src/main/java/com/snowplowanalytics/snowplow/controller/NetworkController.kt b/snowplow-tracker/src/main/java/com/snowplowanalytics/snowplow/controller/NetworkController.kt index 244c377a1..9970e17de 100644 --- a/snowplow-tracker/src/main/java/com/snowplowanalytics/snowplow/controller/NetworkController.kt +++ b/snowplow-tracker/src/main/java/com/snowplowanalytics/snowplow/controller/NetworkController.kt @@ -1,5 +1,5 @@ /* - * Copyright (c) 2015-2023 Snowplow Analytics Ltd. All rights reserved. + * Copyright (c) 2015-present Snowplow Analytics Ltd. All rights reserved. * * This program is licensed to you under the Apache License Version 2.0, * and you may not use this file except in compliance with the Apache License Version 2.0. diff --git a/snowplow-tracker/src/main/java/com/snowplowanalytics/snowplow/controller/PluginsController.kt b/snowplow-tracker/src/main/java/com/snowplowanalytics/snowplow/controller/PluginsController.kt index 752b79485..ac686ba27 100644 --- a/snowplow-tracker/src/main/java/com/snowplowanalytics/snowplow/controller/PluginsController.kt +++ b/snowplow-tracker/src/main/java/com/snowplowanalytics/snowplow/controller/PluginsController.kt @@ -1,5 +1,5 @@ /* - * Copyright (c) 2015-2023 Snowplow Analytics Ltd. All rights reserved. + * Copyright (c) 2015-present Snowplow Analytics Ltd. All rights reserved. * * This program is licensed to you under the Apache License Version 2.0, * and you may not use this file except in compliance with the Apache License Version 2.0. diff --git a/snowplow-tracker/src/main/java/com/snowplowanalytics/snowplow/controller/SessionController.kt b/snowplow-tracker/src/main/java/com/snowplowanalytics/snowplow/controller/SessionController.kt index 2313de6eb..99940096b 100644 --- a/snowplow-tracker/src/main/java/com/snowplowanalytics/snowplow/controller/SessionController.kt +++ b/snowplow-tracker/src/main/java/com/snowplowanalytics/snowplow/controller/SessionController.kt @@ -1,5 +1,5 @@ /* - * Copyright (c) 2015-2023 Snowplow Analytics Ltd. All rights reserved. + * Copyright (c) 2015-present Snowplow Analytics Ltd. All rights reserved. * * This program is licensed to you under the Apache License Version 2.0, * and you may not use this file except in compliance with the Apache License Version 2.0. diff --git a/snowplow-tracker/src/main/java/com/snowplowanalytics/snowplow/controller/SubjectController.kt b/snowplow-tracker/src/main/java/com/snowplowanalytics/snowplow/controller/SubjectController.kt index 9d93c5a66..8314ddae1 100644 --- a/snowplow-tracker/src/main/java/com/snowplowanalytics/snowplow/controller/SubjectController.kt +++ b/snowplow-tracker/src/main/java/com/snowplowanalytics/snowplow/controller/SubjectController.kt @@ -1,5 +1,5 @@ /* - * Copyright (c) 2015-2023 Snowplow Analytics Ltd. All rights reserved. + * Copyright (c) 2015-present Snowplow Analytics Ltd. All rights reserved. * * This program is licensed to you under the Apache License Version 2.0, * and you may not use this file except in compliance with the Apache License Version 2.0. diff --git a/snowplow-tracker/src/main/java/com/snowplowanalytics/snowplow/controller/TrackerController.kt b/snowplow-tracker/src/main/java/com/snowplowanalytics/snowplow/controller/TrackerController.kt index b4d697c59..5c094c6c8 100644 --- a/snowplow-tracker/src/main/java/com/snowplowanalytics/snowplow/controller/TrackerController.kt +++ b/snowplow-tracker/src/main/java/com/snowplowanalytics/snowplow/controller/TrackerController.kt @@ -1,5 +1,5 @@ /* - * Copyright (c) 2015-2023 Snowplow Analytics Ltd. All rights reserved. + * Copyright (c) 2015-present Snowplow Analytics Ltd. All rights reserved. * * This program is licensed to you under the Apache License Version 2.0, * and you may not use this file except in compliance with the Apache License Version 2.0. diff --git a/snowplow-tracker/src/main/java/com/snowplowanalytics/snowplow/ecommerce/EcommerceController.kt b/snowplow-tracker/src/main/java/com/snowplowanalytics/snowplow/ecommerce/EcommerceController.kt index c9e7d7e4a..55bed994a 100644 --- a/snowplow-tracker/src/main/java/com/snowplowanalytics/snowplow/ecommerce/EcommerceController.kt +++ b/snowplow-tracker/src/main/java/com/snowplowanalytics/snowplow/ecommerce/EcommerceController.kt @@ -1,5 +1,5 @@ /* - * Copyright (c) 2015-2023 Snowplow Analytics Ltd. All rights reserved. + * Copyright (c) 2015-present Snowplow Analytics Ltd. All rights reserved. * * This program is licensed to you under the Apache License Version 2.0, * and you may not use this file except in compliance with the Apache License Version 2.0. diff --git a/snowplow-tracker/src/main/java/com/snowplowanalytics/snowplow/ecommerce/ErrorType.kt b/snowplow-tracker/src/main/java/com/snowplowanalytics/snowplow/ecommerce/ErrorType.kt index 09ed27f2e..248f55764 100644 --- a/snowplow-tracker/src/main/java/com/snowplowanalytics/snowplow/ecommerce/ErrorType.kt +++ b/snowplow-tracker/src/main/java/com/snowplowanalytics/snowplow/ecommerce/ErrorType.kt @@ -1,5 +1,5 @@ /* - * Copyright (c) 2015-2023 Snowplow Analytics Ltd. All rights reserved. + * Copyright (c) 2015-present Snowplow Analytics Ltd. All rights reserved. * * This program is licensed to you under the Apache License Version 2.0, * and you may not use this file except in compliance with the Apache License Version 2.0. diff --git a/snowplow-tracker/src/main/java/com/snowplowanalytics/snowplow/ecommerce/entities/CartEntity.kt b/snowplow-tracker/src/main/java/com/snowplowanalytics/snowplow/ecommerce/entities/CartEntity.kt index f809b56ae..a8faca52d 100644 --- a/snowplow-tracker/src/main/java/com/snowplowanalytics/snowplow/ecommerce/entities/CartEntity.kt +++ b/snowplow-tracker/src/main/java/com/snowplowanalytics/snowplow/ecommerce/entities/CartEntity.kt @@ -1,5 +1,5 @@ /* - * Copyright (c) 2015-2023 Snowplow Analytics Ltd. All rights reserved. + * Copyright (c) 2015-present Snowplow Analytics Ltd. All rights reserved. * * This program is licensed to you under the Apache License Version 2.0, * and you may not use this file except in compliance with the Apache License Version 2.0. diff --git a/snowplow-tracker/src/main/java/com/snowplowanalytics/snowplow/ecommerce/entities/EcommerceScreenEntity.kt b/snowplow-tracker/src/main/java/com/snowplowanalytics/snowplow/ecommerce/entities/EcommerceScreenEntity.kt index 8b241190d..612d28658 100644 --- a/snowplow-tracker/src/main/java/com/snowplowanalytics/snowplow/ecommerce/entities/EcommerceScreenEntity.kt +++ b/snowplow-tracker/src/main/java/com/snowplowanalytics/snowplow/ecommerce/entities/EcommerceScreenEntity.kt @@ -1,5 +1,5 @@ /* - * Copyright (c) 2015-2023 Snowplow Analytics Ltd. All rights reserved. + * Copyright (c) 2015-present Snowplow Analytics Ltd. All rights reserved. * * This program is licensed to you under the Apache License Version 2.0, * and you may not use this file except in compliance with the Apache License Version 2.0. diff --git a/snowplow-tracker/src/main/java/com/snowplowanalytics/snowplow/ecommerce/entities/EcommerceUserEntity.kt b/snowplow-tracker/src/main/java/com/snowplowanalytics/snowplow/ecommerce/entities/EcommerceUserEntity.kt index 96a5158be..1f281e79a 100644 --- a/snowplow-tracker/src/main/java/com/snowplowanalytics/snowplow/ecommerce/entities/EcommerceUserEntity.kt +++ b/snowplow-tracker/src/main/java/com/snowplowanalytics/snowplow/ecommerce/entities/EcommerceUserEntity.kt @@ -1,5 +1,5 @@ /* - * Copyright (c) 2015-2023 Snowplow Analytics Ltd. All rights reserved. + * Copyright (c) 2015-present Snowplow Analytics Ltd. All rights reserved. * * This program is licensed to you under the Apache License Version 2.0, * and you may not use this file except in compliance with the Apache License Version 2.0. diff --git a/snowplow-tracker/src/main/java/com/snowplowanalytics/snowplow/ecommerce/entities/ProductEntity.kt b/snowplow-tracker/src/main/java/com/snowplowanalytics/snowplow/ecommerce/entities/ProductEntity.kt index dca788deb..8bed66c6b 100644 --- a/snowplow-tracker/src/main/java/com/snowplowanalytics/snowplow/ecommerce/entities/ProductEntity.kt +++ b/snowplow-tracker/src/main/java/com/snowplowanalytics/snowplow/ecommerce/entities/ProductEntity.kt @@ -1,5 +1,5 @@ /* - * Copyright (c) 2015-2023 Snowplow Analytics Ltd. All rights reserved. + * Copyright (c) 2015-present Snowplow Analytics Ltd. All rights reserved. * * This program is licensed to you under the Apache License Version 2.0, * and you may not use this file except in compliance with the Apache License Version 2.0. diff --git a/snowplow-tracker/src/main/java/com/snowplowanalytics/snowplow/ecommerce/entities/PromotionEntity.kt b/snowplow-tracker/src/main/java/com/snowplowanalytics/snowplow/ecommerce/entities/PromotionEntity.kt index e999052e5..daefda400 100644 --- a/snowplow-tracker/src/main/java/com/snowplowanalytics/snowplow/ecommerce/entities/PromotionEntity.kt +++ b/snowplow-tracker/src/main/java/com/snowplowanalytics/snowplow/ecommerce/entities/PromotionEntity.kt @@ -1,5 +1,5 @@ /* - * Copyright (c) 2015-2023 Snowplow Analytics Ltd. All rights reserved. + * Copyright (c) 2015-present Snowplow Analytics Ltd. All rights reserved. * * This program is licensed to you under the Apache License Version 2.0, * and you may not use this file except in compliance with the Apache License Version 2.0. diff --git a/snowplow-tracker/src/main/java/com/snowplowanalytics/snowplow/ecommerce/entities/TransactionEntity.kt b/snowplow-tracker/src/main/java/com/snowplowanalytics/snowplow/ecommerce/entities/TransactionEntity.kt index 71ea93ce0..10eca9aff 100644 --- a/snowplow-tracker/src/main/java/com/snowplowanalytics/snowplow/ecommerce/entities/TransactionEntity.kt +++ b/snowplow-tracker/src/main/java/com/snowplowanalytics/snowplow/ecommerce/entities/TransactionEntity.kt @@ -1,5 +1,5 @@ /* - * Copyright (c) 2015-2023 Snowplow Analytics Ltd. All rights reserved. + * Copyright (c) 2015-present Snowplow Analytics Ltd. All rights reserved. * * This program is licensed to you under the Apache License Version 2.0, * and you may not use this file except in compliance with the Apache License Version 2.0. diff --git a/snowplow-tracker/src/main/java/com/snowplowanalytics/snowplow/ecommerce/events/AddToCartEvent.kt b/snowplow-tracker/src/main/java/com/snowplowanalytics/snowplow/ecommerce/events/AddToCartEvent.kt index 650ac7434..ade762fac 100644 --- a/snowplow-tracker/src/main/java/com/snowplowanalytics/snowplow/ecommerce/events/AddToCartEvent.kt +++ b/snowplow-tracker/src/main/java/com/snowplowanalytics/snowplow/ecommerce/events/AddToCartEvent.kt @@ -1,5 +1,5 @@ /* - * Copyright (c) 2015-2023 Snowplow Analytics Ltd. All rights reserved. + * Copyright (c) 2015-present Snowplow Analytics Ltd. All rights reserved. * * This program is licensed to you under the Apache License Version 2.0, * and you may not use this file except in compliance with the Apache License Version 2.0. diff --git a/snowplow-tracker/src/main/java/com/snowplowanalytics/snowplow/ecommerce/events/CheckoutStepEvent.kt b/snowplow-tracker/src/main/java/com/snowplowanalytics/snowplow/ecommerce/events/CheckoutStepEvent.kt index d19e5c2fc..c927c7b09 100644 --- a/snowplow-tracker/src/main/java/com/snowplowanalytics/snowplow/ecommerce/events/CheckoutStepEvent.kt +++ b/snowplow-tracker/src/main/java/com/snowplowanalytics/snowplow/ecommerce/events/CheckoutStepEvent.kt @@ -1,5 +1,5 @@ /* - * Copyright (c) 2015-2023 Snowplow Analytics Ltd. All rights reserved. + * Copyright (c) 2015-present Snowplow Analytics Ltd. All rights reserved. * * This program is licensed to you under the Apache License Version 2.0, * and you may not use this file except in compliance with the Apache License Version 2.0. diff --git a/snowplow-tracker/src/main/java/com/snowplowanalytics/snowplow/ecommerce/events/ProductListClickEvent.kt b/snowplow-tracker/src/main/java/com/snowplowanalytics/snowplow/ecommerce/events/ProductListClickEvent.kt index 21f6b63df..18cb6c57c 100644 --- a/snowplow-tracker/src/main/java/com/snowplowanalytics/snowplow/ecommerce/events/ProductListClickEvent.kt +++ b/snowplow-tracker/src/main/java/com/snowplowanalytics/snowplow/ecommerce/events/ProductListClickEvent.kt @@ -1,5 +1,5 @@ /* - * Copyright (c) 2015-2023 Snowplow Analytics Ltd. All rights reserved. + * Copyright (c) 2015-present Snowplow Analytics Ltd. All rights reserved. * * This program is licensed to you under the Apache License Version 2.0, * and you may not use this file except in compliance with the Apache License Version 2.0. diff --git a/snowplow-tracker/src/main/java/com/snowplowanalytics/snowplow/ecommerce/events/ProductListViewEvent.kt b/snowplow-tracker/src/main/java/com/snowplowanalytics/snowplow/ecommerce/events/ProductListViewEvent.kt index 54eac51be..126693135 100644 --- a/snowplow-tracker/src/main/java/com/snowplowanalytics/snowplow/ecommerce/events/ProductListViewEvent.kt +++ b/snowplow-tracker/src/main/java/com/snowplowanalytics/snowplow/ecommerce/events/ProductListViewEvent.kt @@ -1,5 +1,5 @@ /* - * Copyright (c) 2015-2023 Snowplow Analytics Ltd. All rights reserved. + * Copyright (c) 2015-present Snowplow Analytics Ltd. All rights reserved. * * This program is licensed to you under the Apache License Version 2.0, * and you may not use this file except in compliance with the Apache License Version 2.0. diff --git a/snowplow-tracker/src/main/java/com/snowplowanalytics/snowplow/ecommerce/events/ProductViewEvent.kt b/snowplow-tracker/src/main/java/com/snowplowanalytics/snowplow/ecommerce/events/ProductViewEvent.kt index ee762c5e7..da3f3f560 100644 --- a/snowplow-tracker/src/main/java/com/snowplowanalytics/snowplow/ecommerce/events/ProductViewEvent.kt +++ b/snowplow-tracker/src/main/java/com/snowplowanalytics/snowplow/ecommerce/events/ProductViewEvent.kt @@ -1,5 +1,5 @@ /* - * Copyright (c) 2015-2023 Snowplow Analytics Ltd. All rights reserved. + * Copyright (c) 2015-present Snowplow Analytics Ltd. All rights reserved. * * This program is licensed to you under the Apache License Version 2.0, * and you may not use this file except in compliance with the Apache License Version 2.0. diff --git a/snowplow-tracker/src/main/java/com/snowplowanalytics/snowplow/ecommerce/events/PromotionClickEvent.kt b/snowplow-tracker/src/main/java/com/snowplowanalytics/snowplow/ecommerce/events/PromotionClickEvent.kt index 8c4bfa224..6f904b1ad 100644 --- a/snowplow-tracker/src/main/java/com/snowplowanalytics/snowplow/ecommerce/events/PromotionClickEvent.kt +++ b/snowplow-tracker/src/main/java/com/snowplowanalytics/snowplow/ecommerce/events/PromotionClickEvent.kt @@ -1,5 +1,5 @@ /* - * Copyright (c) 2015-2023 Snowplow Analytics Ltd. All rights reserved. + * Copyright (c) 2015-present Snowplow Analytics Ltd. All rights reserved. * * This program is licensed to you under the Apache License Version 2.0, * and you may not use this file except in compliance with the Apache License Version 2.0. diff --git a/snowplow-tracker/src/main/java/com/snowplowanalytics/snowplow/ecommerce/events/PromotionViewEvent.kt b/snowplow-tracker/src/main/java/com/snowplowanalytics/snowplow/ecommerce/events/PromotionViewEvent.kt index 12315dffe..ba57d9557 100644 --- a/snowplow-tracker/src/main/java/com/snowplowanalytics/snowplow/ecommerce/events/PromotionViewEvent.kt +++ b/snowplow-tracker/src/main/java/com/snowplowanalytics/snowplow/ecommerce/events/PromotionViewEvent.kt @@ -1,5 +1,5 @@ /* - * Copyright (c) 2015-2023 Snowplow Analytics Ltd. All rights reserved. + * Copyright (c) 2015-present Snowplow Analytics Ltd. All rights reserved. * * This program is licensed to you under the Apache License Version 2.0, * and you may not use this file except in compliance with the Apache License Version 2.0. diff --git a/snowplow-tracker/src/main/java/com/snowplowanalytics/snowplow/ecommerce/events/RefundEvent.kt b/snowplow-tracker/src/main/java/com/snowplowanalytics/snowplow/ecommerce/events/RefundEvent.kt index e2ec7311f..d5ada9ea8 100644 --- a/snowplow-tracker/src/main/java/com/snowplowanalytics/snowplow/ecommerce/events/RefundEvent.kt +++ b/snowplow-tracker/src/main/java/com/snowplowanalytics/snowplow/ecommerce/events/RefundEvent.kt @@ -1,5 +1,5 @@ /* - * Copyright (c) 2015-2023 Snowplow Analytics Ltd. All rights reserved. + * Copyright (c) 2015-present Snowplow Analytics Ltd. All rights reserved. * * This program is licensed to you under the Apache License Version 2.0, * and you may not use this file except in compliance with the Apache License Version 2.0. diff --git a/snowplow-tracker/src/main/java/com/snowplowanalytics/snowplow/ecommerce/events/RemoveFromCartEvent.kt b/snowplow-tracker/src/main/java/com/snowplowanalytics/snowplow/ecommerce/events/RemoveFromCartEvent.kt index 0a8e8c235..10d180a8c 100644 --- a/snowplow-tracker/src/main/java/com/snowplowanalytics/snowplow/ecommerce/events/RemoveFromCartEvent.kt +++ b/snowplow-tracker/src/main/java/com/snowplowanalytics/snowplow/ecommerce/events/RemoveFromCartEvent.kt @@ -1,5 +1,5 @@ /* - * Copyright (c) 2015-2023 Snowplow Analytics Ltd. All rights reserved. + * Copyright (c) 2015-present Snowplow Analytics Ltd. All rights reserved. * * This program is licensed to you under the Apache License Version 2.0, * and you may not use this file except in compliance with the Apache License Version 2.0. diff --git a/snowplow-tracker/src/main/java/com/snowplowanalytics/snowplow/ecommerce/events/TransactionErrorEvent.kt b/snowplow-tracker/src/main/java/com/snowplowanalytics/snowplow/ecommerce/events/TransactionErrorEvent.kt index 821dd2ab6..8a6a8c3e5 100644 --- a/snowplow-tracker/src/main/java/com/snowplowanalytics/snowplow/ecommerce/events/TransactionErrorEvent.kt +++ b/snowplow-tracker/src/main/java/com/snowplowanalytics/snowplow/ecommerce/events/TransactionErrorEvent.kt @@ -1,5 +1,5 @@ /* - * Copyright (c) 2015-2023 Snowplow Analytics Ltd. All rights reserved. + * Copyright (c) 2015-present Snowplow Analytics Ltd. All rights reserved. * * This program is licensed to you under the Apache License Version 2.0, * and you may not use this file except in compliance with the Apache License Version 2.0. diff --git a/snowplow-tracker/src/main/java/com/snowplowanalytics/snowplow/ecommerce/events/TransactionEvent.kt b/snowplow-tracker/src/main/java/com/snowplowanalytics/snowplow/ecommerce/events/TransactionEvent.kt index 249eb6275..0520b2d56 100644 --- a/snowplow-tracker/src/main/java/com/snowplowanalytics/snowplow/ecommerce/events/TransactionEvent.kt +++ b/snowplow-tracker/src/main/java/com/snowplowanalytics/snowplow/ecommerce/events/TransactionEvent.kt @@ -1,5 +1,5 @@ /* - * Copyright (c) 2015-2023 Snowplow Analytics Ltd. All rights reserved. + * Copyright (c) 2015-present Snowplow Analytics Ltd. All rights reserved. * * This program is licensed to you under the Apache License Version 2.0, * and you may not use this file except in compliance with the Apache License Version 2.0. diff --git a/snowplow-tracker/src/main/java/com/snowplowanalytics/snowplow/emitter/BufferOption.kt b/snowplow-tracker/src/main/java/com/snowplowanalytics/snowplow/emitter/BufferOption.kt index 58be82ee6..9519317e5 100755 --- a/snowplow-tracker/src/main/java/com/snowplowanalytics/snowplow/emitter/BufferOption.kt +++ b/snowplow-tracker/src/main/java/com/snowplowanalytics/snowplow/emitter/BufferOption.kt @@ -1,5 +1,5 @@ /* - * Copyright (c) 2015-2023 Snowplow Analytics Ltd. All rights reserved. + * Copyright (c) 2015-present Snowplow Analytics Ltd. All rights reserved. * * This program is licensed to you under the Apache License Version 2.0, * and you may not use this file except in compliance with the Apache License Version 2.0. diff --git a/snowplow-tracker/src/main/java/com/snowplowanalytics/snowplow/emitter/EmitterEvent.kt b/snowplow-tracker/src/main/java/com/snowplowanalytics/snowplow/emitter/EmitterEvent.kt index 42bc84cfb..529124bb9 100644 --- a/snowplow-tracker/src/main/java/com/snowplowanalytics/snowplow/emitter/EmitterEvent.kt +++ b/snowplow-tracker/src/main/java/com/snowplowanalytics/snowplow/emitter/EmitterEvent.kt @@ -1,5 +1,5 @@ /* - * Copyright (c) 2015-2023 Snowplow Analytics Ltd. All rights reserved. + * Copyright (c) 2015-present Snowplow Analytics Ltd. All rights reserved. * * This program is licensed to you under the Apache License Version 2.0, * and you may not use this file except in compliance with the Apache License Version 2.0. diff --git a/snowplow-tracker/src/main/java/com/snowplowanalytics/snowplow/emitter/EventStore.kt b/snowplow-tracker/src/main/java/com/snowplowanalytics/snowplow/emitter/EventStore.kt index aa4950d4a..e3b2e863a 100644 --- a/snowplow-tracker/src/main/java/com/snowplowanalytics/snowplow/emitter/EventStore.kt +++ b/snowplow-tracker/src/main/java/com/snowplowanalytics/snowplow/emitter/EventStore.kt @@ -1,5 +1,5 @@ /* - * Copyright (c) 2015-2023 Snowplow Analytics Ltd. All rights reserved. + * Copyright (c) 2015-present Snowplow Analytics Ltd. All rights reserved. * * This program is licensed to you under the Apache License Version 2.0, * and you may not use this file except in compliance with the Apache License Version 2.0. diff --git a/snowplow-tracker/src/main/java/com/snowplowanalytics/snowplow/entity/ClientSessionEntity.kt b/snowplow-tracker/src/main/java/com/snowplowanalytics/snowplow/entity/ClientSessionEntity.kt index 4d1a24356..8eaf8c634 100644 --- a/snowplow-tracker/src/main/java/com/snowplowanalytics/snowplow/entity/ClientSessionEntity.kt +++ b/snowplow-tracker/src/main/java/com/snowplowanalytics/snowplow/entity/ClientSessionEntity.kt @@ -1,5 +1,5 @@ /* - * Copyright (c) 2015-2023 Snowplow Analytics Ltd. All rights reserved. + * Copyright (c) 2015-present Snowplow Analytics Ltd. All rights reserved. * * This program is licensed to you under the Apache License Version 2.0, * and you may not use this file except in compliance with the Apache License Version 2.0. diff --git a/snowplow-tracker/src/main/java/com/snowplowanalytics/snowplow/entity/DeepLink.kt b/snowplow-tracker/src/main/java/com/snowplowanalytics/snowplow/entity/DeepLink.kt index cb4646264..fd24b71fd 100644 --- a/snowplow-tracker/src/main/java/com/snowplowanalytics/snowplow/entity/DeepLink.kt +++ b/snowplow-tracker/src/main/java/com/snowplowanalytics/snowplow/entity/DeepLink.kt @@ -1,5 +1,5 @@ /* - * Copyright (c) 2015-2023 Snowplow Analytics Ltd. All rights reserved. + * Copyright (c) 2015-present Snowplow Analytics Ltd. All rights reserved. * * This program is licensed to you under the Apache License Version 2.0, * and you may not use this file except in compliance with the Apache License Version 2.0. diff --git a/snowplow-tracker/src/main/java/com/snowplowanalytics/snowplow/entity/LifecycleEntity.kt b/snowplow-tracker/src/main/java/com/snowplowanalytics/snowplow/entity/LifecycleEntity.kt index ad90ff015..db1b57e50 100644 --- a/snowplow-tracker/src/main/java/com/snowplowanalytics/snowplow/entity/LifecycleEntity.kt +++ b/snowplow-tracker/src/main/java/com/snowplowanalytics/snowplow/entity/LifecycleEntity.kt @@ -1,5 +1,5 @@ /* - * Copyright (c) 2015-2023 Snowplow Analytics Ltd. All rights reserved. + * Copyright (c) 2015-present Snowplow Analytics Ltd. All rights reserved. * * This program is licensed to you under the Apache License Version 2.0, * and you may not use this file except in compliance with the Apache License Version 2.0. diff --git a/snowplow-tracker/src/main/java/com/snowplowanalytics/snowplow/event/AbstractEvent.kt b/snowplow-tracker/src/main/java/com/snowplowanalytics/snowplow/event/AbstractEvent.kt index 4022bfd22..88dbed443 100644 --- a/snowplow-tracker/src/main/java/com/snowplowanalytics/snowplow/event/AbstractEvent.kt +++ b/snowplow-tracker/src/main/java/com/snowplowanalytics/snowplow/event/AbstractEvent.kt @@ -1,5 +1,5 @@ /* - * Copyright (c) 2015-2023 Snowplow Analytics Ltd. All rights reserved. + * Copyright (c) 2015-present Snowplow Analytics Ltd. All rights reserved. * * This program is licensed to you under the Apache License Version 2.0, * and you may not use this file except in compliance with the Apache License Version 2.0. diff --git a/snowplow-tracker/src/main/java/com/snowplowanalytics/snowplow/event/AbstractPrimitive.kt b/snowplow-tracker/src/main/java/com/snowplowanalytics/snowplow/event/AbstractPrimitive.kt index 26ff04a32..2884030a3 100644 --- a/snowplow-tracker/src/main/java/com/snowplowanalytics/snowplow/event/AbstractPrimitive.kt +++ b/snowplow-tracker/src/main/java/com/snowplowanalytics/snowplow/event/AbstractPrimitive.kt @@ -1,5 +1,5 @@ /* - * Copyright (c) 2015-2023 Snowplow Analytics Ltd. All rights reserved. + * Copyright (c) 2015-present Snowplow Analytics Ltd. All rights reserved. * * This program is licensed to you under the Apache License Version 2.0, * and you may not use this file except in compliance with the Apache License Version 2.0. diff --git a/snowplow-tracker/src/main/java/com/snowplowanalytics/snowplow/event/AbstractSelfDescribing.kt b/snowplow-tracker/src/main/java/com/snowplowanalytics/snowplow/event/AbstractSelfDescribing.kt index fc2bdb719..c397ba3b2 100644 --- a/snowplow-tracker/src/main/java/com/snowplowanalytics/snowplow/event/AbstractSelfDescribing.kt +++ b/snowplow-tracker/src/main/java/com/snowplowanalytics/snowplow/event/AbstractSelfDescribing.kt @@ -1,5 +1,5 @@ /* - * Copyright (c) 2015-2023 Snowplow Analytics Ltd. All rights reserved. + * Copyright (c) 2015-present Snowplow Analytics Ltd. All rights reserved. * * This program is licensed to you under the Apache License Version 2.0, * and you may not use this file except in compliance with the Apache License Version 2.0. diff --git a/snowplow-tracker/src/main/java/com/snowplowanalytics/snowplow/event/Background.kt b/snowplow-tracker/src/main/java/com/snowplowanalytics/snowplow/event/Background.kt index d482125b2..e5e9983e6 100644 --- a/snowplow-tracker/src/main/java/com/snowplowanalytics/snowplow/event/Background.kt +++ b/snowplow-tracker/src/main/java/com/snowplowanalytics/snowplow/event/Background.kt @@ -1,5 +1,5 @@ /* - * Copyright (c) 2015-2023 Snowplow Analytics Ltd. All rights reserved. + * Copyright (c) 2015-present Snowplow Analytics Ltd. All rights reserved. * * This program is licensed to you under the Apache License Version 2.0, * and you may not use this file except in compliance with the Apache License Version 2.0. diff --git a/snowplow-tracker/src/main/java/com/snowplowanalytics/snowplow/event/ConsentDocument.kt b/snowplow-tracker/src/main/java/com/snowplowanalytics/snowplow/event/ConsentDocument.kt index 25b14eca2..8371b88e1 100644 --- a/snowplow-tracker/src/main/java/com/snowplowanalytics/snowplow/event/ConsentDocument.kt +++ b/snowplow-tracker/src/main/java/com/snowplowanalytics/snowplow/event/ConsentDocument.kt @@ -1,5 +1,5 @@ /* - * Copyright (c) 2015-2023 Snowplow Analytics Ltd. All rights reserved. + * Copyright (c) 2015-present Snowplow Analytics Ltd. All rights reserved. * * This program is licensed to you under the Apache License Version 2.0, * and you may not use this file except in compliance with the Apache License Version 2.0. diff --git a/snowplow-tracker/src/main/java/com/snowplowanalytics/snowplow/event/ConsentGranted.kt b/snowplow-tracker/src/main/java/com/snowplowanalytics/snowplow/event/ConsentGranted.kt index 9966292f4..704c6e97e 100644 --- a/snowplow-tracker/src/main/java/com/snowplowanalytics/snowplow/event/ConsentGranted.kt +++ b/snowplow-tracker/src/main/java/com/snowplowanalytics/snowplow/event/ConsentGranted.kt @@ -1,5 +1,5 @@ /* - * Copyright (c) 2015-2023 Snowplow Analytics Ltd. All rights reserved. + * Copyright (c) 2015-present Snowplow Analytics Ltd. All rights reserved. * * This program is licensed to you under the Apache License Version 2.0, * and you may not use this file except in compliance with the Apache License Version 2.0. diff --git a/snowplow-tracker/src/main/java/com/snowplowanalytics/snowplow/event/ConsentWithdrawn.kt b/snowplow-tracker/src/main/java/com/snowplowanalytics/snowplow/event/ConsentWithdrawn.kt index 9dc793a45..8f45a6d8b 100644 --- a/snowplow-tracker/src/main/java/com/snowplowanalytics/snowplow/event/ConsentWithdrawn.kt +++ b/snowplow-tracker/src/main/java/com/snowplowanalytics/snowplow/event/ConsentWithdrawn.kt @@ -1,5 +1,5 @@ /* - * Copyright (c) 2015-2023 Snowplow Analytics Ltd. All rights reserved. + * Copyright (c) 2015-present Snowplow Analytics Ltd. All rights reserved. * * This program is licensed to you under the Apache License Version 2.0, * and you may not use this file except in compliance with the Apache License Version 2.0. diff --git a/snowplow-tracker/src/main/java/com/snowplowanalytics/snowplow/event/DeepLinkReceived.kt b/snowplow-tracker/src/main/java/com/snowplowanalytics/snowplow/event/DeepLinkReceived.kt index 6c51d46b7..44940a6c4 100644 --- a/snowplow-tracker/src/main/java/com/snowplowanalytics/snowplow/event/DeepLinkReceived.kt +++ b/snowplow-tracker/src/main/java/com/snowplowanalytics/snowplow/event/DeepLinkReceived.kt @@ -1,5 +1,5 @@ /* - * Copyright (c) 2015-2023 Snowplow Analytics Ltd. All rights reserved. + * Copyright (c) 2015-present Snowplow Analytics Ltd. All rights reserved. * * This program is licensed to you under the Apache License Version 2.0, * and you may not use this file except in compliance with the Apache License Version 2.0. diff --git a/snowplow-tracker/src/main/java/com/snowplowanalytics/snowplow/event/EcommerceTransaction.kt b/snowplow-tracker/src/main/java/com/snowplowanalytics/snowplow/event/EcommerceTransaction.kt index 296d49c71..7dfba1e82 100644 --- a/snowplow-tracker/src/main/java/com/snowplowanalytics/snowplow/event/EcommerceTransaction.kt +++ b/snowplow-tracker/src/main/java/com/snowplowanalytics/snowplow/event/EcommerceTransaction.kt @@ -1,5 +1,5 @@ /* - * Copyright (c) 2015-2023 Snowplow Analytics Ltd. All rights reserved. + * Copyright (c) 2015-present Snowplow Analytics Ltd. All rights reserved. * * This program is licensed to you under the Apache License Version 2.0, * and you may not use this file except in compliance with the Apache License Version 2.0. diff --git a/snowplow-tracker/src/main/java/com/snowplowanalytics/snowplow/event/EcommerceTransactionItem.kt b/snowplow-tracker/src/main/java/com/snowplowanalytics/snowplow/event/EcommerceTransactionItem.kt index 383f53d09..8daa2f4e7 100644 --- a/snowplow-tracker/src/main/java/com/snowplowanalytics/snowplow/event/EcommerceTransactionItem.kt +++ b/snowplow-tracker/src/main/java/com/snowplowanalytics/snowplow/event/EcommerceTransactionItem.kt @@ -1,5 +1,5 @@ /* - * Copyright (c) 2015-2023 Snowplow Analytics Ltd. All rights reserved. + * Copyright (c) 2015-present Snowplow Analytics Ltd. All rights reserved. * * This program is licensed to you under the Apache License Version 2.0, * and you may not use this file except in compliance with the Apache License Version 2.0. diff --git a/snowplow-tracker/src/main/java/com/snowplowanalytics/snowplow/event/Event.kt b/snowplow-tracker/src/main/java/com/snowplowanalytics/snowplow/event/Event.kt index 12fdad950..e66662f78 100644 --- a/snowplow-tracker/src/main/java/com/snowplowanalytics/snowplow/event/Event.kt +++ b/snowplow-tracker/src/main/java/com/snowplowanalytics/snowplow/event/Event.kt @@ -1,5 +1,5 @@ /* - * Copyright (c) 2015-2023 Snowplow Analytics Ltd. All rights reserved. + * Copyright (c) 2015-present Snowplow Analytics Ltd. All rights reserved. * * This program is licensed to you under the Apache License Version 2.0, * and you may not use this file except in compliance with the Apache License Version 2.0. diff --git a/snowplow-tracker/src/main/java/com/snowplowanalytics/snowplow/event/Foreground.kt b/snowplow-tracker/src/main/java/com/snowplowanalytics/snowplow/event/Foreground.kt index 7e856f7ff..ec69b2c95 100644 --- a/snowplow-tracker/src/main/java/com/snowplowanalytics/snowplow/event/Foreground.kt +++ b/snowplow-tracker/src/main/java/com/snowplowanalytics/snowplow/event/Foreground.kt @@ -1,5 +1,5 @@ /* - * Copyright (c) 2015-2023 Snowplow Analytics Ltd. All rights reserved. + * Copyright (c) 2015-present Snowplow Analytics Ltd. All rights reserved. * * This program is licensed to you under the Apache License Version 2.0, * and you may not use this file except in compliance with the Apache License Version 2.0. diff --git a/snowplow-tracker/src/main/java/com/snowplowanalytics/snowplow/event/ListItemView.kt b/snowplow-tracker/src/main/java/com/snowplowanalytics/snowplow/event/ListItemView.kt index 2d98304ba..be8fe635a 100644 --- a/snowplow-tracker/src/main/java/com/snowplowanalytics/snowplow/event/ListItemView.kt +++ b/snowplow-tracker/src/main/java/com/snowplowanalytics/snowplow/event/ListItemView.kt @@ -1,5 +1,5 @@ /* - * Copyright (c) 2015-2023 Snowplow Analytics Ltd. All rights reserved. + * Copyright (c) 2015-present Snowplow Analytics Ltd. All rights reserved. * * This program is licensed to you under the Apache License Version 2.0, * and you may not use this file except in compliance with the Apache License Version 2.0. diff --git a/snowplow-tracker/src/main/java/com/snowplowanalytics/snowplow/event/MessageNotification.kt b/snowplow-tracker/src/main/java/com/snowplowanalytics/snowplow/event/MessageNotification.kt index 34c058e74..28e29d1ce 100644 --- a/snowplow-tracker/src/main/java/com/snowplowanalytics/snowplow/event/MessageNotification.kt +++ b/snowplow-tracker/src/main/java/com/snowplowanalytics/snowplow/event/MessageNotification.kt @@ -1,5 +1,5 @@ /* - * Copyright (c) 2015-2023 Snowplow Analytics Ltd. All rights reserved. + * Copyright (c) 2015-present Snowplow Analytics Ltd. All rights reserved. * * This program is licensed to you under the Apache License Version 2.0, * and you may not use this file except in compliance with the Apache License Version 2.0. diff --git a/snowplow-tracker/src/main/java/com/snowplowanalytics/snowplow/event/MessageNotificationAttachment.kt b/snowplow-tracker/src/main/java/com/snowplowanalytics/snowplow/event/MessageNotificationAttachment.kt index 3fe081654..26dfdff17 100644 --- a/snowplow-tracker/src/main/java/com/snowplowanalytics/snowplow/event/MessageNotificationAttachment.kt +++ b/snowplow-tracker/src/main/java/com/snowplowanalytics/snowplow/event/MessageNotificationAttachment.kt @@ -1,5 +1,5 @@ /* - * Copyright (c) 2015-2023 Snowplow Analytics Ltd. All rights reserved. + * Copyright (c) 2015-present Snowplow Analytics Ltd. All rights reserved. * * This program is licensed to you under the Apache License Version 2.0, * and you may not use this file except in compliance with the Apache License Version 2.0. diff --git a/snowplow-tracker/src/main/java/com/snowplowanalytics/snowplow/event/MessageNotificationTrigger.kt b/snowplow-tracker/src/main/java/com/snowplowanalytics/snowplow/event/MessageNotificationTrigger.kt index b9adc93a5..e9e5b63de 100644 --- a/snowplow-tracker/src/main/java/com/snowplowanalytics/snowplow/event/MessageNotificationTrigger.kt +++ b/snowplow-tracker/src/main/java/com/snowplowanalytics/snowplow/event/MessageNotificationTrigger.kt @@ -1,5 +1,5 @@ /* - * Copyright (c) 2015-2023 Snowplow Analytics Ltd. All rights reserved. + * Copyright (c) 2015-present Snowplow Analytics Ltd. All rights reserved. * * This program is licensed to you under the Apache License Version 2.0, * and you may not use this file except in compliance with the Apache License Version 2.0. diff --git a/snowplow-tracker/src/main/java/com/snowplowanalytics/snowplow/event/PageView.kt b/snowplow-tracker/src/main/java/com/snowplowanalytics/snowplow/event/PageView.kt index da04a931b..f553974b5 100644 --- a/snowplow-tracker/src/main/java/com/snowplowanalytics/snowplow/event/PageView.kt +++ b/snowplow-tracker/src/main/java/com/snowplowanalytics/snowplow/event/PageView.kt @@ -1,5 +1,5 @@ /* - * Copyright (c) 2015-2023 Snowplow Analytics Ltd. All rights reserved. + * Copyright (c) 2015-present Snowplow Analytics Ltd. All rights reserved. * * This program is licensed to you under the Apache License Version 2.0, * and you may not use this file except in compliance with the Apache License Version 2.0. diff --git a/snowplow-tracker/src/main/java/com/snowplowanalytics/snowplow/event/ScreenView.kt b/snowplow-tracker/src/main/java/com/snowplowanalytics/snowplow/event/ScreenView.kt index 5ceacfd42..9e7b5dd00 100644 --- a/snowplow-tracker/src/main/java/com/snowplowanalytics/snowplow/event/ScreenView.kt +++ b/snowplow-tracker/src/main/java/com/snowplowanalytics/snowplow/event/ScreenView.kt @@ -1,5 +1,5 @@ /* - * Copyright (c) 2015-2023 Snowplow Analytics Ltd. All rights reserved. + * Copyright (c) 2015-present Snowplow Analytics Ltd. All rights reserved. * * This program is licensed to you under the Apache License Version 2.0, * and you may not use this file except in compliance with the Apache License Version 2.0. diff --git a/snowplow-tracker/src/main/java/com/snowplowanalytics/snowplow/event/ScrollChanged.kt b/snowplow-tracker/src/main/java/com/snowplowanalytics/snowplow/event/ScrollChanged.kt index c2e2b2f35..bbe4d9e0a 100644 --- a/snowplow-tracker/src/main/java/com/snowplowanalytics/snowplow/event/ScrollChanged.kt +++ b/snowplow-tracker/src/main/java/com/snowplowanalytics/snowplow/event/ScrollChanged.kt @@ -1,5 +1,5 @@ /* - * Copyright (c) 2015-2023 Snowplow Analytics Ltd. All rights reserved. + * Copyright (c) 2015-present Snowplow Analytics Ltd. All rights reserved. * * This program is licensed to you under the Apache License Version 2.0, * and you may not use this file except in compliance with the Apache License Version 2.0. diff --git a/snowplow-tracker/src/main/java/com/snowplowanalytics/snowplow/event/SelfDescribing.kt b/snowplow-tracker/src/main/java/com/snowplowanalytics/snowplow/event/SelfDescribing.kt index 8334067bd..462315272 100644 --- a/snowplow-tracker/src/main/java/com/snowplowanalytics/snowplow/event/SelfDescribing.kt +++ b/snowplow-tracker/src/main/java/com/snowplowanalytics/snowplow/event/SelfDescribing.kt @@ -1,5 +1,5 @@ /* - * Copyright (c) 2015-2023 Snowplow Analytics Ltd. All rights reserved. + * Copyright (c) 2015-present Snowplow Analytics Ltd. All rights reserved. * * This program is licensed to you under the Apache License Version 2.0, * and you may not use this file except in compliance with the Apache License Version 2.0. diff --git a/snowplow-tracker/src/main/java/com/snowplowanalytics/snowplow/event/Structured.kt b/snowplow-tracker/src/main/java/com/snowplowanalytics/snowplow/event/Structured.kt index 0024fa6f9..5a703b747 100644 --- a/snowplow-tracker/src/main/java/com/snowplowanalytics/snowplow/event/Structured.kt +++ b/snowplow-tracker/src/main/java/com/snowplowanalytics/snowplow/event/Structured.kt @@ -1,5 +1,5 @@ /* - * Copyright (c) 2015-2023 Snowplow Analytics Ltd. All rights reserved. + * Copyright (c) 2015-present Snowplow Analytics Ltd. All rights reserved. * * This program is licensed to you under the Apache License Version 2.0, * and you may not use this file except in compliance with the Apache License Version 2.0. diff --git a/snowplow-tracker/src/main/java/com/snowplowanalytics/snowplow/event/Timing.kt b/snowplow-tracker/src/main/java/com/snowplowanalytics/snowplow/event/Timing.kt index 524585152..9e41ebaa6 100644 --- a/snowplow-tracker/src/main/java/com/snowplowanalytics/snowplow/event/Timing.kt +++ b/snowplow-tracker/src/main/java/com/snowplowanalytics/snowplow/event/Timing.kt @@ -1,5 +1,5 @@ /* - * Copyright (c) 2015-2023 Snowplow Analytics Ltd. All rights reserved. + * Copyright (c) 2015-present Snowplow Analytics Ltd. All rights reserved. * * This program is licensed to you under the Apache License Version 2.0, * and you may not use this file except in compliance with the Apache License Version 2.0. diff --git a/snowplow-tracker/src/main/java/com/snowplowanalytics/snowplow/event/TrackerError.kt b/snowplow-tracker/src/main/java/com/snowplowanalytics/snowplow/event/TrackerError.kt index b5362c476..954673160 100644 --- a/snowplow-tracker/src/main/java/com/snowplowanalytics/snowplow/event/TrackerError.kt +++ b/snowplow-tracker/src/main/java/com/snowplowanalytics/snowplow/event/TrackerError.kt @@ -1,5 +1,5 @@ /* - * Copyright (c) 2015-2023 Snowplow Analytics Ltd. All rights reserved. + * Copyright (c) 2015-present Snowplow Analytics Ltd. All rights reserved. * * This program is licensed to you under the Apache License Version 2.0, * and you may not use this file except in compliance with the Apache License Version 2.0. diff --git a/snowplow-tracker/src/main/java/com/snowplowanalytics/snowplow/globalcontexts/ContextGenerator.kt b/snowplow-tracker/src/main/java/com/snowplowanalytics/snowplow/globalcontexts/ContextGenerator.kt index 43a4f8f41..5c119ad74 100644 --- a/snowplow-tracker/src/main/java/com/snowplowanalytics/snowplow/globalcontexts/ContextGenerator.kt +++ b/snowplow-tracker/src/main/java/com/snowplowanalytics/snowplow/globalcontexts/ContextGenerator.kt @@ -1,5 +1,5 @@ /* - * Copyright (c) 2015-2023 Snowplow Analytics Ltd. All rights reserved. + * Copyright (c) 2015-present Snowplow Analytics Ltd. All rights reserved. * * This program is licensed to you under the Apache License Version 2.0, * and you may not use this file except in compliance with the Apache License Version 2.0. diff --git a/snowplow-tracker/src/main/java/com/snowplowanalytics/snowplow/globalcontexts/FunctionalFilter.kt b/snowplow-tracker/src/main/java/com/snowplowanalytics/snowplow/globalcontexts/FunctionalFilter.kt index 5fd26d0c7..6c00a434a 100644 --- a/snowplow-tracker/src/main/java/com/snowplowanalytics/snowplow/globalcontexts/FunctionalFilter.kt +++ b/snowplow-tracker/src/main/java/com/snowplowanalytics/snowplow/globalcontexts/FunctionalFilter.kt @@ -1,5 +1,5 @@ /* - * Copyright (c) 2015-2023 Snowplow Analytics Ltd. All rights reserved. + * Copyright (c) 2015-present Snowplow Analytics Ltd. All rights reserved. * * This program is licensed to you under the Apache License Version 2.0, * and you may not use this file except in compliance with the Apache License Version 2.0. diff --git a/snowplow-tracker/src/main/java/com/snowplowanalytics/snowplow/globalcontexts/FunctionalGenerator.kt b/snowplow-tracker/src/main/java/com/snowplowanalytics/snowplow/globalcontexts/FunctionalGenerator.kt index 8b4786bc4..17d3fd267 100644 --- a/snowplow-tracker/src/main/java/com/snowplowanalytics/snowplow/globalcontexts/FunctionalGenerator.kt +++ b/snowplow-tracker/src/main/java/com/snowplowanalytics/snowplow/globalcontexts/FunctionalGenerator.kt @@ -1,5 +1,5 @@ /* - * Copyright (c) 2015-2023 Snowplow Analytics Ltd. All rights reserved. + * Copyright (c) 2015-present Snowplow Analytics Ltd. All rights reserved. * * This program is licensed to you under the Apache License Version 2.0, * and you may not use this file except in compliance with the Apache License Version 2.0. diff --git a/snowplow-tracker/src/main/java/com/snowplowanalytics/snowplow/globalcontexts/GlobalContext.kt b/snowplow-tracker/src/main/java/com/snowplowanalytics/snowplow/globalcontexts/GlobalContext.kt index ddf5f0f7d..6cb7faf95 100644 --- a/snowplow-tracker/src/main/java/com/snowplowanalytics/snowplow/globalcontexts/GlobalContext.kt +++ b/snowplow-tracker/src/main/java/com/snowplowanalytics/snowplow/globalcontexts/GlobalContext.kt @@ -1,5 +1,5 @@ /* - * Copyright (c) 2015-2023 Snowplow Analytics Ltd. All rights reserved. + * Copyright (c) 2015-present Snowplow Analytics Ltd. All rights reserved. * * This program is licensed to you under the Apache License Version 2.0, * and you may not use this file except in compliance with the Apache License Version 2.0. diff --git a/snowplow-tracker/src/main/java/com/snowplowanalytics/snowplow/globalcontexts/SchemaRuleSet.kt b/snowplow-tracker/src/main/java/com/snowplowanalytics/snowplow/globalcontexts/SchemaRuleSet.kt index ec9970983..858442350 100644 --- a/snowplow-tracker/src/main/java/com/snowplowanalytics/snowplow/globalcontexts/SchemaRuleSet.kt +++ b/snowplow-tracker/src/main/java/com/snowplowanalytics/snowplow/globalcontexts/SchemaRuleSet.kt @@ -1,5 +1,5 @@ /* - * Copyright (c) 2015-2023 Snowplow Analytics Ltd. All rights reserved. + * Copyright (c) 2015-present Snowplow Analytics Ltd. All rights reserved. * * This program is licensed to you under the Apache License Version 2.0, * and you may not use this file except in compliance with the Apache License Version 2.0. diff --git a/snowplow-tracker/src/main/java/com/snowplowanalytics/snowplow/media/configuration/MediaTrackingConfiguration.kt b/snowplow-tracker/src/main/java/com/snowplowanalytics/snowplow/media/configuration/MediaTrackingConfiguration.kt index 96c92f950..6a8a3aa92 100644 --- a/snowplow-tracker/src/main/java/com/snowplowanalytics/snowplow/media/configuration/MediaTrackingConfiguration.kt +++ b/snowplow-tracker/src/main/java/com/snowplowanalytics/snowplow/media/configuration/MediaTrackingConfiguration.kt @@ -1,5 +1,5 @@ /* - * Copyright (c) 2015-2023 Snowplow Analytics Ltd. All rights reserved. + * Copyright (c) 2015-present Snowplow Analytics Ltd. All rights reserved. * * This program is licensed to you under the Apache License Version 2.0, * and you may not use this file except in compliance with the Apache License Version 2.0. diff --git a/snowplow-tracker/src/main/java/com/snowplowanalytics/snowplow/media/controller/MediaController.kt b/snowplow-tracker/src/main/java/com/snowplowanalytics/snowplow/media/controller/MediaController.kt index ec43012dc..1927d4d58 100644 --- a/snowplow-tracker/src/main/java/com/snowplowanalytics/snowplow/media/controller/MediaController.kt +++ b/snowplow-tracker/src/main/java/com/snowplowanalytics/snowplow/media/controller/MediaController.kt @@ -1,5 +1,5 @@ /* - * Copyright (c) 2015-2023 Snowplow Analytics Ltd. All rights reserved. + * Copyright (c) 2015-present Snowplow Analytics Ltd. All rights reserved. * * This program is licensed to you under the Apache License Version 2.0, * and you may not use this file except in compliance with the Apache License Version 2.0. diff --git a/snowplow-tracker/src/main/java/com/snowplowanalytics/snowplow/media/controller/MediaTracking.kt b/snowplow-tracker/src/main/java/com/snowplowanalytics/snowplow/media/controller/MediaTracking.kt index 7b76ad06a..181ca01e8 100644 --- a/snowplow-tracker/src/main/java/com/snowplowanalytics/snowplow/media/controller/MediaTracking.kt +++ b/snowplow-tracker/src/main/java/com/snowplowanalytics/snowplow/media/controller/MediaTracking.kt @@ -1,5 +1,5 @@ /* - * Copyright (c) 2015-2023 Snowplow Analytics Ltd. All rights reserved. + * Copyright (c) 2015-present Snowplow Analytics Ltd. All rights reserved. * * This program is licensed to you under the Apache License Version 2.0, * and you may not use this file except in compliance with the Apache License Version 2.0. diff --git a/snowplow-tracker/src/main/java/com/snowplowanalytics/snowplow/media/entity/MediaAdBreakEntity.kt b/snowplow-tracker/src/main/java/com/snowplowanalytics/snowplow/media/entity/MediaAdBreakEntity.kt index 0f46f39c0..1b5d4dd98 100644 --- a/snowplow-tracker/src/main/java/com/snowplowanalytics/snowplow/media/entity/MediaAdBreakEntity.kt +++ b/snowplow-tracker/src/main/java/com/snowplowanalytics/snowplow/media/entity/MediaAdBreakEntity.kt @@ -1,5 +1,5 @@ /* - * Copyright (c) 2015-2023 Snowplow Analytics Ltd. All rights reserved. + * Copyright (c) 2015-present Snowplow Analytics Ltd. All rights reserved. * * This program is licensed to you under the Apache License Version 2.0, * and you may not use this file except in compliance with the Apache License Version 2.0. diff --git a/snowplow-tracker/src/main/java/com/snowplowanalytics/snowplow/media/entity/MediaAdBreakType.kt b/snowplow-tracker/src/main/java/com/snowplowanalytics/snowplow/media/entity/MediaAdBreakType.kt index 965afcd07..c9598f31d 100644 --- a/snowplow-tracker/src/main/java/com/snowplowanalytics/snowplow/media/entity/MediaAdBreakType.kt +++ b/snowplow-tracker/src/main/java/com/snowplowanalytics/snowplow/media/entity/MediaAdBreakType.kt @@ -1,5 +1,5 @@ /* - * Copyright (c) 2015-2023 Snowplow Analytics Ltd. All rights reserved. + * Copyright (c) 2015-present Snowplow Analytics Ltd. All rights reserved. * * This program is licensed to you under the Apache License Version 2.0, * and you may not use this file except in compliance with the Apache License Version 2.0. diff --git a/snowplow-tracker/src/main/java/com/snowplowanalytics/snowplow/media/entity/MediaAdEntity.kt b/snowplow-tracker/src/main/java/com/snowplowanalytics/snowplow/media/entity/MediaAdEntity.kt index 363c454dd..c32682705 100644 --- a/snowplow-tracker/src/main/java/com/snowplowanalytics/snowplow/media/entity/MediaAdEntity.kt +++ b/snowplow-tracker/src/main/java/com/snowplowanalytics/snowplow/media/entity/MediaAdEntity.kt @@ -1,5 +1,5 @@ /* - * Copyright (c) 2015-2023 Snowplow Analytics Ltd. All rights reserved. + * Copyright (c) 2015-present Snowplow Analytics Ltd. All rights reserved. * * This program is licensed to you under the Apache License Version 2.0, * and you may not use this file except in compliance with the Apache License Version 2.0. diff --git a/snowplow-tracker/src/main/java/com/snowplowanalytics/snowplow/media/entity/MediaPlayerEntity.kt b/snowplow-tracker/src/main/java/com/snowplowanalytics/snowplow/media/entity/MediaPlayerEntity.kt index 0f0bd414a..4e1f0a3b1 100644 --- a/snowplow-tracker/src/main/java/com/snowplowanalytics/snowplow/media/entity/MediaPlayerEntity.kt +++ b/snowplow-tracker/src/main/java/com/snowplowanalytics/snowplow/media/entity/MediaPlayerEntity.kt @@ -1,5 +1,5 @@ /* - * Copyright (c) 2015-2023 Snowplow Analytics Ltd. All rights reserved. + * Copyright (c) 2015-present Snowplow Analytics Ltd. All rights reserved. * * This program is licensed to you under the Apache License Version 2.0, * and you may not use this file except in compliance with the Apache License Version 2.0. diff --git a/snowplow-tracker/src/main/java/com/snowplowanalytics/snowplow/media/entity/MediaType.kt b/snowplow-tracker/src/main/java/com/snowplowanalytics/snowplow/media/entity/MediaType.kt index 1abb22e8d..6dec285dc 100644 --- a/snowplow-tracker/src/main/java/com/snowplowanalytics/snowplow/media/entity/MediaType.kt +++ b/snowplow-tracker/src/main/java/com/snowplowanalytics/snowplow/media/entity/MediaType.kt @@ -1,5 +1,5 @@ /* - * Copyright (c) 2015-2023 Snowplow Analytics Ltd. All rights reserved. + * Copyright (c) 2015-present Snowplow Analytics Ltd. All rights reserved. * * This program is licensed to you under the Apache License Version 2.0, * and you may not use this file except in compliance with the Apache License Version 2.0. diff --git a/snowplow-tracker/src/main/java/com/snowplowanalytics/snowplow/media/event/MediaAdBreakEndEvent.kt b/snowplow-tracker/src/main/java/com/snowplowanalytics/snowplow/media/event/MediaAdBreakEndEvent.kt index 3703dea8d..1b1b7c89c 100644 --- a/snowplow-tracker/src/main/java/com/snowplowanalytics/snowplow/media/event/MediaAdBreakEndEvent.kt +++ b/snowplow-tracker/src/main/java/com/snowplowanalytics/snowplow/media/event/MediaAdBreakEndEvent.kt @@ -1,5 +1,5 @@ /* - * Copyright (c) 2015-2023 Snowplow Analytics Ltd. All rights reserved. + * Copyright (c) 2015-present Snowplow Analytics Ltd. All rights reserved. * * This program is licensed to you under the Apache License Version 2.0, * and you may not use this file except in compliance with the Apache License Version 2.0. diff --git a/snowplow-tracker/src/main/java/com/snowplowanalytics/snowplow/media/event/MediaAdBreakStartEvent.kt b/snowplow-tracker/src/main/java/com/snowplowanalytics/snowplow/media/event/MediaAdBreakStartEvent.kt index e8286cad6..004ea09f4 100644 --- a/snowplow-tracker/src/main/java/com/snowplowanalytics/snowplow/media/event/MediaAdBreakStartEvent.kt +++ b/snowplow-tracker/src/main/java/com/snowplowanalytics/snowplow/media/event/MediaAdBreakStartEvent.kt @@ -1,5 +1,5 @@ /* - * Copyright (c) 2015-2023 Snowplow Analytics Ltd. All rights reserved. + * Copyright (c) 2015-present Snowplow Analytics Ltd. All rights reserved. * * This program is licensed to you under the Apache License Version 2.0, * and you may not use this file except in compliance with the Apache License Version 2.0. diff --git a/snowplow-tracker/src/main/java/com/snowplowanalytics/snowplow/media/event/MediaAdClickEvent.kt b/snowplow-tracker/src/main/java/com/snowplowanalytics/snowplow/media/event/MediaAdClickEvent.kt index a0e44bc1a..b809a9775 100644 --- a/snowplow-tracker/src/main/java/com/snowplowanalytics/snowplow/media/event/MediaAdClickEvent.kt +++ b/snowplow-tracker/src/main/java/com/snowplowanalytics/snowplow/media/event/MediaAdClickEvent.kt @@ -1,5 +1,5 @@ /* - * Copyright (c) 2015-2023 Snowplow Analytics Ltd. All rights reserved. + * Copyright (c) 2015-present Snowplow Analytics Ltd. All rights reserved. * * This program is licensed to you under the Apache License Version 2.0, * and you may not use this file except in compliance with the Apache License Version 2.0. diff --git a/snowplow-tracker/src/main/java/com/snowplowanalytics/snowplow/media/event/MediaAdCompleteEvent.kt b/snowplow-tracker/src/main/java/com/snowplowanalytics/snowplow/media/event/MediaAdCompleteEvent.kt index ce7a37e49..82e999308 100644 --- a/snowplow-tracker/src/main/java/com/snowplowanalytics/snowplow/media/event/MediaAdCompleteEvent.kt +++ b/snowplow-tracker/src/main/java/com/snowplowanalytics/snowplow/media/event/MediaAdCompleteEvent.kt @@ -1,5 +1,5 @@ /* - * Copyright (c) 2015-2023 Snowplow Analytics Ltd. All rights reserved. + * Copyright (c) 2015-present Snowplow Analytics Ltd. All rights reserved. * * This program is licensed to you under the Apache License Version 2.0, * and you may not use this file except in compliance with the Apache License Version 2.0. diff --git a/snowplow-tracker/src/main/java/com/snowplowanalytics/snowplow/media/event/MediaAdFirstQuartileEvent.kt b/snowplow-tracker/src/main/java/com/snowplowanalytics/snowplow/media/event/MediaAdFirstQuartileEvent.kt index 63b1806bf..17a5d2e6a 100644 --- a/snowplow-tracker/src/main/java/com/snowplowanalytics/snowplow/media/event/MediaAdFirstQuartileEvent.kt +++ b/snowplow-tracker/src/main/java/com/snowplowanalytics/snowplow/media/event/MediaAdFirstQuartileEvent.kt @@ -1,5 +1,5 @@ /* - * Copyright (c) 2015-2023 Snowplow Analytics Ltd. All rights reserved. + * Copyright (c) 2015-present Snowplow Analytics Ltd. All rights reserved. * * This program is licensed to you under the Apache License Version 2.0, * and you may not use this file except in compliance with the Apache License Version 2.0. diff --git a/snowplow-tracker/src/main/java/com/snowplowanalytics/snowplow/media/event/MediaAdMidpointEvent.kt b/snowplow-tracker/src/main/java/com/snowplowanalytics/snowplow/media/event/MediaAdMidpointEvent.kt index c49653833..d3677a880 100644 --- a/snowplow-tracker/src/main/java/com/snowplowanalytics/snowplow/media/event/MediaAdMidpointEvent.kt +++ b/snowplow-tracker/src/main/java/com/snowplowanalytics/snowplow/media/event/MediaAdMidpointEvent.kt @@ -1,5 +1,5 @@ /* - * Copyright (c) 2015-2023 Snowplow Analytics Ltd. All rights reserved. + * Copyright (c) 2015-present Snowplow Analytics Ltd. All rights reserved. * * This program is licensed to you under the Apache License Version 2.0, * and you may not use this file except in compliance with the Apache License Version 2.0. diff --git a/snowplow-tracker/src/main/java/com/snowplowanalytics/snowplow/media/event/MediaAdPauseEvent.kt b/snowplow-tracker/src/main/java/com/snowplowanalytics/snowplow/media/event/MediaAdPauseEvent.kt index 47ffea7ef..6d76cb586 100644 --- a/snowplow-tracker/src/main/java/com/snowplowanalytics/snowplow/media/event/MediaAdPauseEvent.kt +++ b/snowplow-tracker/src/main/java/com/snowplowanalytics/snowplow/media/event/MediaAdPauseEvent.kt @@ -1,5 +1,5 @@ /* - * Copyright (c) 2015-2023 Snowplow Analytics Ltd. All rights reserved. + * Copyright (c) 2015-present Snowplow Analytics Ltd. All rights reserved. * * This program is licensed to you under the Apache License Version 2.0, * and you may not use this file except in compliance with the Apache License Version 2.0. diff --git a/snowplow-tracker/src/main/java/com/snowplowanalytics/snowplow/media/event/MediaAdResumeEvent.kt b/snowplow-tracker/src/main/java/com/snowplowanalytics/snowplow/media/event/MediaAdResumeEvent.kt index d7292dbd7..6e0c3b5b9 100644 --- a/snowplow-tracker/src/main/java/com/snowplowanalytics/snowplow/media/event/MediaAdResumeEvent.kt +++ b/snowplow-tracker/src/main/java/com/snowplowanalytics/snowplow/media/event/MediaAdResumeEvent.kt @@ -1,5 +1,5 @@ /* - * Copyright (c) 2015-2023 Snowplow Analytics Ltd. All rights reserved. + * Copyright (c) 2015-present Snowplow Analytics Ltd. All rights reserved. * * This program is licensed to you under the Apache License Version 2.0, * and you may not use this file except in compliance with the Apache License Version 2.0. diff --git a/snowplow-tracker/src/main/java/com/snowplowanalytics/snowplow/media/event/MediaAdSkipEvent.kt b/snowplow-tracker/src/main/java/com/snowplowanalytics/snowplow/media/event/MediaAdSkipEvent.kt index 22be036bc..46e072244 100644 --- a/snowplow-tracker/src/main/java/com/snowplowanalytics/snowplow/media/event/MediaAdSkipEvent.kt +++ b/snowplow-tracker/src/main/java/com/snowplowanalytics/snowplow/media/event/MediaAdSkipEvent.kt @@ -1,5 +1,5 @@ /* - * Copyright (c) 2015-2023 Snowplow Analytics Ltd. All rights reserved. + * Copyright (c) 2015-present Snowplow Analytics Ltd. All rights reserved. * * This program is licensed to you under the Apache License Version 2.0, * and you may not use this file except in compliance with the Apache License Version 2.0. diff --git a/snowplow-tracker/src/main/java/com/snowplowanalytics/snowplow/media/event/MediaAdStartEvent.kt b/snowplow-tracker/src/main/java/com/snowplowanalytics/snowplow/media/event/MediaAdStartEvent.kt index 51f0c105d..9de4be2df 100644 --- a/snowplow-tracker/src/main/java/com/snowplowanalytics/snowplow/media/event/MediaAdStartEvent.kt +++ b/snowplow-tracker/src/main/java/com/snowplowanalytics/snowplow/media/event/MediaAdStartEvent.kt @@ -1,5 +1,5 @@ /* - * Copyright (c) 2015-2023 Snowplow Analytics Ltd. All rights reserved. + * Copyright (c) 2015-present Snowplow Analytics Ltd. All rights reserved. * * This program is licensed to you under the Apache License Version 2.0, * and you may not use this file except in compliance with the Apache License Version 2.0. diff --git a/snowplow-tracker/src/main/java/com/snowplowanalytics/snowplow/media/event/MediaAdThirdQuartileEvent.kt b/snowplow-tracker/src/main/java/com/snowplowanalytics/snowplow/media/event/MediaAdThirdQuartileEvent.kt index 8885ad323..b863b03c9 100644 --- a/snowplow-tracker/src/main/java/com/snowplowanalytics/snowplow/media/event/MediaAdThirdQuartileEvent.kt +++ b/snowplow-tracker/src/main/java/com/snowplowanalytics/snowplow/media/event/MediaAdThirdQuartileEvent.kt @@ -1,5 +1,5 @@ /* - * Copyright (c) 2015-2023 Snowplow Analytics Ltd. All rights reserved. + * Copyright (c) 2015-present Snowplow Analytics Ltd. All rights reserved. * * This program is licensed to you under the Apache License Version 2.0, * and you may not use this file except in compliance with the Apache License Version 2.0. diff --git a/snowplow-tracker/src/main/java/com/snowplowanalytics/snowplow/media/event/MediaBufferEndEvent.kt b/snowplow-tracker/src/main/java/com/snowplowanalytics/snowplow/media/event/MediaBufferEndEvent.kt index df7aff59d..cea1c7c02 100644 --- a/snowplow-tracker/src/main/java/com/snowplowanalytics/snowplow/media/event/MediaBufferEndEvent.kt +++ b/snowplow-tracker/src/main/java/com/snowplowanalytics/snowplow/media/event/MediaBufferEndEvent.kt @@ -1,5 +1,5 @@ /* - * Copyright (c) 2015-2023 Snowplow Analytics Ltd. All rights reserved. + * Copyright (c) 2015-present Snowplow Analytics Ltd. All rights reserved. * * This program is licensed to you under the Apache License Version 2.0, * and you may not use this file except in compliance with the Apache License Version 2.0. diff --git a/snowplow-tracker/src/main/java/com/snowplowanalytics/snowplow/media/event/MediaBufferStartEvent.kt b/snowplow-tracker/src/main/java/com/snowplowanalytics/snowplow/media/event/MediaBufferStartEvent.kt index 92e8f4ab4..8d46498cb 100644 --- a/snowplow-tracker/src/main/java/com/snowplowanalytics/snowplow/media/event/MediaBufferStartEvent.kt +++ b/snowplow-tracker/src/main/java/com/snowplowanalytics/snowplow/media/event/MediaBufferStartEvent.kt @@ -1,5 +1,5 @@ /* - * Copyright (c) 2015-2023 Snowplow Analytics Ltd. All rights reserved. + * Copyright (c) 2015-present Snowplow Analytics Ltd. All rights reserved. * * This program is licensed to you under the Apache License Version 2.0, * and you may not use this file except in compliance with the Apache License Version 2.0. diff --git a/snowplow-tracker/src/main/java/com/snowplowanalytics/snowplow/media/event/MediaEndEvent.kt b/snowplow-tracker/src/main/java/com/snowplowanalytics/snowplow/media/event/MediaEndEvent.kt index 2cd848da1..86d5f10b0 100644 --- a/snowplow-tracker/src/main/java/com/snowplowanalytics/snowplow/media/event/MediaEndEvent.kt +++ b/snowplow-tracker/src/main/java/com/snowplowanalytics/snowplow/media/event/MediaEndEvent.kt @@ -1,5 +1,5 @@ /* - * Copyright (c) 2015-2023 Snowplow Analytics Ltd. All rights reserved. + * Copyright (c) 2015-present Snowplow Analytics Ltd. All rights reserved. * * This program is licensed to you under the Apache License Version 2.0, * and you may not use this file except in compliance with the Apache License Version 2.0. diff --git a/snowplow-tracker/src/main/java/com/snowplowanalytics/snowplow/media/event/MediaErrorEvent.kt b/snowplow-tracker/src/main/java/com/snowplowanalytics/snowplow/media/event/MediaErrorEvent.kt index f36f66330..919731aa6 100644 --- a/snowplow-tracker/src/main/java/com/snowplowanalytics/snowplow/media/event/MediaErrorEvent.kt +++ b/snowplow-tracker/src/main/java/com/snowplowanalytics/snowplow/media/event/MediaErrorEvent.kt @@ -1,5 +1,5 @@ /* - * Copyright (c) 2015-2023 Snowplow Analytics Ltd. All rights reserved. + * Copyright (c) 2015-present Snowplow Analytics Ltd. All rights reserved. * * This program is licensed to you under the Apache License Version 2.0, * and you may not use this file except in compliance with the Apache License Version 2.0. diff --git a/snowplow-tracker/src/main/java/com/snowplowanalytics/snowplow/media/event/MediaFullscreenChangeEvent.kt b/snowplow-tracker/src/main/java/com/snowplowanalytics/snowplow/media/event/MediaFullscreenChangeEvent.kt index d3b905dda..9233cfab4 100644 --- a/snowplow-tracker/src/main/java/com/snowplowanalytics/snowplow/media/event/MediaFullscreenChangeEvent.kt +++ b/snowplow-tracker/src/main/java/com/snowplowanalytics/snowplow/media/event/MediaFullscreenChangeEvent.kt @@ -1,5 +1,5 @@ /* - * Copyright (c) 2015-2023 Snowplow Analytics Ltd. All rights reserved. + * Copyright (c) 2015-present Snowplow Analytics Ltd. All rights reserved. * * This program is licensed to you under the Apache License Version 2.0, * and you may not use this file except in compliance with the Apache License Version 2.0. diff --git a/snowplow-tracker/src/main/java/com/snowplowanalytics/snowplow/media/event/MediaPauseEvent.kt b/snowplow-tracker/src/main/java/com/snowplowanalytics/snowplow/media/event/MediaPauseEvent.kt index 34180f376..5c5ab8c98 100644 --- a/snowplow-tracker/src/main/java/com/snowplowanalytics/snowplow/media/event/MediaPauseEvent.kt +++ b/snowplow-tracker/src/main/java/com/snowplowanalytics/snowplow/media/event/MediaPauseEvent.kt @@ -1,5 +1,5 @@ /* - * Copyright (c) 2015-2023 Snowplow Analytics Ltd. All rights reserved. + * Copyright (c) 2015-present Snowplow Analytics Ltd. All rights reserved. * * This program is licensed to you under the Apache License Version 2.0, * and you may not use this file except in compliance with the Apache License Version 2.0. diff --git a/snowplow-tracker/src/main/java/com/snowplowanalytics/snowplow/media/event/MediaPictureInPictureChangeEvent.kt b/snowplow-tracker/src/main/java/com/snowplowanalytics/snowplow/media/event/MediaPictureInPictureChangeEvent.kt index 32f3c2c5c..4215e28d1 100644 --- a/snowplow-tracker/src/main/java/com/snowplowanalytics/snowplow/media/event/MediaPictureInPictureChangeEvent.kt +++ b/snowplow-tracker/src/main/java/com/snowplowanalytics/snowplow/media/event/MediaPictureInPictureChangeEvent.kt @@ -1,5 +1,5 @@ /* - * Copyright (c) 2015-2023 Snowplow Analytics Ltd. All rights reserved. + * Copyright (c) 2015-present Snowplow Analytics Ltd. All rights reserved. * * This program is licensed to you under the Apache License Version 2.0, * and you may not use this file except in compliance with the Apache License Version 2.0. diff --git a/snowplow-tracker/src/main/java/com/snowplowanalytics/snowplow/media/event/MediaPlayEvent.kt b/snowplow-tracker/src/main/java/com/snowplowanalytics/snowplow/media/event/MediaPlayEvent.kt index 657900395..9b3172e98 100644 --- a/snowplow-tracker/src/main/java/com/snowplowanalytics/snowplow/media/event/MediaPlayEvent.kt +++ b/snowplow-tracker/src/main/java/com/snowplowanalytics/snowplow/media/event/MediaPlayEvent.kt @@ -1,5 +1,5 @@ /* - * Copyright (c) 2015-2023 Snowplow Analytics Ltd. All rights reserved. + * Copyright (c) 2015-present Snowplow Analytics Ltd. All rights reserved. * * This program is licensed to you under the Apache License Version 2.0, * and you may not use this file except in compliance with the Apache License Version 2.0. diff --git a/snowplow-tracker/src/main/java/com/snowplowanalytics/snowplow/media/event/MediaPlaybackRateChangeEvent.kt b/snowplow-tracker/src/main/java/com/snowplowanalytics/snowplow/media/event/MediaPlaybackRateChangeEvent.kt index b90a53df7..9c17b681c 100644 --- a/snowplow-tracker/src/main/java/com/snowplowanalytics/snowplow/media/event/MediaPlaybackRateChangeEvent.kt +++ b/snowplow-tracker/src/main/java/com/snowplowanalytics/snowplow/media/event/MediaPlaybackRateChangeEvent.kt @@ -1,5 +1,5 @@ /* - * Copyright (c) 2015-2023 Snowplow Analytics Ltd. All rights reserved. + * Copyright (c) 2015-present Snowplow Analytics Ltd. All rights reserved. * * This program is licensed to you under the Apache License Version 2.0, * and you may not use this file except in compliance with the Apache License Version 2.0. diff --git a/snowplow-tracker/src/main/java/com/snowplowanalytics/snowplow/media/event/MediaQualityChangeEvent.kt b/snowplow-tracker/src/main/java/com/snowplowanalytics/snowplow/media/event/MediaQualityChangeEvent.kt index 27842c62f..5c8351507 100644 --- a/snowplow-tracker/src/main/java/com/snowplowanalytics/snowplow/media/event/MediaQualityChangeEvent.kt +++ b/snowplow-tracker/src/main/java/com/snowplowanalytics/snowplow/media/event/MediaQualityChangeEvent.kt @@ -1,5 +1,5 @@ /* - * Copyright (c) 2015-2023 Snowplow Analytics Ltd. All rights reserved. + * Copyright (c) 2015-present Snowplow Analytics Ltd. All rights reserved. * * This program is licensed to you under the Apache License Version 2.0, * and you may not use this file except in compliance with the Apache License Version 2.0. diff --git a/snowplow-tracker/src/main/java/com/snowplowanalytics/snowplow/media/event/MediaReadyEvent.kt b/snowplow-tracker/src/main/java/com/snowplowanalytics/snowplow/media/event/MediaReadyEvent.kt index b72e030df..9f9e2a252 100644 --- a/snowplow-tracker/src/main/java/com/snowplowanalytics/snowplow/media/event/MediaReadyEvent.kt +++ b/snowplow-tracker/src/main/java/com/snowplowanalytics/snowplow/media/event/MediaReadyEvent.kt @@ -1,5 +1,5 @@ /* - * Copyright (c) 2015-2023 Snowplow Analytics Ltd. All rights reserved. + * Copyright (c) 2015-present Snowplow Analytics Ltd. All rights reserved. * * This program is licensed to you under the Apache License Version 2.0, * and you may not use this file except in compliance with the Apache License Version 2.0. diff --git a/snowplow-tracker/src/main/java/com/snowplowanalytics/snowplow/media/event/MediaSeekEndEvent.kt b/snowplow-tracker/src/main/java/com/snowplowanalytics/snowplow/media/event/MediaSeekEndEvent.kt index 69719e067..10b84fda3 100644 --- a/snowplow-tracker/src/main/java/com/snowplowanalytics/snowplow/media/event/MediaSeekEndEvent.kt +++ b/snowplow-tracker/src/main/java/com/snowplowanalytics/snowplow/media/event/MediaSeekEndEvent.kt @@ -1,5 +1,5 @@ /* - * Copyright (c) 2015-2023 Snowplow Analytics Ltd. All rights reserved. + * Copyright (c) 2015-present Snowplow Analytics Ltd. All rights reserved. * * This program is licensed to you under the Apache License Version 2.0, * and you may not use this file except in compliance with the Apache License Version 2.0. diff --git a/snowplow-tracker/src/main/java/com/snowplowanalytics/snowplow/media/event/MediaSeekStartEvent.kt b/snowplow-tracker/src/main/java/com/snowplowanalytics/snowplow/media/event/MediaSeekStartEvent.kt index 9b96f81bf..46272034c 100644 --- a/snowplow-tracker/src/main/java/com/snowplowanalytics/snowplow/media/event/MediaSeekStartEvent.kt +++ b/snowplow-tracker/src/main/java/com/snowplowanalytics/snowplow/media/event/MediaSeekStartEvent.kt @@ -1,5 +1,5 @@ /* - * Copyright (c) 2015-2023 Snowplow Analytics Ltd. All rights reserved. + * Copyright (c) 2015-present Snowplow Analytics Ltd. All rights reserved. * * This program is licensed to you under the Apache License Version 2.0, * and you may not use this file except in compliance with the Apache License Version 2.0. diff --git a/snowplow-tracker/src/main/java/com/snowplowanalytics/snowplow/media/event/MediaVolumeChangeEvent.kt b/snowplow-tracker/src/main/java/com/snowplowanalytics/snowplow/media/event/MediaVolumeChangeEvent.kt index a08c9586f..daa7149f3 100644 --- a/snowplow-tracker/src/main/java/com/snowplowanalytics/snowplow/media/event/MediaVolumeChangeEvent.kt +++ b/snowplow-tracker/src/main/java/com/snowplowanalytics/snowplow/media/event/MediaVolumeChangeEvent.kt @@ -1,5 +1,5 @@ /* - * Copyright (c) 2015-2023 Snowplow Analytics Ltd. All rights reserved. + * Copyright (c) 2015-present Snowplow Analytics Ltd. All rights reserved. * * This program is licensed to you under the Apache License Version 2.0, * and you may not use this file except in compliance with the Apache License Version 2.0. diff --git a/snowplow-tracker/src/main/java/com/snowplowanalytics/snowplow/network/CollectorCookie.kt b/snowplow-tracker/src/main/java/com/snowplowanalytics/snowplow/network/CollectorCookie.kt index 653677425..ba69164f4 100644 --- a/snowplow-tracker/src/main/java/com/snowplowanalytics/snowplow/network/CollectorCookie.kt +++ b/snowplow-tracker/src/main/java/com/snowplowanalytics/snowplow/network/CollectorCookie.kt @@ -1,5 +1,5 @@ /* - * Copyright (c) 2015-2023 Snowplow Analytics Ltd. All rights reserved. + * Copyright (c) 2015-present Snowplow Analytics Ltd. All rights reserved. * * This program is licensed to you under the Apache License Version 2.0, * and you may not use this file except in compliance with the Apache License Version 2.0. diff --git a/snowplow-tracker/src/main/java/com/snowplowanalytics/snowplow/network/CollectorCookieJar.kt b/snowplow-tracker/src/main/java/com/snowplowanalytics/snowplow/network/CollectorCookieJar.kt index 93b4a9caf..6a871dd6e 100644 --- a/snowplow-tracker/src/main/java/com/snowplowanalytics/snowplow/network/CollectorCookieJar.kt +++ b/snowplow-tracker/src/main/java/com/snowplowanalytics/snowplow/network/CollectorCookieJar.kt @@ -1,5 +1,5 @@ /* - * Copyright (c) 2015-2023 Snowplow Analytics Ltd. All rights reserved. + * Copyright (c) 2015-present Snowplow Analytics Ltd. All rights reserved. * * This program is licensed to you under the Apache License Version 2.0, * and you may not use this file except in compliance with the Apache License Version 2.0. diff --git a/snowplow-tracker/src/main/java/com/snowplowanalytics/snowplow/network/HttpMethod.kt b/snowplow-tracker/src/main/java/com/snowplowanalytics/snowplow/network/HttpMethod.kt index ee6b361e0..369150b04 100755 --- a/snowplow-tracker/src/main/java/com/snowplowanalytics/snowplow/network/HttpMethod.kt +++ b/snowplow-tracker/src/main/java/com/snowplowanalytics/snowplow/network/HttpMethod.kt @@ -1,5 +1,5 @@ /* - * Copyright (c) 2015-2023 Snowplow Analytics Ltd. All rights reserved. + * Copyright (c) 2015-present Snowplow Analytics Ltd. All rights reserved. * * This program is licensed to you under the Apache License Version 2.0, * and you may not use this file except in compliance with the Apache License Version 2.0. diff --git a/snowplow-tracker/src/main/java/com/snowplowanalytics/snowplow/network/NetworkConnection.kt b/snowplow-tracker/src/main/java/com/snowplowanalytics/snowplow/network/NetworkConnection.kt index ed23093d5..65c8b92b4 100644 --- a/snowplow-tracker/src/main/java/com/snowplowanalytics/snowplow/network/NetworkConnection.kt +++ b/snowplow-tracker/src/main/java/com/snowplowanalytics/snowplow/network/NetworkConnection.kt @@ -1,5 +1,5 @@ /* - * Copyright (c) 2015-2023 Snowplow Analytics Ltd. All rights reserved. + * Copyright (c) 2015-present Snowplow Analytics Ltd. All rights reserved. * * This program is licensed to you under the Apache License Version 2.0, * and you may not use this file except in compliance with the Apache License Version 2.0. diff --git a/snowplow-tracker/src/main/java/com/snowplowanalytics/snowplow/network/OkHttpNetworkConnection.kt b/snowplow-tracker/src/main/java/com/snowplowanalytics/snowplow/network/OkHttpNetworkConnection.kt index 893e78e9f..4b5631300 100644 --- a/snowplow-tracker/src/main/java/com/snowplowanalytics/snowplow/network/OkHttpNetworkConnection.kt +++ b/snowplow-tracker/src/main/java/com/snowplowanalytics/snowplow/network/OkHttpNetworkConnection.kt @@ -1,5 +1,5 @@ /* - * Copyright (c) 2015-2023 Snowplow Analytics Ltd. All rights reserved. + * Copyright (c) 2015-present Snowplow Analytics Ltd. All rights reserved. * * This program is licensed to you under the Apache License Version 2.0, * and you may not use this file except in compliance with the Apache License Version 2.0. diff --git a/snowplow-tracker/src/main/java/com/snowplowanalytics/snowplow/network/Protocol.kt b/snowplow-tracker/src/main/java/com/snowplowanalytics/snowplow/network/Protocol.kt index 502b09bfe..015de6334 100755 --- a/snowplow-tracker/src/main/java/com/snowplowanalytics/snowplow/network/Protocol.kt +++ b/snowplow-tracker/src/main/java/com/snowplowanalytics/snowplow/network/Protocol.kt @@ -1,5 +1,5 @@ /* - * Copyright (c) 2015-2023 Snowplow Analytics Ltd. All rights reserved. + * Copyright (c) 2015-present Snowplow Analytics Ltd. All rights reserved. * * This program is licensed to you under the Apache License Version 2.0, * and you may not use this file except in compliance with the Apache License Version 2.0. diff --git a/snowplow-tracker/src/main/java/com/snowplowanalytics/snowplow/network/Request.kt b/snowplow-tracker/src/main/java/com/snowplowanalytics/snowplow/network/Request.kt index 7355b93d5..175ec1586 100644 --- a/snowplow-tracker/src/main/java/com/snowplowanalytics/snowplow/network/Request.kt +++ b/snowplow-tracker/src/main/java/com/snowplowanalytics/snowplow/network/Request.kt @@ -1,5 +1,5 @@ /* - * Copyright (c) 2015-2023 Snowplow Analytics Ltd. All rights reserved. + * Copyright (c) 2015-present Snowplow Analytics Ltd. All rights reserved. * * This program is licensed to you under the Apache License Version 2.0, * and you may not use this file except in compliance with the Apache License Version 2.0. diff --git a/snowplow-tracker/src/main/java/com/snowplowanalytics/snowplow/network/RequestCallback.kt b/snowplow-tracker/src/main/java/com/snowplowanalytics/snowplow/network/RequestCallback.kt index f647ccb8f..c46135bb7 100755 --- a/snowplow-tracker/src/main/java/com/snowplowanalytics/snowplow/network/RequestCallback.kt +++ b/snowplow-tracker/src/main/java/com/snowplowanalytics/snowplow/network/RequestCallback.kt @@ -1,5 +1,5 @@ /* - * Copyright (c) 2015-2023 Snowplow Analytics Ltd. All rights reserved. + * Copyright (c) 2015-present Snowplow Analytics Ltd. All rights reserved. * * This program is licensed to you under the Apache License Version 2.0, * and you may not use this file except in compliance with the Apache License Version 2.0. diff --git a/snowplow-tracker/src/main/java/com/snowplowanalytics/snowplow/network/RequestResult.kt b/snowplow-tracker/src/main/java/com/snowplowanalytics/snowplow/network/RequestResult.kt index 5be0508a0..966a8998e 100755 --- a/snowplow-tracker/src/main/java/com/snowplowanalytics/snowplow/network/RequestResult.kt +++ b/snowplow-tracker/src/main/java/com/snowplowanalytics/snowplow/network/RequestResult.kt @@ -1,5 +1,5 @@ /* - * Copyright (c) 2015-2023 Snowplow Analytics Ltd. All rights reserved. + * Copyright (c) 2015-present Snowplow Analytics Ltd. All rights reserved. * * This program is licensed to you under the Apache License Version 2.0, * and you may not use this file except in compliance with the Apache License Version 2.0. diff --git a/snowplow-tracker/src/main/java/com/snowplowanalytics/snowplow/payload/Payload.kt b/snowplow-tracker/src/main/java/com/snowplowanalytics/snowplow/payload/Payload.kt index 1d1f4af70..2cb2cfe93 100755 --- a/snowplow-tracker/src/main/java/com/snowplowanalytics/snowplow/payload/Payload.kt +++ b/snowplow-tracker/src/main/java/com/snowplowanalytics/snowplow/payload/Payload.kt @@ -1,5 +1,5 @@ /* - * Copyright (c) 2015-2023 Snowplow Analytics Ltd. All rights reserved. + * Copyright (c) 2015-present Snowplow Analytics Ltd. All rights reserved. * * This program is licensed to you under the Apache License Version 2.0, * and you may not use this file except in compliance with the Apache License Version 2.0. diff --git a/snowplow-tracker/src/main/java/com/snowplowanalytics/snowplow/payload/SelfDescribingJson.kt b/snowplow-tracker/src/main/java/com/snowplowanalytics/snowplow/payload/SelfDescribingJson.kt index 7ccf8ea17..1e569a4c9 100755 --- a/snowplow-tracker/src/main/java/com/snowplowanalytics/snowplow/payload/SelfDescribingJson.kt +++ b/snowplow-tracker/src/main/java/com/snowplowanalytics/snowplow/payload/SelfDescribingJson.kt @@ -1,5 +1,5 @@ /* - * Copyright (c) 2015-2023 Snowplow Analytics Ltd. All rights reserved. + * Copyright (c) 2015-present Snowplow Analytics Ltd. All rights reserved. * * This program is licensed to you under the Apache License Version 2.0, * and you may not use this file except in compliance with the Apache License Version 2.0. diff --git a/snowplow-tracker/src/main/java/com/snowplowanalytics/snowplow/payload/TrackerPayload.kt b/snowplow-tracker/src/main/java/com/snowplowanalytics/snowplow/payload/TrackerPayload.kt index 0088e2cbd..8b745d3fb 100755 --- a/snowplow-tracker/src/main/java/com/snowplowanalytics/snowplow/payload/TrackerPayload.kt +++ b/snowplow-tracker/src/main/java/com/snowplowanalytics/snowplow/payload/TrackerPayload.kt @@ -1,5 +1,5 @@ /* - * Copyright (c) 2015-2023 Snowplow Analytics Ltd. All rights reserved. + * Copyright (c) 2015-present Snowplow Analytics Ltd. All rights reserved. * * This program is licensed to you under the Apache License Version 2.0, * and you may not use this file except in compliance with the Apache License Version 2.0. diff --git a/snowplow-tracker/src/main/java/com/snowplowanalytics/snowplow/tracker/CrossDeviceParameterConfiguration.kt b/snowplow-tracker/src/main/java/com/snowplowanalytics/snowplow/tracker/CrossDeviceParameterConfiguration.kt index de7df2866..7ae604214 100644 --- a/snowplow-tracker/src/main/java/com/snowplowanalytics/snowplow/tracker/CrossDeviceParameterConfiguration.kt +++ b/snowplow-tracker/src/main/java/com/snowplowanalytics/snowplow/tracker/CrossDeviceParameterConfiguration.kt @@ -1,5 +1,5 @@ /* - * Copyright (c) 2015-2023 Snowplow Analytics Ltd. All rights reserved. + * Copyright (c) 2015-present Snowplow Analytics Ltd. All rights reserved. * * This program is licensed to you under the Apache License Version 2.0, * and you may not use this file except in compliance with the Apache License Version 2.0. diff --git a/snowplow-tracker/src/main/java/com/snowplowanalytics/snowplow/tracker/DevicePlatform.kt b/snowplow-tracker/src/main/java/com/snowplowanalytics/snowplow/tracker/DevicePlatform.kt index 5ea1035f7..bef1ed73a 100755 --- a/snowplow-tracker/src/main/java/com/snowplowanalytics/snowplow/tracker/DevicePlatform.kt +++ b/snowplow-tracker/src/main/java/com/snowplowanalytics/snowplow/tracker/DevicePlatform.kt @@ -1,5 +1,5 @@ /* - * Copyright (c) 2015-2023 Snowplow Analytics Ltd. All rights reserved. + * Copyright (c) 2015-present Snowplow Analytics Ltd. All rights reserved. * * This program is licensed to you under the Apache License Version 2.0, * and you may not use this file except in compliance with the Apache License Version 2.0. diff --git a/snowplow-tracker/src/main/java/com/snowplowanalytics/snowplow/tracker/InspectableEvent.kt b/snowplow-tracker/src/main/java/com/snowplowanalytics/snowplow/tracker/InspectableEvent.kt index 3c8212756..906a2067d 100644 --- a/snowplow-tracker/src/main/java/com/snowplowanalytics/snowplow/tracker/InspectableEvent.kt +++ b/snowplow-tracker/src/main/java/com/snowplowanalytics/snowplow/tracker/InspectableEvent.kt @@ -1,5 +1,5 @@ /* - * Copyright (c) 2015-2023 Snowplow Analytics Ltd. All rights reserved. + * Copyright (c) 2015-present Snowplow Analytics Ltd. All rights reserved. * * This program is licensed to you under the Apache License Version 2.0, * and you may not use this file except in compliance with the Apache License Version 2.0. diff --git a/snowplow-tracker/src/main/java/com/snowplowanalytics/snowplow/tracker/LogLevel.kt b/snowplow-tracker/src/main/java/com/snowplowanalytics/snowplow/tracker/LogLevel.kt index b5ac658dd..cc160cbf8 100644 --- a/snowplow-tracker/src/main/java/com/snowplowanalytics/snowplow/tracker/LogLevel.kt +++ b/snowplow-tracker/src/main/java/com/snowplowanalytics/snowplow/tracker/LogLevel.kt @@ -1,5 +1,5 @@ /* - * Copyright (c) 2015-2023 Snowplow Analytics Ltd. All rights reserved. + * Copyright (c) 2015-present Snowplow Analytics Ltd. All rights reserved. * * This program is licensed to you under the Apache License Version 2.0, * and you may not use this file except in compliance with the Apache License Version 2.0. diff --git a/snowplow-tracker/src/main/java/com/snowplowanalytics/snowplow/tracker/LoggerDelegate.kt b/snowplow-tracker/src/main/java/com/snowplowanalytics/snowplow/tracker/LoggerDelegate.kt index 0fc6983a9..e980d3a1e 100644 --- a/snowplow-tracker/src/main/java/com/snowplowanalytics/snowplow/tracker/LoggerDelegate.kt +++ b/snowplow-tracker/src/main/java/com/snowplowanalytics/snowplow/tracker/LoggerDelegate.kt @@ -1,5 +1,5 @@ /* - * Copyright (c) 2015-2023 Snowplow Analytics Ltd. All rights reserved. + * Copyright (c) 2015-present Snowplow Analytics Ltd. All rights reserved. * * This program is licensed to you under the Apache License Version 2.0, * and you may not use this file except in compliance with the Apache License Version 2.0. diff --git a/snowplow-tracker/src/main/java/com/snowplowanalytics/snowplow/tracker/SessionState.kt b/snowplow-tracker/src/main/java/com/snowplowanalytics/snowplow/tracker/SessionState.kt index c15b3ff5b..9ee25bca5 100644 --- a/snowplow-tracker/src/main/java/com/snowplowanalytics/snowplow/tracker/SessionState.kt +++ b/snowplow-tracker/src/main/java/com/snowplowanalytics/snowplow/tracker/SessionState.kt @@ -1,5 +1,5 @@ /* - * Copyright (c) 2015-2023 Snowplow Analytics Ltd. All rights reserved. + * Copyright (c) 2015-present Snowplow Analytics Ltd. All rights reserved. * * This program is licensed to you under the Apache License Version 2.0, * and you may not use this file except in compliance with the Apache License Version 2.0. diff --git a/snowplow-tracker/src/main/java/com/snowplowanalytics/snowplow/util/Basis.kt b/snowplow-tracker/src/main/java/com/snowplowanalytics/snowplow/util/Basis.kt index 6208a21a1..b22651602 100644 --- a/snowplow-tracker/src/main/java/com/snowplowanalytics/snowplow/util/Basis.kt +++ b/snowplow-tracker/src/main/java/com/snowplowanalytics/snowplow/util/Basis.kt @@ -1,5 +1,5 @@ /* - * Copyright (c) 2015-2023 Snowplow Analytics Ltd. All rights reserved. + * Copyright (c) 2015-present Snowplow Analytics Ltd. All rights reserved. * * This program is licensed to you under the Apache License Version 2.0, * and you may not use this file except in compliance with the Apache License Version 2.0. diff --git a/snowplow-tracker/src/main/java/com/snowplowanalytics/snowplow/util/Size.kt b/snowplow-tracker/src/main/java/com/snowplowanalytics/snowplow/util/Size.kt index aaa748fd7..00eedf621 100644 --- a/snowplow-tracker/src/main/java/com/snowplowanalytics/snowplow/util/Size.kt +++ b/snowplow-tracker/src/main/java/com/snowplowanalytics/snowplow/util/Size.kt @@ -1,5 +1,5 @@ /* - * Copyright (c) 2015-2023 Snowplow Analytics Ltd. All rights reserved. + * Copyright (c) 2015-present Snowplow Analytics Ltd. All rights reserved. * * This program is licensed to you under the Apache License Version 2.0, * and you may not use this file except in compliance with the Apache License Version 2.0. diff --git a/snowplow-tracker/src/main/java/com/snowplowanalytics/snowplow/util/TimeMeasure.kt b/snowplow-tracker/src/main/java/com/snowplowanalytics/snowplow/util/TimeMeasure.kt index 9d59cdb18..68502bb08 100644 --- a/snowplow-tracker/src/main/java/com/snowplowanalytics/snowplow/util/TimeMeasure.kt +++ b/snowplow-tracker/src/main/java/com/snowplowanalytics/snowplow/util/TimeMeasure.kt @@ -1,5 +1,5 @@ /* - * Copyright (c) 2015-2023 Snowplow Analytics Ltd. All rights reserved. + * Copyright (c) 2015-present Snowplow Analytics Ltd. All rights reserved. * * This program is licensed to you under the Apache License Version 2.0, * and you may not use this file except in compliance with the Apache License Version 2.0. From 9e5a3b90cb81dcdaa98b404f1a0544d9cf3d27b5 Mon Sep 17 00:00:00 2001 From: Matus Tomlein Date: Thu, 1 Feb 2024 09:10:59 +0100 Subject: [PATCH 20/21] Enable lifecycle autotracking by default (close #651) PR #670 --- .../snowplowanalytics/snowplowdemocompose/data/Tracking.kt | 4 ++-- .../snowplow/internal/tracker/StateManagerTest.kt | 2 ++ .../snowplow/internal/tracker/TrackerTest.kt | 1 + .../core/tracker/TrackerConfigurationInterface.kt | 3 ++- .../com/snowplowanalytics/core/tracker/TrackerDefaults.kt | 3 +-- .../snowplow/configuration/TrackerConfiguration.kt | 7 ++++--- 6 files changed, 12 insertions(+), 8 deletions(-) diff --git a/snowplow-demo-compose/src/main/java/com/snowplowanalytics/snowplowdemocompose/data/Tracking.kt b/snowplow-demo-compose/src/main/java/com/snowplowanalytics/snowplowdemocompose/data/Tracking.kt index e155c5ac8..da8dd4b1e 100644 --- a/snowplow-demo-compose/src/main/java/com/snowplowanalytics/snowplowdemocompose/data/Tracking.kt +++ b/snowplow-demo-compose/src/main/java/com/snowplowanalytics/snowplowdemocompose/data/Tracking.kt @@ -24,7 +24,6 @@ object Tracking { val trackerConfig = TrackerConfiguration("appID") .logLevel(LogLevel.DEBUG) .screenViewAutotracking(false) - .lifecycleAutotracking(true) val emitterConfig = EmitterConfiguration().bufferOption(BufferOption.Single) return Snowplow.createTracker( @@ -48,7 +47,8 @@ object Tracking { entities: List? = null, ) { LaunchedEffect(Unit, block = { - val event = ScreenView(screenName).entities(entities) + val event = ScreenView(screenName) + entities?.let { event.entities(it) } Snowplow.defaultTracker?.track(event) }) } diff --git a/snowplow-tracker/src/androidTest/java/com/snowplowanalytics/snowplow/internal/tracker/StateManagerTest.kt b/snowplow-tracker/src/androidTest/java/com/snowplowanalytics/snowplow/internal/tracker/StateManagerTest.kt index 5211763d1..877bf61a2 100644 --- a/snowplow-tracker/src/androidTest/java/com/snowplowanalytics/snowplow/internal/tracker/StateManagerTest.kt +++ b/snowplow-tracker/src/androidTest/java/com/snowplowanalytics/snowplow/internal/tracker/StateManagerTest.kt @@ -125,6 +125,7 @@ class StateManagerTest { tracker.screenContext = true tracker.sessionContext = false tracker.platformContextEnabled = false + tracker.lifecycleAutotracking = false tracker.base64Encoded = false tracker.logLevel = LogLevel.VERBOSE } @@ -294,6 +295,7 @@ class StateManagerTest { tracker.base64Encoded = false tracker.sessionContext = false tracker.platformContextEnabled = false + tracker.lifecycleAutotracking = false } val tracker = Tracker(emitter, "namespace", "appId", context = context, builder = trackerBuilder) diff --git a/snowplow-tracker/src/androidTest/java/com/snowplowanalytics/snowplow/internal/tracker/TrackerTest.kt b/snowplow-tracker/src/androidTest/java/com/snowplowanalytics/snowplow/internal/tracker/TrackerTest.kt index 975681a77..53a3dbfe5 100755 --- a/snowplow-tracker/src/androidTest/java/com/snowplowanalytics/snowplow/internal/tracker/TrackerTest.kt +++ b/snowplow-tracker/src/androidTest/java/com/snowplowanalytics/snowplow/internal/tracker/TrackerTest.kt @@ -263,6 +263,7 @@ class TrackerTest { tracker.geoLocationContext = false tracker.installAutotracking = false tracker.screenViewAutotracking = false + tracker.lifecycleAutotracking = false } Companion.tracker = Tracker(emitter!!, namespace, "testTrackWithNoContext", context = context, builder = trackerBuilder) diff --git a/snowplow-tracker/src/main/java/com/snowplowanalytics/core/tracker/TrackerConfigurationInterface.kt b/snowplow-tracker/src/main/java/com/snowplowanalytics/core/tracker/TrackerConfigurationInterface.kt index 74772e35a..1fbbc9671 100644 --- a/snowplow-tracker/src/main/java/com/snowplowanalytics/core/tracker/TrackerConfigurationInterface.kt +++ b/snowplow-tracker/src/main/java/com/snowplowanalytics/core/tracker/TrackerConfigurationInterface.kt @@ -89,7 +89,8 @@ interface TrackerConfigurationInterface { /** * Whether enable automatic tracking of background and foreground transitions. - * @apiNote It needs the Foreground library installed. + * Enabled by default. + * @apiNote It needs the androidx.lifecycle-extensions library installed. */ var lifecycleAutotracking: Boolean diff --git a/snowplow-tracker/src/main/java/com/snowplowanalytics/core/tracker/TrackerDefaults.kt b/snowplow-tracker/src/main/java/com/snowplowanalytics/core/tracker/TrackerDefaults.kt index e16d43c4b..6926caeb8 100644 --- a/snowplow-tracker/src/main/java/com/snowplowanalytics/core/tracker/TrackerDefaults.kt +++ b/snowplow-tracker/src/main/java/com/snowplowanalytics/core/tracker/TrackerDefaults.kt @@ -22,7 +22,6 @@ object TrackerDefaults { var logLevel = LogLevel.OFF var foregroundTimeout: Long = 1800 // 30 minutes var backgroundTimeout: Long = 1800 // 30 minutes - var threadCount = 10 var timeUnit = TimeUnit.SECONDS var sessionContext = true var geoLocationContext = false @@ -32,7 +31,7 @@ object TrackerDefaults { var applicationContext = true var exceptionAutotracking = true var diagnosticAutotracking = false - var lifecycleAutotracking = false + var lifecycleAutotracking = true var screenViewAutotracking = true var screenEngagementAutotracking = true var installAutotracking = true diff --git a/snowplow-tracker/src/main/java/com/snowplowanalytics/snowplow/configuration/TrackerConfiguration.kt b/snowplow-tracker/src/main/java/com/snowplowanalytics/snowplow/configuration/TrackerConfiguration.kt index ff4697af7..d1ea613c8 100644 --- a/snowplow-tracker/src/main/java/com/snowplowanalytics/snowplow/configuration/TrackerConfiguration.kt +++ b/snowplow-tracker/src/main/java/com/snowplowanalytics/snowplow/configuration/TrackerConfiguration.kt @@ -40,7 +40,7 @@ import java.util.* * - deepLinkContext: true * - screenViewAutotracking: true * - screenEngagementAutotracking: true - * - lifecycleAutotracking: false + * - lifecycleAutotracking: true * - installAutotracking: true * - exceptionAutotracking: true * - diagnosticAutotracking: false @@ -290,8 +290,9 @@ open class TrackerConfiguration : TrackerConfigurationInterface, Configuration { } /** - * Whether to enable automatic tracking of background and foreground transitions. - * The Foreground library must be installed. + * Whether to enable automatic tracking of background and foreground transitions. + * Enabled by default. + * The androidx.lifecycle-extensions library must be installed. */ fun lifecycleAutotracking(lifecycleAutotracking: Boolean): TrackerConfiguration { this.lifecycleAutotracking = lifecycleAutotracking From 2bae43ada185b42d6601b26b767231e04c323357 Mon Sep 17 00:00:00 2001 From: Miranda Wilson Date: Thu, 1 Feb 2024 14:56:19 +0000 Subject: [PATCH 21/21] Prepare for v6.0.0 release --- CHANGELOG | 23 +++++++++++++++++++++++ VERSION | 2 +- build.gradle | 2 +- gradle.properties | 2 +- 4 files changed, 26 insertions(+), 3 deletions(-) diff --git a/CHANGELOG b/CHANGELOG index f6566f555..2168d9958 100644 --- a/CHANGELOG +++ b/CHANGELOG @@ -1,3 +1,26 @@ +Version 6.0.0 (2024-02-01) +-------------------------- +Enable lifecycle autotracking by default (#651) +Update copyright notices (#669) +Add API to decorate link with user/session info (#639) +Add an option to override platform context properties (#667) +Tidy AbstractEvent internal properties (#666) +Handle errors when fetching screen resolution in Subject (#657) +Undeprecate PageView event (#665) +Fix demo crash when using R8 full mode (#652) +Add configurable limit for the maximum age and number of events in the event store and remove old events before sending (#660) +Remove optional types in event store interface (#661) +Set default thread count in Executor to match the default thread pool size in the Emitter (#659) +Remove unused threadCount property from Tracker (#659) +Fix returning error from network connection requests (#659) +Change default emit timeout from 5 seconds to 30 seconds (#658) +Update Emitter constructor to accept namespace and event store and make them immutable (#659) +Do not track the screen view again when app comes to foreground (#653) +Add screen engagement tracking of time spent and list items scrolled on a screen (#654) +Make network requests serially in network connection (#646) +Change default buffer option to single (#649) +Flush events only when the buffer is full (#648) + Version 5.6.0 (2023-10-12) -------------------------- Add configuration to send requests with user ID to a Focal Meter endpoint (#571) diff --git a/VERSION b/VERSION index 1bc788d3b..09b254e90 100644 --- a/VERSION +++ b/VERSION @@ -1 +1 @@ -5.6.0 +6.0.0 diff --git a/build.gradle b/build.gradle index e8db8ba6d..dd70a6fc6 100644 --- a/build.gradle +++ b/build.gradle @@ -22,7 +22,7 @@ plugins { subprojects { group = 'com.snowplowanalytics' - version = '5.6.0' + version = '6.0.0' repositories { google() maven { diff --git a/gradle.properties b/gradle.properties index 0b209a0e1..c75895ae7 100644 --- a/gradle.properties +++ b/gradle.properties @@ -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=5.6.0 +VERSION_NAME=6.0.0 POM_NAME=snowplow-android-tracker POM_PACKAGING=aar