user3412355
user3412355

Reputation: 53

Android 8 Foreground Service with Notification Channel

I want to start a foreground service in Android 8 and I want to know how are foreground services compatible with the notification channel system.

Let's say we start a foreground service, then we immediately create the required notification and assign it to a notification channel. Suddenly, the user decides to go into System Settings and disable the notification channel.

What happens in this case? Will the service become a background service? Does it get killed? I haven't found a documented answer.

Upvotes: 4

Views: 1203

Answers (1)

Moncef AOUDIA
Moncef AOUDIA

Reputation: 687

Default notification settings:

enter image description here

Foreground service notification: enter image description here

Disable notifications:

enter image description here

Android 8 shows this notification after few seconds (when you send your application to background):

enter image description here

Upvotes: 4

Related Questions