I have an Android 5.1.1 tablet (Samsung A6).
Although both the code and the UsageStatsManager doc tell me that I should have access to the “Last Used App” sensor, I don’t.
5.1.1 = API 22 (I think)
LOLLIPOP_MR1 = API 22
UsageStatsManager = API 21
At the end of the day, I’m only interested in knowing if the HA companion app is the frontend activity. Would there be another way to know that?
looks like the docs are out of date, the actual sensor itself requires Android 6
yes use the app importance sensor and the state will be
foreground when the app is open
Sure it’s not a bug?
That stack overflow seem to infere it should work as of L…
At the least, the test seem in contraction of the
Anyway, will test with the app importance. Thanks
App importance works for me. Thanks
thanks for letting us know the docs were out of date, they are updated now