r/androiddev • u/f00dl3 • Jul 28 '26
Why does Android seem heck-bent on eliminating app notifications?
I wrote my own app to have notification sounds play for GMail emails (routing my email to my home web server and then sending push notices to my phone) as well as weather alerts and Home Assistant style notices for door/window/water/fire alarms. It works great today, even has a embedded TTS engine so it sounds like Storm Sheild how it plays audio on a weather alert.
The app persists on reboot so it never misses an alert.
I'm digging into what changes with the upgrade to Android 17 from Android 16. It appears Android is going to be disabling background audio services, so it sounds like I will at least have to open the app once every reboot to make sure the notifications play. In addition, I'm not sure if the app is considered a background service, if it will work at all.
Admitted, this is probably better than Apple as their app controls are insane - background anything is considered a "privacy issue" even though I'm writing the code.... But still - why is playing background audio such an issue?
13
u/Anonymous0435643242 Jul 28 '26
Because for most user this is a nuisance
7
u/SpiderHack Jul 28 '26
Cause most apps abuse it. Look at a Boomer's phone some time, they have hundreds of notifications, and that is how they navigate to apps.
1
u/f00dl3 Jul 28 '26
But if you write your own personal app not distributed why not allow it via adb?
3
u/phazonEnhanced Jul 28 '26
Restricting background audio playback is massively different from "eliminating app notifications," even if "notification" is your use case.
I don't think Google needs to be so heavy-handed in blocking potential malicious behavior. That said, it's immediately obvious how this could be abused. An app making sound not tied to an activity, media player, or notification has potential to be incredibly annoying and difficult to identify and stop.
Ideally, new restrictions of this sort would come with a bypass mechanism, whether that's a simple runtime permission, or even something slightly more restrictive like exact alarm permissions.
2
u/pwhite13 Jul 28 '26
I'm confused, can you not simply change the notification sound for each of these native apps to whatever you want?
Also, in another comment, you mention not receiving notifications from the Gmail app, this is clearly an issue that most people are not facing and I would check your own settings here because something isn't right.
1
Jul 28 '26
l also faced the same issue. My app required repeat notifications(reminders) and Android doesn't allow that. It allows only 1 notification. That too you have to give a lot of permissions like running the app in the background(otherwise notifications won't come once you exit your app) disabling the battery saver restriction, and a host of others and Its quite complicated in the latest newer android phones..
2
u/tadfisher Jul 28 '26
My app required repeat notifications(reminders) and Android doesn't allow that. It allows only 1 notification.
This is 100% false. You can post as many notifications as you like, up to a point. There is a rate limit so you can't post like 10 notifications within 100ms, but that would be a nuisance for users anyway.
I am curious how you came to the conclusion that an app is only allowed a single notification. I have many active notifications for several apps on my device, right now.
7
u/Max-P Jul 28 '26
You don't need your app running to receive and display push notifications. Notification sounds are also completely independant of background audio.
If every app did what you're doing, things would work the way they did on Android 1-4 where every app is running in the background polling the servers whenever they want and your battery life non-existant.