diff --git a/piano-analytics/src/main/java/io/piano/android/analytics/PianoAnalytics.kt b/piano-analytics/src/main/java/io/piano/android/analytics/PianoAnalytics.kt index e86b254..bf109f2 100644 --- a/piano-analytics/src/main/java/io/piano/android/analytics/PianoAnalytics.kt +++ b/piano-analytics/src/main/java/io/piano/android/analytics/PianoAnalytics.kt @@ -183,7 +183,12 @@ public class PianoAnalytics internal constructor( pianoConsents: PianoConsents? = null, dataEncoder: DataEncoder = PlainDataEncoder, ): PianoAnalytics { - DependenciesProvider.init(context, configuration, pianoConsents, dataEncoder) + DependenciesProvider.init( + context, + configuration, + pianoConsents ?: runCatching { PianoConsents.getInstance() }.getOrNull(), + dataEncoder + ) return getInstance() }