From 6a71961b269e22c0cfa3057e0ddc6c3ad49e31e8 Mon Sep 17 00:00:00 2001 From: Giovanni Junseo Kim Date: Sat, 4 Jan 2025 21:17:57 +0900 Subject: [PATCH] chore: inject Tracker instead of AmplitudeTracker --- .../sopt/official/feature/notification/SchemeActivity.kt | 6 ++++-- .../notification/detail/NotificationDetailActivity.kt | 4 ++-- 2 files changed, 6 insertions(+), 4 deletions(-) diff --git a/app/src/main/java/org/sopt/official/feature/notification/SchemeActivity.kt b/app/src/main/java/org/sopt/official/feature/notification/SchemeActivity.kt index 9eaaa70e2..2f24bc277 100644 --- a/app/src/main/java/org/sopt/official/feature/notification/SchemeActivity.kt +++ b/app/src/main/java/org/sopt/official/feature/notification/SchemeActivity.kt @@ -31,8 +31,8 @@ import android.net.Uri import android.os.Bundle import androidx.appcompat.app.AppCompatActivity import dagger.hilt.android.EntryPointAccessors -import org.sopt.official.analytics.AmplitudeTracker import org.sopt.official.analytics.EventType +import org.sopt.official.analytics.Tracker import org.sopt.official.auth.model.UserStatus import org.sopt.official.common.navigator.DeepLinkType import org.sopt.official.common.util.extractQueryParameter @@ -56,15 +56,17 @@ class SchemeActivity : AppCompatActivity() { private val args by serializableExtra(Argument("", "")) @Inject - lateinit var tracker: AmplitudeTracker + lateinit var tracker: Tracker override fun onCreate(savedInstanceState: Bundle?) { + Timber.tag("gio").e("onCreate invoked...") super.onCreate(savedInstanceState) trackClickPush() handleDeepLink() } private fun trackClickPush() { + Timber.tag("gio").e(args?.notificationInfo.toString()) args?.notificationInfo?.let { notificationInfo: NotificationInfo -> tracker.track( type = EventType.CLICK, name = "push", properties = mapOf( diff --git a/feature/notification/src/main/java/org/sopt/official/feature/notification/detail/NotificationDetailActivity.kt b/feature/notification/src/main/java/org/sopt/official/feature/notification/detail/NotificationDetailActivity.kt index eac5b2cb6..68a89da90 100644 --- a/feature/notification/src/main/java/org/sopt/official/feature/notification/detail/NotificationDetailActivity.kt +++ b/feature/notification/src/main/java/org/sopt/official/feature/notification/detail/NotificationDetailActivity.kt @@ -66,8 +66,8 @@ import androidx.lifecycle.compose.collectAsStateWithLifecycle import dagger.hilt.android.AndroidEntryPoint import dagger.hilt.android.EntryPointAccessors import kotlinx.coroutines.launch -import org.sopt.official.analytics.AmplitudeTracker import org.sopt.official.analytics.EventType +import org.sopt.official.analytics.Tracker import org.sopt.official.common.context.appContext import org.sopt.official.common.navigator.HOME_FORTUNE import org.sopt.official.common.navigator.NavigatorEntryPoint @@ -88,7 +88,7 @@ class NotificationDetailActivity : AppCompatActivity() { private val viewModel by viewModels() @Inject - lateinit var tracker: AmplitudeTracker + lateinit var tracker: Tracker @OptIn(ExperimentalMaterial3Api::class) override fun onCreate(savedInstanceState: Bundle?) {