package com.gacy.android import android.app.Application import android.app.NotificationChannel import android.app.NotificationManager import android.os.Build class GaCyApplication : Application() { companion object { const val CHANNEL_ID = "gacy_server_channel" const val CHANNEL_NAME = "GaCy Server Service" lateinit var instance: GaCyApplication private set } override fun onCreate() { super.onCreate() CrashTracker.init(this) CrashTracker.breadcrumb(this, "GaCyApplication: onCreate") instance = this createNotificationChannel() } private fun createNotificationChannel() { if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.O) { val channel = NotificationChannel( CHANNEL_ID, CHANNEL_NAME, NotificationManager.IMPORTANCE_LOW ).apply { description = "Background service for GaCy Game Server & Proxy" setShowBadge(false) } val manager = getSystemService(NotificationManager::class.java) manager?.createNotificationChannel(channel) } } }