From 20430f006ade51aaee9ebbf32d00d556b1c1d474 Mon Sep 17 00:00:00 2001 From: KennyHuRadar <139801512+KennyHuRadar@users.noreply.github.com> Date: Thu, 1 Aug 2024 09:31:03 -0400 Subject: [PATCH] Kennyhu/add track once on permission (#387) * switch for branch change * simplify * add tracking if start track on init --- .../main/java/io/radar/sdk/RadarActivityLifecycleCallbacks.kt | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/sdk/src/main/java/io/radar/sdk/RadarActivityLifecycleCallbacks.kt b/sdk/src/main/java/io/radar/sdk/RadarActivityLifecycleCallbacks.kt index a8f8da95..a8e18af3 100644 --- a/sdk/src/main/java/io/radar/sdk/RadarActivityLifecycleCallbacks.kt +++ b/sdk/src/main/java/io/radar/sdk/RadarActivityLifecycleCallbacks.kt @@ -58,14 +58,14 @@ internal class RadarActivityLifecycleCallbacks( } val sdkConfiguration = RadarSettings.getSdkConfiguration(activity.applicationContext) - if (sdkConfiguration.trackOnceOnAppOpen) { + if (sdkConfiguration.trackOnceOnAppOpen || sdkConfiguration.startTrackingOnInitialize) { Radar.trackOnce() } } }) } else { val sdkConfiguration = RadarSettings.getSdkConfiguration(activity.applicationContext) - if (sdkConfiguration.trackOnceOnAppOpen) { + if (sdkConfiguration.trackOnceOnAppOpen || sdkConfiguration.startTrackingOnInitialize) { Radar.trackOnce() } }