Count how many times every app is used in one day using UsageEvents, UsageEvents.Event and MOVE_TO_FOREGROUND
问题 With UsageStatsManager and UsageStats I'm able to obtain the daily usage (in houres, minuts and seconds) of every app on my smartphone. Now I want to know if there is a way to obtain the daily frequency of use (in numbers of times, i.e. 1 times, 2 times, etc) of every app on my smartphone. Reading the documentation I deduced that this could be achieved using UsageEvents, UsageEvents.Event and MOVE_TO_FOREGROUND. So I wrote the following code: // Get the app statistics since one day ago from