Answers for "stop foregorund servicee"

3

stop foregorund service

stopForeground(true)
stopSelf()
closenotification()


private fun closeNotification(){
val notificationManager = getSystemService(Context.NOTIFICATION_SERVICE) as NotificationManager
notificationManager.cancelAll()
}
Posted by: Guest on July-13-2021

Browse Popular Code Answers by Language