This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** You should start the service by calling | |
* [startForegroundService] for API >= [Build.VERSION_CODES.O] to be certain that the Android will | |
* not try to kill your service so soon. */ | |
class SomeService : Service() { | |
private val serviceBinder = PrepareBackupBinder() | |
override fun onCreate() { | |
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.O) { | |
createSomeNotificationChannel() |