From a64aac1ca485ae190ac497c01458ac8b08da3eae Mon Sep 17 00:00:00 2001 From: Kun Wu Date: Fri, 11 Aug 2023 22:00:45 +0200 Subject: [PATCH 1/2] bump conviva to 4.0.33 --- CHANGELOG.md | 4 ++++ ConvivaExampleApp/build.gradle | 2 +- conviva/build.gradle | 2 +- 3 files changed, 6 insertions(+), 2 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index e01e802..b1aa118 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -6,6 +6,10 @@ and this project adheres to [Semantic Versioning](http://semver.org/). ## [Unreleased] +## 2.2.1 - 2023-08-10 +### Changed +- Updated Conviva SDK to 4.0.33 + ## 2.2.0 - 2023-07-18 ### Added - New `release(Boolean releaseConvivaSdk)` function allows for registering a new `ConvivaAnalyticsIntegration` to a diff --git a/ConvivaExampleApp/build.gradle b/ConvivaExampleApp/build.gradle index 4fb65eb..41eeceb 100644 --- a/ConvivaExampleApp/build.gradle +++ b/ConvivaExampleApp/build.gradle @@ -39,7 +39,7 @@ dependencies { implementation project(':conviva') //implementation 'com.bitmovin.analytics:conviva:2.1.1' - //api 'com.conviva.sdk:conviva-core-sdk:4.0.20' + implementation 'com.conviva.sdk:conviva-core-sdk:4.0.33' implementation "com.google.ads.interactivemedia.v3:interactivemedia:$googleImaSdk" // only needed if ads are used: implementation "com.google.android.gms:play-services-ads-identifier:$googlePlayAdsIdentifier" // only needed if ads are used diff --git a/conviva/build.gradle b/conviva/build.gradle index bd593cc..a135574 100644 --- a/conviva/build.gradle +++ b/conviva/build.gradle @@ -36,7 +36,7 @@ dependencies { testImplementation testingDependencies.junit androidTestImplementation testingDependencies.androidx_junit androidTestImplementation testingDependencies.androidx_espresso_core - api 'com.conviva.sdk:conviva-core-sdk:4.0.20' + implementation 'com.conviva.sdk:conviva-core-sdk:4.0.33' implementation bitmovinPlayerDependencies.bitmovinPlayer implementation 'org.apache.commons:commons-text:1.7' } From 7a7576369d13d96cb2bc56385a648007d67c525c Mon Sep 17 00:00:00 2001 From: Kun Wu Date: Tue, 15 Aug 2023 15:34:46 +0200 Subject: [PATCH 2/2] feat: log statck trace to Conviva in case of error events --- .../conviva/ConvivaAnalyticsIntegration.java | 14 ++++++++++++-- 1 file changed, 12 insertions(+), 2 deletions(-) diff --git a/conviva/src/main/java/com/bitmovin/analytics/conviva/ConvivaAnalyticsIntegration.java b/conviva/src/main/java/com/bitmovin/analytics/conviva/ConvivaAnalyticsIntegration.java index f8e64b3..ea75e31 100644 --- a/conviva/src/main/java/com/bitmovin/analytics/conviva/ConvivaAnalyticsIntegration.java +++ b/conviva/src/main/java/com/bitmovin/analytics/conviva/ConvivaAnalyticsIntegration.java @@ -5,6 +5,7 @@ import android.util.Log; import com.bitmovin.player.api.Player; +import com.bitmovin.player.api.deficiency.ErrorEvent; import com.bitmovin.player.api.event.Event; import com.bitmovin.player.api.event.EventListener; import com.bitmovin.player.api.event.PlayerEvent; @@ -235,7 +236,6 @@ public void reportAppBackgrounded() { ConvivaAnalytics.reportAppBackgrounded(); isBackgrounded = true; } - } // endregion @@ -247,7 +247,15 @@ private void ensureConvivaSessionIsCreatedAndInitialized() { } private void customEvent(Event event) { - customEvent(event, new HashMap()); + Map eventAttributes = new HashMap<>(); + if (event instanceof PlayerEvent.Error || event instanceof SourceEvent.Error) { + ErrorEvent errorEvent = ((ErrorEvent) event); + if (errorEvent.getData() != null) { + // Report stack trace to Conviva + eventAttributes.put("stack trace", errorEvent.getData().toString()); + } + } + customEvent(event, eventAttributes); } private void customEvent(Event event, Map attributes) { @@ -454,6 +462,7 @@ public void run() { public void onEvent(PlayerEvent.Error event) { Log.d(TAG, "[Player Event] Error"); String message = String.format("%s - %s", event.getCode(), event.getMessage()); + customEvent(event); // In case of Error, report current stack trace if available convivaVideoAnalytics.reportPlaybackError(message, ConvivaSdkConstants.ErrorSeverity.FATAL); internalEndSession(); } @@ -464,6 +473,7 @@ public void onEvent(PlayerEvent.Error event) { public void onEvent(SourceEvent.Error event) { Log.d(TAG, "[Source Event] Error"); String message = String.format("%s - %s", event.getCode(), event.getMessage()); + customEvent(event); // In case of Error, report current stack trace if available convivaVideoAnalytics.reportPlaybackError(message, ConvivaSdkConstants.ErrorSeverity.FATAL); internalEndSession(); }