I tried using
List<UsageStats> stats2 = usageStatsManager.queryUsageStats(UsageStatsManager.INTERVAL_DAILY, 0, time);
to get a list of UsageStats objects for all installed apps but it only returns a max of 25 for some reason. I didn't see a method to get the UsageStats for a specific package name in UsageStatsManager
.
I was planning on using ApplicationInfo getInstalledApplications()
to get a more accurate list but couldn't see how to get UsageStats
from it. Does anyone know how to solve my problem?