Android vendors, don’t kill my app
331–340 of 414 posts
Re: Android vendors, don’t kill my app
#332Earlier quoted context omitted.
Would it be possible to detect that the app was killed while engaged in such a situration as yours, i.e. similar how to systemd detects killed apps with a keepalive ping written to the fs while engaged. Then on the next boot explain that you detected this, and guide the user to OP's page? Or is it way more complicated than so?
There is a way to detect it but it's hacky. You need to use fcm xmpp to send data push notifications with delivery receipts and also send an acknowledgement from the apps background service. Devices where you don't get the app ack have an app which is force killed Details outlined here : hackernoon.com/notifications-in-android-are-horribly-broken-b8dbec63f48a
Re: Android vendors, don’t kill my app
#333Earlier quoted context omitted.
No, it’s the consequence of permitting background tasks at will. Apple took some heat, and there is learning curve associated with doing it their way, but they actually thought it through and created an energy-efficient architecture that addresses common use cases. And apps that don’t fit those use cases - what are they doing with your device?
Can I run XMPP or IRC on an iphone by now or does it still only receive messages when foregrounded?
Re: Android vendors, don’t kill my app
#334Earlier quoted context omitted.
As TFA notes (in the Nokia section, possibly others): > This app kills apps in the most brutal way we have seen so far among Android vendors. You can't detect that your application was kill -9'd. I don't think you can detect that "PowerSavingAppG3" is running either (I'd guess it's running as root and you're not), so you can't even infer from its existence that your application will be traumatically killed in short o…
Sure you can: 1. Create an empty file when the application launches 2. When the application terminates, write the reason for termination into the file. 3. When the app launches again, read the file. If it was empty, then you were SIGKILL'd, or you crashed.
You might be able to write the word "bad" in a file, and then clear the file if your app closes nicely. If you start and find the word "bad" in the file, then you know you were killed. A slight variation of what you suggested.
Re: Android vendors, don’t kill my app
#335Earlier quoted context omitted.
Sure you can: 1. Create an empty file when the application launches 2. When the application terminates, write the reason for termination into the file. 3. When the app launches again, read the file. If it was empty, then you were SIGKILL'd, or you crashed.
A kill -9 wouldn't give you a chance to write the reason for termination to a file. It's the equivalent of the OS saying "you have already run your last CPU cycle, you will receive zero more CPU cycles, good bye". You might be able to write the word "bad" in a file, and then clear the file if your app closes nicely. If you start and find the word "bad" in the file, then you know you were killed. A slight variation of…
Re: Android vendors, don’t kill my app
#336Earlier quoted context omitted.
Sure you can: 1. Create an empty file when the application launches 2. When the application terminates, write the reason for termination into the file. 3. When the app launches again, read the file. If it was empty, then you were SIGKILL'd, or you crashed.
A kill -9 wouldn't give you a chance to write the reason for termination to a file. It's the equivalent of the OS saying "you have already run your last CPU cycle, you will receive zero more CPU cycles, good bye". You might be able to write the word "bad" in a file, and then clear the file if your app closes nicely. If you start and find the word "bad" in the file, then you know you were killed. A slight variation of…
Re: Android vendors, don’t kill my app
#337Earlier quoted context omitted.
As TFA notes (in the Nokia section, possibly others): > This app kills apps in the most brutal way we have seen so far among Android vendors. You can't detect that your application was kill -9'd. I don't think you can detect that "PowerSavingAppG3" is running either (I'd guess it's running as root and you're not), so you can't even infer from its existence that your application will be traumatically killed in short o…
Sure you can: 1. Create an empty file when the application launches 2. When the application terminates, write the reason for termination into the file. 3. When the app launches again, read the file. If it was empty, then you were SIGKILL'd, or you crashed.
"Might have been killed, might have crashed" is not helpful, and the inability to know is the very issue at hand here. You can't know whether your application crashed, the user forcefully killed it or you fell afoul a background killer. What now, do you start spamming the user anyway?
Re: Android vendors, don’t kill my app
#338Re: Android vendors, don’t kill my app
#339Earlier quoted context omitted.
A kill -9 wouldn't give you a chance to write the reason for termination to a file. It's the equivalent of the OS saying "you have already run your last CPU cycle, you will receive zero more CPU cycles, good bye". You might be able to write the word "bad" in a file, and then clear the file if your app closes nicely. If you start and find the word "bad" in the file, then you know you were killed. A slight variation of…
Which is why the absence of a reason in the file is indication it was killed.
Re: Android vendors, don’t kill my app
#340Earlier quoted context omitted.
I wouldn't say so. I got my grandma a cheap Android phone and a book to help her learn because I thought it'd be better since I also have Android and can help her. My grandma is 89 now, she uses Whatsapp, Youtube and whatnot and I am not kidding but within 2 months she had: - AVG antivirus (an ad told her she had a virus) - She had batterylife for 7 hours before a charge was needed due to shitty apps - Ads on her loc…
A cheap phone has worse functionality than an expensive* one? Forgive the snark but this comparison doesn't make sense to me. *Speaking in terms of launch MSRP.
The important part was that the 4 year old iPhone 5s had the latest iOS and still works better than a new €250 Android.