Killing background tasks is great and Android does that automatically to save battery usage. But these manufacturers have implemented their own functionality on top of Android which cripples even critical messaging applications like WhatsApp, Slack, Gmail by not delivering Instant Messages notifications instantly.
And worse, what they're doing confuses android's own code into thinking the apps are crashy.
So if you run e.g. (new JobInfo.Builder(1234, name)).setRequiresCharging(true).setRequiresDeviceIdle(true)... to do something heavy (like reindexing an on-device database) while the phone is charging, that job will simply not be run on some phones. You have to check whether it's been run at app startup, and if necessary run it while the user is actively using your app.
I don't want WhatsApp (owned by Facebook) to run in the background on my phone at all times. I don't trust them, especially after Instagram (also owned by Facebook) started using the camera by itself on my phone, without my permission.
I think you misunderstood the core issue here - it's not that the USER can decide what runs. It's that the USER cannot override those settings and decide that something can run and function if required. There are special whitelists for apps that are allowed exceptions (e.g. Facebook and other common apps are usually allowed to work) and others are killed against the Android API guarantees (e.g. you install Signal messaging app and you don't receive messages because Huawei didn't whitelist the app).
> I think you misunderstood the core issue here - it's not that the USER can decide what runs. It's that the USER cannot override those settings and decide that something can run and function if required. There are special whitelists for apps that are allowed exceptions (e.g. Facebook and other common apps are usually allowed to work) and others are killed against the Android API guarantees (e.g. you install Signal messaging app and you don't receive messages because Huawei didn't whitelist the app).
I blame it on stock Android. Phone manufacturers probably don't want to spend money on OS changes but Android doesn't do the right thing by default so they have to make changes.
The right thing to do is to deny apps launching at startup, apps running in background, and apps getting network access. Let the user say yes or no. Your use case for signal is different from mine. Maybe I just want to see messages when I open the app?
The irony: Many manufacturers factory-whitelist apps like WhatsApp, Skype, sometimes Telegram. That means that smaller messengers get killed (=no more new message notifications) and users complain to the developer because "with WhatsApp everything works fine"...
These days the app doesn’t run in the background when receiving an FCM push notification (unless it’s already awake). The message is created by a separate Google Play Services process. It’s only when you click the notification does the target app’s process get woken up.
IMO, the best way to solve this is with an explicit “Let this app run in the background” permission, rather than implementing all these “smart” features which are incredibly non-deterministic. Which leads to developer & user frustration alike.
Take the example of the new “App Bucketing” battery saving feature in Android 9, plus a banking app and WhatsApp....
App Bucketing will basically restrict your background processing based on how often you interact with the app. So for your banking app (where you usually want immediate spending notifications), because you don’t really open the app that often, it’s going to start throttling your notifications (and prevent it from running arbitrary background jobs).
But for WhatsApp on the other hand - because you’ll likely open it more often - it will have full permissions to run in the background any time.
If as a user you wanted to prevent arbitrary WhatsApp background jobs and get instant banking notifications - well tough luck!
I want all the notifications. This was a question about timing. I don't want them to do the constant polling required for the notifications to appear instantly.