Win a copy of OCP Java SE 8 Programmer II Exam Study Guide this week in the OCP forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

App usage on API <= KitKat  RSS feed

Ranch Hand
Posts: 37
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hello All, I'm trying to find out the time for which an app is used in Android. In Android L, there's a nicely defined API called UsageStats to cater to my needs, but I'm finding it bit difficult to find this information on pre-L devices. I have a workaround for this, but I feel it's not a good approach to deal with this. Is there any way I can get the launch time of any app on device and the exit time too (when it goes away from foreground). Continuously polling ActivityManager can help, but if the launch and exit times can be found, it will be a better way of doing this.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!