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
Any idea?
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?