package com.safecheckin.app

import android.app.Application
import android.app.NotificationChannel
import android.app.NotificationManager
import android.os.Build
import com.safecheckin.app.service.CheckInNotificationService
import com.safecheckin.app.service.CheckInWorker
import com.safecheckin.app.utils.NotificationHelper

class SafeCheckInApp : Application() {
    
    companion object {
        const val STATUS_CHANNEL_ID = "status_channel"       // 常驻状态通知渠道
        const val REMINDER_CHANNEL_ID = "reminder_channel"   // 提醒通知渠道
        const val WARNING_CHANNEL_ID = "warning_channel"     // 预警通知渠道
    }

    override fun onCreate() {
        super.onCreate()
        // Create notification channels
        NotificationHelper.createNotificationChannels(this)
        // Schedule periodic check worker
        CheckInWorker.schedule(this)
        // Start foreground notification service
        CheckInNotificationService.start(this)
    }
}