Updated on 2026-08-14
This commit is contained in:
parent
bbad1bdfd9
commit
93f74f5aff
2 changed files with 3 additions and 3 deletions
|
|
@ -38,7 +38,7 @@ internal class TangemPushNotificationService : FirebaseMessagingService() {
|
|||
|
||||
// TODO refactoring: [REDACTED_JIRA]
|
||||
val intent = Intent(applicationContext, MainActivity::class.java)
|
||||
intent.putExtra(OnPushClickedIntentHandler.IS_OPENED_FROM_PUSH, true)
|
||||
intent.putExtra(OnPushClickedIntentHandler.OPENED_FROM_GCM_PUSH, true)
|
||||
intent.addFlags(Intent.FLAG_ACTIVITY_CLEAR_TOP)
|
||||
val pendingIntent = PendingIntent.getActivity(
|
||||
/* context = */ this,
|
||||
|
|
|
|||
|
|
@ -8,7 +8,7 @@ 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
|
||||
val fromPush = intent?.extras?.containsKey(OPENED_FROM_GCM_PUSH) ?: false
|
||||
|
||||
return if (fromPush) {
|
||||
analyticsEventHandler.send(Push.PushNotificationOpened)
|
||||
|
|
@ -19,6 +19,6 @@ internal class OnPushClickedIntentHandler(val analyticsEventHandler: AnalyticsEv
|
|||
}
|
||||
|
||||
companion object {
|
||||
const val IS_OPENED_FROM_PUSH = "IS_OPENED_FROM_PUSH"
|
||||
const val OPENED_FROM_GCM_PUSH = "google.sent_time" // every bundle from FCM contains this key
|
||||
}
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue