package com.remax.notification.newUtil.events

import android.content.BroadcastReceiver
import android.content.Context
import android.content.Intent
import com.remax.notification.check.NotificationCheckController
import com.remax.notification.timing.NotificationTimingController




class AppInstallReceiver : BroadcastReceiver() {

    override fun onReceive(context: Context?, intent: Intent?) {
        when (intent?.action) {
            Intent.ACTION_PACKAGE_ADDED, Intent.ACTION_PACKAGE_REPLACED, Intent.ACTION_PACKAGE_REMOVED -> {
                NotificationTimingController.getInstance()
                    .triggerNotificationIfAllowed(NotificationCheckController.NotificationType.APPINSTALL)
            }
        }
    }
}