What is the "Uncategorized" Android Notification Channel and when does it appear?
Asked Answered
G

3

12

While transitioning an application to Android O, I have noticed a strange thing. Sometimes my foreground service notification goes into a channel that I have not made, called "Uncategorized". I have no idea how or when this happens.

The channels are always created before the notifications start being posted, and the ID of the channel is correct. I have tried putting in a random String as the channel ID to see if I could reproduce the issue, but the notification just doesn't get posted in that case. So it seems to be some weird case when the channel was already created before.

This is the channel's page:

Uncategorized channel page

And this is the channel appearing in the list of all channels of the app (note, I have removed the icon for privacy reasons).

The channel presented in the list of all channels

Does anyone have any experience with this and could they explain when this can happen? Unfortunately, I found no documentation regarding this, and heard nothing about it in the Google I/O talks.

Gildagildas answered 3/8, 2017 at 14:59 Comment(1)
Play Store also has this behaviour: androidpolice.com/2017/08/03/…Overstock
K
5

I think this is what happens if a part of your app does not support notification channel it seems.

Specifically in our case, if a SDK of ours is notification channel capable, but an app targets 25 and uses legacy features. We will always have legacy app notification go to that Uncategorized channel.

I can imagine there are other cases where the OS decides you need this channel because the OS thinks not everything is migrated properly. Do you have a targetSDK of 26 for the entire app with forced 26.0.1 support libs?

Krystakrystal answered 25/8, 2017 at 17:56 Comment(2)
Hi, thanks for the answer! We do, we are using API 26 for the target and version 26 of the support lib. I'll try posting a notification without specifying a notification channel, to see if that changes anything.Gildagildas
Hmm if that is the case, it should be different, if you target 26 then the notification should be hidden and not shown at all. Maybe some sort of edge case then. Try to change target to 25 and show a notification without it and with it. But that likely is not your case.Krystakrystal
D
0

When I changed my target SDK to API Level 27 in my app I longer saw the Uncategorized category.

Dhow answered 28/4, 2018 at 17:5 Comment(0)
C
0

When changing the minSDK to >= API Level 26, the "uncategorized" notification channel is no longer created.

I have found this result by manually trying different minSDK values. (I initially had minSDK set to API level 24)

build.gradle file :

defaultConfig {
       minSdk = // change to >= 26
}
Conan answered 13/11, 2023 at 11:35 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.