Updated on 2026-08-14
This commit is contained in:
parent
393a4fce3e
commit
38276b01ea
5 changed files with 42 additions and 1 deletions
|
|
@ -0,0 +1,24 @@
|
|||
package com.tangem.tap.features.intentHandler.handlers
|
||||
|
||||
import android.content.Intent
|
||||
import com.tangem.core.analytics.api.AnalyticsEventHandler
|
||||
import com.tangem.tap.common.analytics.events.Push
|
||||
import com.tangem.tap.features.intentHandler.IntentHandler
|
||||
|
||||
internal class OnPushClickedIntentHandler(val analyticsEventHandler: AnalyticsEventHandler) : IntentHandler {
|
||||
|
||||
override fun handleIntent(intent: Intent?, isFromForeground: Boolean): Boolean {
|
||||
val fromPush = intent?.extras?.getBoolean(IS_OPENED_FROM_PUSH) ?: false
|
||||
|
||||
return if (fromPush) {
|
||||
analyticsEventHandler.send(Push.PushNotificationOpened)
|
||||
true
|
||||
} else {
|
||||
false
|
||||
}
|
||||
}
|
||||
|
||||
companion object {
|
||||
const val IS_OPENED_FROM_PUSH = "IS_OPENED_FROM_PUSH"
|
||||
}
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue