One of my apps uses a service, and in the first versions I was getting some complaints about the app not working. So I added an option to make the service a foreground service (default, with a text saying that it was needed for proper operation on some phones but that it might affect battery life). This decreased reliablility complaints somewhat, but working back and forth with a couple of the complainers I found that (I think with lower grade phones and/or loaded with many other service apps) my service was sometimes getting killed by the system in order to conserve resources. A service, even a foreground service has no guarantee of immortality and IMHO needs to be backed up by a periodic alarm. This was my ultimate (so far) fix and seems to have pretty much made everybody happy! On Oct 17, 2013 10:24 AM, "Piren" <[email protected]> wrote:
> That's what we think being developers (and google thought when they forced > the icon to show up) ... the users however (well, most of them), have no > idea what they are doing... > > I've had a foreground service running, with it's pretty icon and a text > saying what it is (so users wouldn't be surprised it's there, after all, > they chose to use the service). I've got a whole log of complaints that the > app doesn't work, apparently they used task killers and killed the app > since it always shows up high in the list... they never did 1+1 ... > > Also, i found that it's best not to use Foreground services since the > psychological harm they do seriously outweigh their benefits: Many of the > complains the app got was that it sucks the life of the battery since it's > always running, some complaints even claimed it ruined their batteries (as > in drained them in an hour and now the device doesnt work), a version later > i stopped using it as a foreground service (due to other reasons, yet the > service was still always on), all complaints were gone and people started > praising the app claiming all battery issues were solved... *facepalm* > > Users... they're the worst :-P > > > On Thursday, October 17, 2013 4:09:20 PM UTC+3, Kristopher Micinski wrote: >> >> For example, having a foreground services shows some sort of intent that >> users want the app to be running continuously. If the user force kills an >> app with a foreground service, that just seems dumb, since they should have >> just stopped it using the facilities of that app anyway :-/, but I guess >> none of that use case makes sense anyway. >> >> kris >> >> >> >> On Thu, Oct 17, 2013 at 9:07 AM, Kristopher Micinski <[email protected] >> > wrote: >> >>> On Thu, Oct 17, 2013 at 2:57 AM, Piren <[email protected]> wrote: >>> >>>> A foreground service is sort of the way you build apps that live >>>>> indefinitely. >>>>> >>>> I wouldn't say that, foreground services die like everything else... >>>> they are persistent little buggers, but it doesn't take much to get rid of >>>> them. Especially for the app-killer-click-happy users that think it helps >>>> their device go faster. >>>> >>> >>> So I should say that they are "morally" how you build services that last >>> indefinitely. Since indefinite services don't really exist, they are as >>> close as you can realistically get.. >>> >>> kris >>> >>> >> >> -- > You received this message because you are subscribed to the Google > Groups "Android Developers" group. > To post to this group, send email to [email protected] > To unsubscribe from this group, send email to > [email protected] > For more options, visit this group at > http://groups.google.com/group/android-developers?hl=en > --- > You received this message because you are subscribed to the Google Groups > "Android Developers" group. > To unsubscribe from this group and stop receiving emails from it, send an > email to [email protected]. > For more options, visit https://groups.google.com/groups/opt_out. > -- You received this message because you are subscribed to the Google Groups "Android Developers" group. To post to this group, send email to [email protected] To unsubscribe from this group, send email to [email protected] For more options, visit this group at http://groups.google.com/group/android-developers?hl=en --- You received this message because you are subscribed to the Google Groups "Android Developers" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. For more options, visit https://groups.google.com/groups/opt_out.

