mirror of
https://github.com/screentinker/screentinker.git
synced 2026-05-15 07:32:23 -06:00
ScreenTinker - open source digital signage management software. MIT License, all features included, no license gates. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
35 lines
999 B
Kotlin
35 lines
999 B
Kotlin
package com.remotedisplay.player
|
|
|
|
import android.app.Application
|
|
import android.app.NotificationChannel
|
|
import android.app.NotificationManager
|
|
import android.os.Build
|
|
|
|
class RemoteDisplayApp : Application() {
|
|
|
|
companion object {
|
|
const val CHANNEL_ID = "remote_display_service"
|
|
const val CHANNEL_NAME = "ScreenTinker Service"
|
|
}
|
|
|
|
override fun onCreate() {
|
|
super.onCreate()
|
|
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 = "ScreenTinker background service"
|
|
setShowBadge(false)
|
|
}
|
|
val manager = getSystemService(NotificationManager::class.java)
|
|
manager.createNotificationChannel(channel)
|
|
}
|
|
}
|
|
}
|