diff --git a/snowplow-demo-compose/build.gradle b/snowplow-demo-compose/build.gradle index 187c043db..b1e9de342 100644 --- a/snowplow-demo-compose/build.gradle +++ b/snowplow-demo-compose/build.gradle @@ -61,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 05fb0de58..9a6d869ed 100644 --- a/snowplow-demo-compose/proguard-rules.pro +++ b/snowplow-demo-compose/proguard-rules.pro @@ -20,23 +20,17 @@ # hide the original source file name. #-renamesourcefileattribute SourceFile -# Fixes R8 full mode bug +# 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 -## Please add these rules to your existing keep rules in order to suppress warnings. -## This is generated automatically by the Android Gradle plugin. -#-dontwarn com.android.installreferrer.api.InstallReferrerClient$Builder -#-dontwarn com.android.installreferrer.api.InstallReferrerClient -#-dontwarn com.android.installreferrer.api.InstallReferrerStateListener -#-dontwarn org.bouncycastle.jsse.BCSSLParameters -#-dontwarn org.bouncycastle.jsse.BCSSLSocket -#-dontwarn org.bouncycastle.jsse.provider.BouncyCastleJsseProvider -#-dontwarn org.conscrypt.Conscrypt$Version -#-dontwarn org.conscrypt.Conscrypt -#-dontwarn org.conscrypt.ConscryptHostnameVerifier -#-dontwarn org.openjsse.javax.net.ssl.SSLParameters -#-dontwarn org.openjsse.javax.net.ssl.SSLSocket -#-dontwarn org.openjsse.net.ssl.OpenJSSE +# 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.** { *; } 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 3b4947447..c826befcf 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 @@ -49,31 +49,28 @@ object TrackerEvents { ) fun trackAll(tracker: TrackerController) { - - trackDeepLink(tracker) - tracker.track(ScreenEnd()) -// trackPageView(tracker) -// trackStructuredEvent(tracker) -// trackScreenView(tracker) -// trackTimings(tracker) -// trackSelfDescribingEvent(tracker) -// trackConsentGranted(tracker) -// trackConsentWithdrawn(tracker) -// trackMessageNotification(tracker) -// -// // Ecommerce events -// trackAddToCart(tracker) -// trackRemoveFromCart(tracker) -// trackCheckoutStep(tracker) -// trackProductView(tracker) -// trackProductListView(tracker) -// trackProductListClick(tracker) -// trackPromotionView(tracker) -// trackPromotionClick(tracker) -// trackTransaction(tracker) -// trackTransactionError(tracker) -// trackRefund(tracker) + trackPageView(tracker) + trackStructuredEvent(tracker) + trackScreenView(tracker) + trackTimings(tracker) + trackSelfDescribingEvent(tracker) + trackConsentGranted(tracker) + trackConsentWithdrawn(tracker) + trackMessageNotification(tracker) + + // Ecommerce events + trackAddToCart(tracker) + trackRemoveFromCart(tracker) + trackCheckoutStep(tracker) + trackProductView(tracker) + trackProductListView(tracker) + trackProductListClick(tracker) + trackPromotionView(tracker) + trackPromotionClick(tracker) + trackTransaction(tracker) + trackTransactionError(tracker) + trackRefund(tracker) } private fun trackDeepLink(tracker: TrackerController) {