Loading app/src/main/java/io/heckel/ntfy/service/SubscriberService.kt +0 −16 Original line number Diff line number Diff line Loading @@ -4,7 +4,6 @@ import android.app.* import android.content.BroadcastReceiver import android.content.Context import android.content.Intent import android.content.pm.ServiceInfo import android.os.Build import android.os.IBinder import android.os.PowerManager Loading Loading @@ -89,21 +88,6 @@ class SubscriberService : Service() { Log.init(this) // Init logs in all entry points Log.d(TAG, "Subscriber service has been created") val title = getString(R.string.channel_subscriber_notification_title) val text = if (BuildConfig.FIREBASE_AVAILABLE) { getString(R.string.channel_subscriber_notification_instant_text) } else { getString(R.string.channel_subscriber_notification_noinstant_text) } notificationManager = createNotificationChannel() serviceNotification = createNotification(title, text) if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.UPSIDE_DOWN_CAKE) { startForeground(NOTIFICATION_SERVICE_ID, serviceNotification!!, ServiceInfo.FOREGROUND_SERVICE_TYPE_SPECIAL_USE) } else { startForeground(NOTIFICATION_SERVICE_ID, serviceNotification) } } override fun onDestroy() { Loading app/src/main/java/io/heckel/ntfy/service/SubscriberServiceManager.kt +1 −1 Original line number Diff line number Diff line Loading @@ -55,7 +55,7 @@ class SubscriberServiceManager(private val context: Context) { Log.d(TAG, "ServiceStartWorker: Starting foreground service with action $action (work ID: ${id})") Intent(context, SubscriberService::class.java).also { it.action = action.name ContextCompat.startForegroundService(context, it) context.startService(it) } } return Result.success() Loading Loading
app/src/main/java/io/heckel/ntfy/service/SubscriberService.kt +0 −16 Original line number Diff line number Diff line Loading @@ -4,7 +4,6 @@ import android.app.* import android.content.BroadcastReceiver import android.content.Context import android.content.Intent import android.content.pm.ServiceInfo import android.os.Build import android.os.IBinder import android.os.PowerManager Loading Loading @@ -89,21 +88,6 @@ class SubscriberService : Service() { Log.init(this) // Init logs in all entry points Log.d(TAG, "Subscriber service has been created") val title = getString(R.string.channel_subscriber_notification_title) val text = if (BuildConfig.FIREBASE_AVAILABLE) { getString(R.string.channel_subscriber_notification_instant_text) } else { getString(R.string.channel_subscriber_notification_noinstant_text) } notificationManager = createNotificationChannel() serviceNotification = createNotification(title, text) if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.UPSIDE_DOWN_CAKE) { startForeground(NOTIFICATION_SERVICE_ID, serviceNotification!!, ServiceInfo.FOREGROUND_SERVICE_TYPE_SPECIAL_USE) } else { startForeground(NOTIFICATION_SERVICE_ID, serviceNotification) } } override fun onDestroy() { Loading
app/src/main/java/io/heckel/ntfy/service/SubscriberServiceManager.kt +1 −1 Original line number Diff line number Diff line Loading @@ -55,7 +55,7 @@ class SubscriberServiceManager(private val context: Context) { Log.d(TAG, "ServiceStartWorker: Starting foreground service with action $action (work ID: ${id})") Intent(context, SubscriberService::class.java).also { it.action = action.name ContextCompat.startForegroundService(context, it) context.startService(it) } } return Result.success() Loading