From 0bad64177cbe19b10207ac6cb527234d5ff55307 Mon Sep 17 00:00:00 2001 From: Daniel Green Date: Fri, 13 Dec 2024 14:51:37 +0200 Subject: [PATCH 1/6] feat: Added all fields from push notifications --- .../com/personalization/RegisterManager.kt | 2 + .../data/mapper/NotificationActionsMapper.kt | 23 ++++++++++ .../data/mapper/NotificationDataMapper.kt | 42 +++++++++---------- .../data/mapper/NotificationEventMapper.kt | 24 +++++++++++ .../data/mapper/parseActionUrls.kt | 14 +++++++ .../domain/model/NotificationAction.kt | 6 +++ .../domain/model/NotificationConstants.kt | 10 ++++- .../domain/model/NotificationData.kt | 9 +++- .../domain/model/NotificationEvent.kt | 7 ++++ 9 files changed, 112 insertions(+), 25 deletions(-) create mode 100644 personalization-sdk/src/main/kotlin/com/personalization/features/notification/data/mapper/NotificationActionsMapper.kt create mode 100644 personalization-sdk/src/main/kotlin/com/personalization/features/notification/data/mapper/NotificationEventMapper.kt create mode 100644 personalization-sdk/src/main/kotlin/com/personalization/features/notification/data/mapper/parseActionUrls.kt create mode 100644 personalization-sdk/src/main/kotlin/com/personalization/features/notification/domain/model/NotificationAction.kt create mode 100644 personalization-sdk/src/main/kotlin/com/personalization/features/notification/domain/model/NotificationEvent.kt diff --git a/personalization-sdk/src/main/kotlin/com/personalization/RegisterManager.kt b/personalization-sdk/src/main/kotlin/com/personalization/RegisterManager.kt index c84fd47c..93375b89 100644 --- a/personalization-sdk/src/main/kotlin/com/personalization/RegisterManager.kt +++ b/personalization-sdk/src/main/kotlin/com/personalization/RegisterManager.kt @@ -93,6 +93,8 @@ class RegisterManager @Inject constructor( } private fun processFirebaseToken(token: String) { + println("****DEVICE TOKEN**** : ${token}") + val savedToken = getPreferencesValueUseCase.getToken() val lastUpdate = getPreferencesValueUseCase.getLastPushTokenDate() val currentDate = Date().time diff --git a/personalization-sdk/src/main/kotlin/com/personalization/features/notification/data/mapper/NotificationActionsMapper.kt b/personalization-sdk/src/main/kotlin/com/personalization/features/notification/data/mapper/NotificationActionsMapper.kt new file mode 100644 index 00000000..1ee9a5e4 --- /dev/null +++ b/personalization-sdk/src/main/kotlin/com/personalization/features/notification/data/mapper/NotificationActionsMapper.kt @@ -0,0 +1,23 @@ +package com.personalization.features.notification.data.mapper + +import com.personalization.features.notification.domain.model.NotificationAction +import com.personalization.features.notification.domain.model.NotificationConstants.NOTIFICATION_ACTION +import com.personalization.features.notification.domain.model.NotificationConstants.NOTIFICATION_TITLE +import org.json.JSONArray + +fun parseNotificationActions(actionsJson: String?): List? { + return actionsJson?.let { + try { + val jsonArray = JSONArray(it) + List(jsonArray.length()) { index -> + val jsonObject = jsonArray.getJSONObject(index) + NotificationAction( + action = jsonObject.getString(NOTIFICATION_ACTION), + title = jsonObject.getString(NOTIFICATION_TITLE) + ) + } + } catch (e: Exception) { + null + } + } +} diff --git a/personalization-sdk/src/main/kotlin/com/personalization/features/notification/data/mapper/NotificationDataMapper.kt b/personalization-sdk/src/main/kotlin/com/personalization/features/notification/data/mapper/NotificationDataMapper.kt index d42090b6..d616e57e 100644 --- a/personalization-sdk/src/main/kotlin/com/personalization/features/notification/data/mapper/NotificationDataMapper.kt +++ b/personalization-sdk/src/main/kotlin/com/personalization/features/notification/data/mapper/NotificationDataMapper.kt @@ -1,27 +1,25 @@ package com.personalization.features.notification.data.mapper import com.google.firebase.messaging.RemoteMessage -import com.personalization.features.notification.domain.model.NotificationConstants +import com.personalization.features.notification.domain.model.NotificationConstants.NOTIFICATION_ACTIONS +import com.personalization.features.notification.domain.model.NotificationConstants.NOTIFICATION_ACTION_URLS +import com.personalization.features.notification.domain.model.NotificationConstants.NOTIFICATION_BODY +import com.personalization.features.notification.domain.model.NotificationConstants.NOTIFICATION_EVENT +import com.personalization.features.notification.domain.model.NotificationConstants.NOTIFICATION_ICON +import com.personalization.features.notification.domain.model.NotificationConstants.NOTIFICATION_IMAGE +import com.personalization.features.notification.domain.model.NotificationConstants.NOTIFICATION_PARAM_ID +import com.personalization.features.notification.domain.model.NotificationConstants.NOTIFICATION_TITLE +import com.personalization.features.notification.domain.model.NotificationConstants.TYPE_PARAM import com.personalization.features.notification.domain.model.NotificationData -fun RemoteMessage.toNotificationData(): NotificationData { - var title: String? = null - var body: String? = null - var imageUrl: String? = null - - this.notification?.let { notification -> - title = notification.title?.takeIf { it.isNotEmpty() } - body = notification.body?.takeIf { it.isNotEmpty() } - imageUrl = notification.imageUrl?.toString() - } - - val analyticsLabel: String? = - this.data[NotificationConstants.ANALYTICS_LABEL_FIELD]?.takeIf { it.isNotEmpty() } - - return NotificationData( - title = title, - body = body, - images = imageUrl, - analyticsLabel = analyticsLabel - ) -} +fun RemoteMessage.toNotificationData(): NotificationData = NotificationData( + id = this.data[NOTIFICATION_PARAM_ID], + title = this.data[NOTIFICATION_TITLE], + body = this.data[NOTIFICATION_BODY], + icon = this.data[NOTIFICATION_ICON], + type = this.data[TYPE_PARAM], + actions = parseNotificationActions(this.data[NOTIFICATION_ACTIONS]), + actionUrls = parseActionUrls(this.data[NOTIFICATION_ACTION_URLS]), + image = this.data[NOTIFICATION_IMAGE], + event = parseNotificationEvent(this.data[NOTIFICATION_EVENT]) +) diff --git a/personalization-sdk/src/main/kotlin/com/personalization/features/notification/data/mapper/NotificationEventMapper.kt b/personalization-sdk/src/main/kotlin/com/personalization/features/notification/data/mapper/NotificationEventMapper.kt new file mode 100644 index 00000000..8e116da3 --- /dev/null +++ b/personalization-sdk/src/main/kotlin/com/personalization/features/notification/data/mapper/NotificationEventMapper.kt @@ -0,0 +1,24 @@ +package com.personalization.features.notification.data.mapper + +import com.personalization.features.notification.domain.model.NotificationConstants.NOTIFICATION_PAYLOAD +import com.personalization.features.notification.domain.model.NotificationConstants.NOTIFICATION_URI +import com.personalization.features.notification.domain.model.NotificationConstants.TYPE_PARAM +import com.personalization.features.notification.domain.model.NotificationEvent +import org.json.JSONObject + +fun parseNotificationEvent(eventJson: String?): NotificationEvent? { + return eventJson?.let { + try { + val jsonObject = JSONObject(it) + NotificationEvent( + type = jsonObject.optString(TYPE_PARAM), + uri = jsonObject.optString(NOTIFICATION_URI), + payload = jsonObject.optJSONObject(NOTIFICATION_PAYLOAD)?.let { payloadObj -> + payloadObj.keys().asSequence().associateWith { key -> payloadObj[key] } + } + ) + } catch (e: Exception) { + null + } + } +} diff --git a/personalization-sdk/src/main/kotlin/com/personalization/features/notification/data/mapper/parseActionUrls.kt b/personalization-sdk/src/main/kotlin/com/personalization/features/notification/data/mapper/parseActionUrls.kt new file mode 100644 index 00000000..d8a860a2 --- /dev/null +++ b/personalization-sdk/src/main/kotlin/com/personalization/features/notification/data/mapper/parseActionUrls.kt @@ -0,0 +1,14 @@ +package com.personalization.features.notification.data.mapper + +import org.json.JSONArray + +fun parseActionUrls(actionUrlsJson: String?): List? { + return actionUrlsJson?.let { + try { + val jsonArray = JSONArray(it) + List(jsonArray.length()) { index -> jsonArray.getString(index) } + } catch (e: Exception) { + null + } + } +} diff --git a/personalization-sdk/src/main/kotlin/com/personalization/features/notification/domain/model/NotificationAction.kt b/personalization-sdk/src/main/kotlin/com/personalization/features/notification/domain/model/NotificationAction.kt new file mode 100644 index 00000000..cb5c9e85 --- /dev/null +++ b/personalization-sdk/src/main/kotlin/com/personalization/features/notification/domain/model/NotificationAction.kt @@ -0,0 +1,6 @@ +package com.personalization.features.notification.domain.model + +data class NotificationAction( + val action: String, + val title: String +) diff --git a/personalization-sdk/src/main/kotlin/com/personalization/features/notification/domain/model/NotificationConstants.kt b/personalization-sdk/src/main/kotlin/com/personalization/features/notification/domain/model/NotificationConstants.kt index c9b2d34f..1ffdc602 100644 --- a/personalization-sdk/src/main/kotlin/com/personalization/features/notification/domain/model/NotificationConstants.kt +++ b/personalization-sdk/src/main/kotlin/com/personalization/features/notification/domain/model/NotificationConstants.kt @@ -8,9 +8,17 @@ object NotificationConstants { const val ACTION_NEXT_IMAGE = "ACTION_NEXT_IMAGE" const val NOTIFICATION_TYPE = "NOTIFICATION_TYPE" const val TRACK_CLICKED = "track/clicked" - const val NOTIFICATION_IMAGES = "images" + const val NOTIFICATION_IMAGE = "image" + const val NOTIFICATION_ICON = "icon" const val NOTIFICATION_TITLE = "title" const val NOTIFICATION_BODY = "body" + const val NOTIFICATION_ACTIONS = "actions" + const val NOTIFICATION_ACTION = "action" + const val NOTIFICATION_ACTION_URLS = "action_urls" + const val NOTIFICATION_PARAM_ID = "id" + const val NOTIFICATION_PAYLOAD = "payload" + const val NOTIFICATION_EVENT = "event" + const val NOTIFICATION_URI = "uri" const val TYPE_PARAM = "type" const val CODE_PARAM = "code" diff --git a/personalization-sdk/src/main/kotlin/com/personalization/features/notification/domain/model/NotificationData.kt b/personalization-sdk/src/main/kotlin/com/personalization/features/notification/domain/model/NotificationData.kt index 593007bd..d3292e9b 100644 --- a/personalization-sdk/src/main/kotlin/com/personalization/features/notification/domain/model/NotificationData.kt +++ b/personalization-sdk/src/main/kotlin/com/personalization/features/notification/domain/model/NotificationData.kt @@ -1,8 +1,13 @@ package com.personalization.features.notification.domain.model data class NotificationData( + val id: String?, val title: String?, val body: String?, - val images: String?, - val analyticsLabel: String? = null + val icon: String?, + val type: String?, + val actions: List?, + val actionUrls: List?, + val image: String?, + val event: NotificationEvent? ) diff --git a/personalization-sdk/src/main/kotlin/com/personalization/features/notification/domain/model/NotificationEvent.kt b/personalization-sdk/src/main/kotlin/com/personalization/features/notification/domain/model/NotificationEvent.kt new file mode 100644 index 00000000..d8d3bb4c --- /dev/null +++ b/personalization-sdk/src/main/kotlin/com/personalization/features/notification/domain/model/NotificationEvent.kt @@ -0,0 +1,7 @@ +package com.personalization.features.notification.domain.model + +data class NotificationEvent( + val type: String?, + val uri: String?, + val payload: Map? = null +) From 5a1c1b2cc61d8f9f089bddc92a1fc4cf81b32885 Mon Sep 17 00:00:00 2001 From: Daniel Green Date: Fri, 13 Dec 2024 15:29:34 +0200 Subject: [PATCH 2/6] feat: Added mappers and sendign params like an object --- .../com/personalization/RegisterManager.kt | 1 - .../main/kotlin/com/personalization/SDK.kt | 8 +-- .../mapper/IntentNotificationDataMapper.kt | 37 +++++++++++ .../data/service/NotificationService.kt | 64 ++++++++++--------- .../helpers/NotificationNavigationHelper.kt | 6 +- .../rees46/kotlin/com/rees46/sdk/REES46.kt | 10 ++- .../sample/AbstractMainActivity.kt | 34 ---------- .../sample/AbstractSampleApplication.kt | 10 ++- 8 files changed, 94 insertions(+), 76 deletions(-) create mode 100644 personalization-sdk/src/main/kotlin/com/personalization/features/notification/data/mapper/IntentNotificationDataMapper.kt diff --git a/personalization-sdk/src/main/kotlin/com/personalization/RegisterManager.kt b/personalization-sdk/src/main/kotlin/com/personalization/RegisterManager.kt index 93375b89..60b017ed 100644 --- a/personalization-sdk/src/main/kotlin/com/personalization/RegisterManager.kt +++ b/personalization-sdk/src/main/kotlin/com/personalization/RegisterManager.kt @@ -93,7 +93,6 @@ class RegisterManager @Inject constructor( } private fun processFirebaseToken(token: String) { - println("****DEVICE TOKEN**** : ${token}") val savedToken = getPreferencesValueUseCase.getToken() val lastUpdate = getPreferencesValueUseCase.getLastPushTokenDate() diff --git a/personalization-sdk/src/main/kotlin/com/personalization/SDK.kt b/personalization-sdk/src/main/kotlin/com/personalization/SDK.kt index e79bbbbe..ddd2d6d9 100644 --- a/personalization-sdk/src/main/kotlin/com/personalization/SDK.kt +++ b/personalization-sdk/src/main/kotlin/com/personalization/SDK.kt @@ -751,11 +751,9 @@ open class SDK { private fun receiveMessage(remoteMessage: RemoteMessage) { notificationReceived(remoteMessage.data) - onMessageListener?.let { listener -> - listener.onMessage( - data = remoteMessage.toNotificationData() - ) - } + onMessageListener?.onMessage( + data = remoteMessage.toNotificationData() + ) } companion object { diff --git a/personalization-sdk/src/main/kotlin/com/personalization/features/notification/data/mapper/IntentNotificationDataMapper.kt b/personalization-sdk/src/main/kotlin/com/personalization/features/notification/data/mapper/IntentNotificationDataMapper.kt new file mode 100644 index 00000000..00649748 --- /dev/null +++ b/personalization-sdk/src/main/kotlin/com/personalization/features/notification/data/mapper/IntentNotificationDataMapper.kt @@ -0,0 +1,37 @@ +package com.personalization.features.notification.data.mapper + +import android.content.Intent +import com.personalization.features.notification.domain.model.NotificationConstants.NOTIFICATION_ACTIONS +import com.personalization.features.notification.domain.model.NotificationConstants.NOTIFICATION_ACTION_URLS +import com.personalization.features.notification.domain.model.NotificationConstants.NOTIFICATION_BODY +import com.personalization.features.notification.domain.model.NotificationConstants.NOTIFICATION_EVENT +import com.personalization.features.notification.domain.model.NotificationConstants.NOTIFICATION_ICON +import com.personalization.features.notification.domain.model.NotificationConstants.NOTIFICATION_IMAGE +import com.personalization.features.notification.domain.model.NotificationConstants.NOTIFICATION_PARAM_ID +import com.personalization.features.notification.domain.model.NotificationConstants.NOTIFICATION_TITLE +import com.personalization.features.notification.domain.model.NotificationConstants.TYPE_PARAM +import com.personalization.features.notification.domain.model.NotificationData + +fun Intent.toNotificationData(): NotificationData { + val id = getStringExtra(NOTIFICATION_PARAM_ID) + val title = getStringExtra(NOTIFICATION_TITLE) + val body = getStringExtra(NOTIFICATION_BODY) + val icon = getStringExtra(NOTIFICATION_ICON) + val type = getStringExtra(TYPE_PARAM) + val actionsJson = getStringExtra(NOTIFICATION_ACTIONS) + val actionUrlsJson = getStringExtra(NOTIFICATION_ACTION_URLS) + val image = getStringExtra(NOTIFICATION_IMAGE) + val eventJson = getStringExtra(NOTIFICATION_EVENT) + + return NotificationData( + id = id, + title = title, + body = body, + icon = icon, + type = type, + actions = parseNotificationActions(actionsJson), + actionUrls = parseActionUrls(actionUrlsJson), + image = image, + event = parseNotificationEvent(eventJson) + ) +} diff --git a/personalization-sdk/src/main/kotlin/com/personalization/features/notification/data/service/NotificationService.kt b/personalization-sdk/src/main/kotlin/com/personalization/features/notification/data/service/NotificationService.kt index 28f3f00d..b4223d0e 100644 --- a/personalization-sdk/src/main/kotlin/com/personalization/features/notification/data/service/NotificationService.kt +++ b/personalization-sdk/src/main/kotlin/com/personalization/features/notification/data/service/NotificationService.kt @@ -6,10 +6,8 @@ import android.os.IBinder import android.widget.Toast import com.personalization.di.AppModule import com.personalization.di.DaggerSdkComponent +import com.personalization.features.notification.data.mapper.toNotificationData import com.personalization.features.notification.domain.model.NotificationConstants.CURRENT_IMAGE_INDEX -import com.personalization.features.notification.domain.model.NotificationConstants.NOTIFICATION_BODY -import com.personalization.features.notification.domain.model.NotificationConstants.NOTIFICATION_IMAGES -import com.personalization.features.notification.domain.model.NotificationConstants.NOTIFICATION_TITLE import com.personalization.features.notification.domain.model.NotificationData import com.personalization.features.notification.presentation.helpers.NotificationHelper import com.personalization.features.notification.presentation.helpers.NotificationImageHelper @@ -47,33 +45,37 @@ class NotificationService : Service() { startId: Int ): Int { val currentIndex = intent?.getIntExtra(CURRENT_IMAGE_INDEX, -1) ?: -1 - val images = intent?.getStringExtra(NOTIFICATION_IMAGES) - val title = intent?.getStringExtra(NOTIFICATION_TITLE) - val body = intent?.getStringExtra(NOTIFICATION_BODY) - - if (!isValidNotificationData(images, title, body, currentIndex)) { - showToast( - message = applicationContext.getString( - /* resId = */ NOTIFICATION_LOADING_DATA_ERROR - ) - ) - stopSelf(startId) - return START_NOT_STICKY + val data: NotificationData? = intent?.toNotificationData() + + if (!isValidNotificationData(data?.image, data?.title, data?.body, currentIndex)) { + return onStopService(startId = startId) } - updateNotification( - images = images, - title = title, - body = body, - currentIndex = currentIndex, - startId = startId - ) + when { + data != null -> updateNotification( + data, + currentIndex = currentIndex, + startId = startId + ) + + else -> onStopService(startId) + } return START_NOT_STICKY } override fun onBind(intent: Intent?): IBinder? = null + private fun onStopService(startId: Int): Int { + showToast( + message = applicationContext.getString( + /* resId = */ NOTIFICATION_LOADING_DATA_ERROR + ) + ) + stopSelf(startId) + return START_NOT_STICKY + } + override fun onDestroy() { super.onDestroy() serviceJob.cancel() @@ -89,21 +91,25 @@ class NotificationService : Service() { } private fun updateNotification( - images: String?, - title: String?, - body: String?, + data: NotificationData, currentIndex: Int, startId: Int ) { serviceScope.launch { try { - val (loadedImages, hasError) = NotificationImageHelper.loadBitmaps(urls = images) + val (loadedImages, hasError) = NotificationImageHelper.loadBitmaps(urls = data.image) notificationHelper.createNotification( context = this@NotificationService, data = NotificationData( - title = title, - body = body, - images = images + id = data.id, + title = data.title, + body = data.body, + icon = data.icon, + type = data.type, + actions = data.actions, + actionUrls = data.actionUrls, + image = data.image, + event = data.event, ), images = loadedImages, currentImageIndex = currentIndex, diff --git a/personalization-sdk/src/main/kotlin/com/personalization/features/notification/presentation/helpers/NotificationNavigationHelper.kt b/personalization-sdk/src/main/kotlin/com/personalization/features/notification/presentation/helpers/NotificationNavigationHelper.kt index 2cb0bca8..9baf025b 100644 --- a/personalization-sdk/src/main/kotlin/com/personalization/features/notification/presentation/helpers/NotificationNavigationHelper.kt +++ b/personalization-sdk/src/main/kotlin/com/personalization/features/notification/presentation/helpers/NotificationNavigationHelper.kt @@ -6,7 +6,7 @@ import android.content.Intent import com.personalization.features.notification.data.service.NotificationService import com.personalization.features.notification.domain.model.NotificationConstants.CURRENT_IMAGE_INDEX import com.personalization.features.notification.domain.model.NotificationConstants.NOTIFICATION_BODY -import com.personalization.features.notification.domain.model.NotificationConstants.NOTIFICATION_IMAGES +import com.personalization.features.notification.domain.model.NotificationConstants.NOTIFICATION_IMAGE import com.personalization.features.notification.domain.model.NotificationConstants.NOTIFICATION_TITLE import com.personalization.features.notification.domain.model.NotificationData import java.util.concurrent.atomic.AtomicInteger @@ -27,7 +27,7 @@ object NotificationNavigationHelper { putExtra(CURRENT_IMAGE_INDEX, newIndex) putExtra(NOTIFICATION_TITLE, data.title) putExtra(NOTIFICATION_BODY, data.body) - putExtra(NOTIFICATION_IMAGES, data.images) + putExtra(NOTIFICATION_IMAGE, data.image) } return PendingIntent.getService( @@ -44,7 +44,7 @@ object NotificationNavigationHelper { ): PendingIntent { val retryIntent = Intent(context, NotificationService::class.java).apply { putExtra(CURRENT_IMAGE_INDEX, 0) - putExtra(NOTIFICATION_IMAGES, data.images) + putExtra(NOTIFICATION_IMAGE, data.image) putExtra(NOTIFICATION_TITLE, data.title) putExtra(NOTIFICATION_BODY, data.body) } diff --git a/personalization-sdk/src/rees46/kotlin/com/rees46/sdk/REES46.kt b/personalization-sdk/src/rees46/kotlin/com/rees46/sdk/REES46.kt index b506fd14..17d40a41 100644 --- a/personalization-sdk/src/rees46/kotlin/com/rees46/sdk/REES46.kt +++ b/personalization-sdk/src/rees46/kotlin/com/rees46/sdk/REES46.kt @@ -58,14 +58,20 @@ class REES46 private constructor() : SDK() { sdk.setOnMessageListener { data -> coroutineScope.launch { val (images, hasError) = withContext(Dispatchers.IO) { - NotificationImageHelper.loadBitmaps(urls = data.images) + NotificationImageHelper.loadBitmaps(urls = data.image) } sdk.notificationHelper.createNotification( context = context, data = NotificationData( + id = data.id, title = data.title, body = data.body, - images = data.images + icon = data.icon, + type = data.type, + actions = data.actions, + actionUrls = data.actionUrls, + image = data.image, + event = data.event, ), images = images, hasError = hasError diff --git a/sample/src/main/kotlin/com/personalization/sample/AbstractMainActivity.kt b/sample/src/main/kotlin/com/personalization/sample/AbstractMainActivity.kt index 7fac1a29..463e1b16 100644 --- a/sample/src/main/kotlin/com/personalization/sample/AbstractMainActivity.kt +++ b/sample/src/main/kotlin/com/personalization/sample/AbstractMainActivity.kt @@ -16,15 +16,7 @@ import androidx.core.app.ActivityCompat import com.personalization.OnClickListener import com.personalization.Product import com.personalization.SDK -import com.personalization.features.notification.domain.model.NotificationConstants.NOTIFICATION_BODY -import com.personalization.features.notification.domain.model.NotificationConstants.NOTIFICATION_IMAGES -import com.personalization.features.notification.domain.model.NotificationConstants.NOTIFICATION_TITLE -import com.personalization.features.notification.domain.model.NotificationData -import com.personalization.features.notification.presentation.helpers.NotificationImageHelper.loadBitmaps import com.personalization.stories.views.StoriesView -import kotlinx.coroutines.CoroutineScope -import kotlinx.coroutines.Dispatchers -import kotlinx.coroutines.launch abstract class AbstractMainActivity internal constructor( private val sdk: SDK @@ -43,7 +35,6 @@ abstract class AbstractMainActivity internal constructor( initializingStoriesView() initializingFragmentManager() handleInAppNotifications() - handlePushNotification() } private fun handlePermissions() { @@ -123,29 +114,4 @@ abstract class AbstractMainActivity internal constructor( ) } } - - private fun handlePushNotification() { - findViewById