Skip to content

Commit

Permalink
chore: inject Tracker instead of AmplitudeTracker
Browse files Browse the repository at this point in the history
  • Loading branch information
giovannijunseokim committed Jan 4, 2025
1 parent 75bab34 commit 6a71961
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -88,7 +88,7 @@ class NotificationDetailActivity : AppCompatActivity() {
private val viewModel by viewModels<NotificationDetailViewModel>()

@Inject
lateinit var tracker: AmplitudeTracker
lateinit var tracker: Tracker

@OptIn(ExperimentalMaterial3Api::class)
override fun onCreate(savedInstanceState: Bundle?) {
Expand Down

0 comments on commit 6a71961

Please sign in to comment.