Sorry for the sort of click-bait title; I couldn't think of a more concise way to say it.
In Android 13, if the user doesn't grant the "dangerous" POST_NOTIFICATION
permission, then Foreground Service notifications are not shown in the Notification Drawer. Instead, for the user to see it, they have to navigate to the new Foreground Services Task Manager, according to the documentation:
If the user denies the notification permission, they still see notices related to these foreground services in the Foreground Services (FGS) Task Manager but don't see them in the notification drawer.
Now I haven't used the Android 13 Beta so I don't know exactly how "in the face" the FGS Task Manager will be when Foreground Services are running, but I thought the entire point of forcing Foreground Services to have a notification was so that the user would be aware when the application was running. This even has security consequences because Android restricts what background v.s. foreground processes can do using dangerous permissions (e.g. ACCESS_BACKGROUND_LOCATION
). This change essentially allows an app to use foreground based permissions without clearly notifiying the user.
So, why did they decide to restrict Foreground Service notifications? I mean there is a whole other discussion about the addition of restricting notifications in the first place. But one would think that if Android forces you to use a notification, then there shouldn't be a way to get around it (i.e. never request the POST_NOTIFICATION
permission or even just remove the permission programatically).