<How get app list that user using in phone with Us...
# stackoverflow
u
How get app list that user using in phone with UsageStatsManager? I am using UsageStatsManager for track app usage time in kotlin. The problem is I just get user installed app list, but I want to also track using the default downloaded apps (Google Chrome, Youtube, etc. not other system apps) My code is below: val currentTime = System.currentTimeMillis() // The
queryEvents
method takes in the
beginTime
and
endTime
to retrieve the usage events. // In our case, beginTime = currentTime - 10 minutes ( 1000 * 60 * 10 milliseconds )...