2 ms·
I remember having to use GET_TASKS a couple of years ago (before Lollipop) on a well known app (tenths of millions of users). IIRC, I needed to identify a coup
by on_and_off 11y ago
I remember having to use GET_TASKS a couple of years ago (before Lollipop) on a well known app (tenths of millions of users).
IIRC, I needed to identify a couple of states :
- when the user is on the lockscreen.
- when the user is in another app.
- when the user is in our app.
- when the screen is off.
There were business reason behind this for a complex feature, nothing to do with the user's data.
The Android team does not want android devs to access to their own app UI state because 'the business logic should not have to depend on that' ...
Fair enough in theory but in practice there are a couple of times when you just need it.
For example even the Chromecast sample uses a ugly hack to access this piece of information (put a timer behind start/stop activity events).
I remember that a coworker had to revamp this piece of code recently for Marshmallow but I don't remember the details.
Google finally has a working permission model with Marshmallow : protect the private data behind popups, everything else is fair game.
It is not perfect by any means since users still tend to click yes on any popup ... but that's the best we can do IMO.