Live data from Hacker News

Android vendors, don’t kill my app

dontkillmyapp.com

251–260 of 414 posts

Re: Android vendors, don’t kill my app

#251

Earlier quoted context omitted.

Does Android not have the concept of “local notifications” where you can tell the OS to schedule a notification to be sent to the app to wake it up instead of being in the background the whole time?

It does - the one that works properly is https://developer.android.com/reference/android/app/AlarmMan... However, the implementations of the API are questionable. Some calls to that API on some OEMs device round alarms to the nearest minute, some to the nearest ten minutes.

> Some calls to that API on some OEMs device round alarms to the nearest minute, some to the nearest ten minutes.

WHY? What benefit does that serve?

Re: Android vendors, don’t kill my app

#252
post #193

Earlier quoted context omitted.

Can I run XMPP or IRC on an iphone by now or does it still only receive messages when foregrounded?

Getting messages should not/does not have anything to do with running in the background.

Receiving messages (aka "listening" in server jargon) is essentially a background task, constantly probing to check for any changes.

Re: Android vendors, don’t kill my app

#253
post #225

Earlier quoted context omitted.

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.

Just as an example, only chat/messenger apps on my Oneplus with saver enabled (default): - Skype - always killed - Slack - always killed - Whatsapp - sometimes killed, rarely - Telegram - never killed - FB Messenger - never killed All these are fully featured apps with tons of different functionality. Telegram and FBM never ever trigger "this app is draining your battery" while Skype triggers it regularly when I some…

Those apps are explicitly whitelisted by OnePlus. There's nothing to "fix" they're by the app developer, because the killing algorithm chooses based on app name, not app battery consumption. Facebook can kill your whole battery and you'll never get a warning.

Re: Android vendors, don’t kill my app

#254
post #193

Earlier quoted context omitted.

Can I run XMPP or IRC on an iphone by now or does it still only receive messages when foregrounded?

Getting messages should not/does not have anything to do with running in the background.

If you want a messaging app to work well, it should send and receive messages when the phone has network connectivity and power. Power is a prerequisite for running in the foreground, but network connectivity is not. Some people may in fact want messaging apps to only work while in the foreground and network available, but I suspect that's less desired.

If you're trying to run standard irc and appear online as much as possible, that's not going to work in iOS without a bouncer to stay online for you and send push messages to send notifications and allow the app to run for a bit to download the messages.

It's probably not a bad idea on Android too, it's technically possible to run as a background service and stay connected, but there's a lot of uncertainty, because other services can crowd you out, and you're at the whim of Google and oems with power management these days.

Re: Android vendors, don’t kill my app

#255
post #58

This is the Android multitasking lead finally coming fully circle. Android had multi tasking much earlier and in a more powerful way by allowing apps to start their own serivices and do pretty much whatever they wanted, but this is the unfortunate logical result - apps that agressively kill other apps, installed by the handset manufacturers, to protect users from badly written apps that drain the battery in the servi…

pretext

Re: Android vendors, don’t kill my app

#256

https://dontkillmyapp.com/samsung > Yes, even Samsung - a dominant vendor in the Android market - is using nasty battery saving technique which may kill background processes and render alarm clocks useless. See below for workarounds. Wait, do you really need a background task for alarms? (why) isn't there a system-level service to notify and wake up your app at a pre-defined time or interval?

The whole damn page you're commenting on exists because those APIs are broken by OEMs. You schedule execution, the alarm doesn't trigger. Did you look at the page before commenting? :(

Re: Android vendors, don’t kill my app

#257
post #83

Earlier quoted context omitted.

> Why do I still have to grant an application all the permissions it requests when I install it instead of being able to turn them on or off individually? I don't think this is true in the later releases is it? I get a lot more ad-hoc permission requests these days, and there's much more control in the application settings (the android app settings, not the settings the app presents).

That is the case in iOS. All permissions are optional and the app must gracefully degrade if permissions are denied.

Unfortunately, some apps just degrade, ungracefully, by flat out refusing to run without certain permissions.

Re: Android vendors, don’t kill my app

#258
Interesting - I recently got myself an S9 and my wife a OnePlus 6T, and the OnePlus gets much better battery life (with fewer apps and overall lighter usage) - but now I'm not so impressed if that's how it's achieved.

It's a fairly divisive issue - I can understand developers getting frustrated if their app's functionality is broken, but I do think this should be more in the user's control. A permissions-based model for backgrounding would be better, but there's too much permission prompting as well on Android (and this is something you can't back up - so on any restore, you're left 'allowing' permissions in every app you use in a new way - yes, when I select the camera mode in an app, I want to allow use of the camera - gets tedious across a bunch of different apps).

My S9 (or maybe it's just Android) also puts a notification up if an app continues to run when I click 'back' out of it (or some other heuristic - it's not for every app, but it does a good job of identifying which are running) - which I think is a better compromise. It makes it much more visible which apps are consuming resources, and tapping the notification takes me to the App Info page with the 'Force Stop' button at the top. It's a bit noisy (it appears even for the stock music player, where obviously I want that to continue running), but it serves well as forcing visibility of battery hogs (whether it's through incompetence or nefarious background data collection), and reassuring to see it there for the apps I want running in the background. I would rather see more of this sort of visibility - maybe as well as just overall battery usage, the battery use in settings should show battery usage by apps when the screen is off or the app is not in the foreground. As the device owner, I want to be in charge of which apps get that privilege.

Re: Android vendors, don’t kill my app

#259

For our Zombies, Run! run tracking/audio adventure app, "battery management" is turning into our most consistent customer complaint, to the point where it's impacting review scores, active users, and probably subscriptions. The result of the changes made by Huawei, OnePlus, Xiaomi, and Samsung mean that our app is killed during runs, and people interpret that as the app crashing. We're trying to figure out the best w…

>We're trying to figure out the best way of telling users how to change their battery settings

The best way to do that is to remotely figure out on which devices the app is getting killed by sending data push notification messages and an in-app ack mechanism. And then show users an annoying popup message the next time they launch to make sure that they whitelist the app. We faced the same problem while building Flock, a team messenger and the details are outlined here.

https://hackernoon.com/notifications-in-android-are-horribly...

Re: Android vendors, don’t kill my app

#260
post #42

The default mail app on my recent-ish Samsung flagship phone notifies me of new email anywhere from 30 minutes to 1 hour late. I used to depend on K9 Mail for business on the go, but it was even worse: notifications were often several hours late. Android was dropping the IMAP connection and not allowing the app to reconnect for a routine poll. There doesn't seem to be any general-purpose email app on Android that can…

The social media apps will almost certainly use Googles push notification service, which is the only background notification allowed. Your imap client is trying to hold a TCP connection open to your server, which isn't allowed. There's a good reason the phone doesn't allow that. Firstly, the push notification service can be waiting for a notification for an app while the app is entirely unloaded from RAM. Hundreds of…

Do you know of anywhere, where this is all explained? Like the idea of recording average timeouts by ISP?
Post reply on HN