This is pretty similar to the "battery optimization app" problem. Dan suggests the proper API methods for querying what's running right now. In order to track what's least used on the phone you need to keep track of what is used most.
And keeping track means that you need to poll that data in regular intervals (once an hour or something like that). You should use AlarmManager for that so your app can go to sleep in between these checks. On Wednesday, February 6, 2013 12:00:10 AM UTC-6, Bajrang Asthana wrote: > > Hi , > > I want to get a list of android applications on basis of rarely used. I am > not getting how can we access last run time of application. > > I thought it could be possible through reading of logcat file. But looking > on log file of device, I found that the first entry of logcat is of 2 days > back. > > Is anyone have any idea about how to get last run and flushing mechanism > of logcat file. > > Thanks in advanced > -- -- You received this message because you are subscribed to the Google Groups "Android Developers" group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en --- You received this message because you are subscribed to the Google Groups "Android Developers" group. To unsubscribe from this group and stop receiving emails from it, send an email to android-developers+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/groups/opt_out.