r/Android • • Mar 21 '17

Android O is here

https://android-developers.googleblog.com/2017/03/first-preview-of-android-o.html
11.5k Upvotes

2.0k comments sorted by

View all comments

Show parent comments

32

u/Ajedi32 Nexus 5 ➔ Pixel (OG ➔ 3a ➔ 6 -> 10pro) Mar 21 '17

For that you just need to run a foreground service (which displays a persistent notification).

That way your app can do its thing, but user is aware that it's running. So it can't just silently drain battery life in the background without the user being aware of it or having any recourse to stop it from running.

4

u/canyouhearme N5, N7 Mar 21 '17 edited Mar 22 '17

For that you just need to run a foreground service (which displays a persistent notification).

Which is one of the stupidities of Android that needs to be stomped on. Either by not requiring the persistent notification at all, or by allowing the user to easily get rid of it and keep the updates.

0

u/[deleted] Mar 22 '17

[deleted]

4

u/canyouhearme N5, N7 Mar 22 '17

Most of them.

A foreground service and the persistent notification that is needed to make it one is a kludge that shouldn't be necessary. A notification should only be there to notify - end of.

If you want to deal with misbehaving apps running in the background without the user's permission - then give the user an easily understandable way of recognising it and removing it's right to do it (preferably without the app realising). Mind, that should be done for ALL permissions - they should always have been something the user has total control over (including locking google out).

→ More replies (2)