Skip to content

Commit

Permalink
Merge branch 'release/5.3.0'
Browse files Browse the repository at this point in the history
  • Loading branch information
matus-tomlein committed Jun 30, 2023
2 parents 2ff558d + 4284f72 commit 9a61062
Show file tree
Hide file tree
Showing 107 changed files with 4,550 additions and 904 deletions.
10 changes: 10 additions & 0 deletions CHANGELOG
Original file line number Diff line number Diff line change
@@ -1,3 +1,13 @@
Version 5.3.0 (2023-06-30)
--------------------------
Add media controller with APIs to track media events (#606)
Add emitter configuration support to remote configuration (#607)
Use default configuration for properties that are not configured using remote configuration (#613)
Add custom HTTP headers configuration (#276)
Truncate language in platform context entity to max 8 characters (#621)
Truncate URL scheme for page_url and page_refr properties (#616)
Remember requestCallback, customRetryForStatusCodes and onSessionUpdate set for initialized trackers after configuration updates

Version 5.2.0 (2023-06-02)
--------------------------
Track install referrer details entity along with the application install event if available (#249)
Expand Down
2 changes: 1 addition & 1 deletion VERSION
Original file line number Diff line number Diff line change
@@ -1 +1 @@
5.2.0
5.3.0
2 changes: 1 addition & 1 deletion build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ plugins {

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

POM_NAME=snowplow-android-tracker
POM_PACKAGING=aar
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,6 @@
import com.snowplowanalytics.snowplow.emitter.BufferOption;
import com.snowplowanalytics.snowplow.globalcontexts.GlobalContext;
import com.snowplowanalytics.snowplow.tracker.DevicePlatform;
import com.snowplowanalytics.snowplow.tracker.InspectableEvent;
import com.snowplowanalytics.snowplow.tracker.LoggerDelegate;
import com.snowplowanalytics.snowplow.network.HttpMethod;
import com.snowplowanalytics.snowplow.network.RequestCallback;
Expand Down
23 changes: 12 additions & 11 deletions snowplow-demo-kotlin/src/main/AndroidManifest.xml
Original file line number Diff line number Diff line change
@@ -1,37 +1,38 @@
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="com.snowplowanalytics.snowplowdemokotlin" >
package="com.snowplowanalytics.snowplowdemokotlin">

<uses-permission android:name="android.permission.INTERNET" />
<uses-permission android:name="android.permission.ACCESS_NETWORK_STATE"/>

<!--Enable the permissions below for getting users geographical location.-->
<uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" /> <!-- Enable the permissions below for getting users geographical location. -->
<uses-permission android:name="android.permission.ACCESS_COARSE_LOCATION" />
<uses-permission android:name="android.permission.ACCESS_FINE_LOCATION" />

<application
android:usesCleartextTraffic="true"
android:allowBackup="true"
android:fullBackupContent="false"
android:icon="@mipmap/ic_launcher_snowplow"
android:label="@string/app_name"
android:fullBackupContent="false"
android:networkSecurityConfig="@xml/network_security_config"
android:theme="@style/AppTheme"
>
android:usesCleartextTraffic="true">
<activity
android:name=".MediaActivity"
android:exported="false"
android:label="@string/title_activity_media" />
<activity
android:name=".MainActivity"
android:screenOrientation="fullSensor"
android:exported="true">
android:exported="true"
android:screenOrientation="fullSensor">
<intent-filter>
<action android:name="android.intent.action.MAIN" />

<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
</activity>
<activity
android:name=".Demo"
android:label="@string/title_activity_demo"
android:screenOrientation="fullSensor">
</activity>
android:screenOrientation="fullSensor"></activity>
</application>

</manifest>
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ package com.snowplowanalytics.snowplowdemokotlin
import android.Manifest
import android.app.Activity
import android.content.Context
import android.content.Intent
import android.content.pm.PackageManager
import android.net.Uri
import android.os.Bundle
Expand All @@ -29,6 +30,7 @@ import androidx.core.content.ContextCompat
import androidx.core.util.Consumer
import androidx.core.util.Pair
import androidx.preference.PreferenceManager
import com.snowplowanalytics.core.tracker.Logger
import com.snowplowanalytics.core.utils.Util
import com.snowplowanalytics.snowplow.Snowplow.createTracker
import com.snowplowanalytics.snowplow.Snowplow.defaultTracker
Expand Down Expand Up @@ -56,6 +58,7 @@ class Demo : Activity(), LoggerDelegate {
private var _startButton: Button? = null
private var _tabButton: Button? = null
private var _loadWebViewButton: Button? = null
private var _videoBtn: Button? = null
private var _uriField: EditText? = null
private var _webViewUriField: EditText? = null
private var _type: RadioGroup? = null
Expand Down Expand Up @@ -97,6 +100,13 @@ class Demo : Activity(), LoggerDelegate {
_webViewUriField = findViewById<View>(R.id.web_view_uri_field) as EditText
_webView = findViewById<View>(R.id.web_view) as WebView
_loadWebViewButton = findViewById<View>(R.id.btn_load_webview) as Button
_videoBtn = findViewById<View>(R.id.btn_lite_video) as Button
_videoBtn?.setOnClickListener {
Logger.updateLogLevel(LogLevel.VERBOSE)
val intent = Intent(this@Demo, MediaActivity::class.java)
startActivity(intent)
}


_logOutput?.movementMethod = ScrollingMovementMethod()
_logOutput?.text = ""
Expand Down Expand Up @@ -293,7 +303,7 @@ class Demo : Activity(), LoggerDelegate {
plugin.afterTrack { event: InspectableEvent ->
println("Tracked event with ${event.entities.size} entities")
}

createTracker(
applicationContext,
namespace,
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
/*
* 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.snowplowdemokotlin

import android.app.Activity
import android.net.Uri
import android.os.Bundle
import com.snowplowanalytics.snowplowdemokotlin.media.VideoViewController

class MediaActivity : Activity() {
private var videoViewController: VideoViewController? = null

override fun onCreate(savedInstanceState: Bundle?) {
super.onCreate(savedInstanceState)
setContentView(R.layout.activity_media)

val uri = Uri.parse("http://commondatastorage.googleapis.com/gtv-videos-bucket/sample/BigBuckBunny.mp4")
videoViewController = VideoViewController(activity = this, uri = uri)
}

override fun onDestroy() {
videoViewController?.destroy()
videoViewController = null
super.onDestroy()
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,49 @@
/*
* 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.snowplowdemokotlin.media

import android.content.Context
import android.util.AttributeSet

class VideoView : android.widget.VideoView {
private var viewController: VideoViewController? = null

constructor(context: Context?) : super(context)
constructor(context: Context?, attrs: AttributeSet?) : super(context, attrs)
constructor(context: Context?, attrs: AttributeSet?, defStyle: Int) : super(
context,
attrs,
defStyle
)

fun setVideoPlayer(player: VideoViewController?) {
viewController = player
}

override fun start() {
super.start()
viewController?.onPlay()
}

override fun pause() {
super.pause()
viewController?.onPause()
}

override fun seekTo(msec: Int) {
super.seekTo(msec)
viewController?.onSeekStart()
}
}

Loading

0 comments on commit 9a61062

Please sign in to comment.