Android: get UsageStats per hour
问题 I use UsageStats feature of Android, but the smallest interval is DAILY INTERVAL . long time = System.currentTimeMillis(); List<UsageStats> appList = manager.queryUsageStats(UsageStatsManager.INTERVAL_DAILY, time - DAY_IN_MILLI_SECONDS, time); How can I get UsageStats in an hourly interval? 回答1: All credit goes to this answer. I have learned from that one. How can we collect app usage data for customized time range (e.g. for per 1 hour)? We have to call queryEvents(long begin_time, long end