So, deprecated just means "please don't use this anymore, we are going to pull it in the future", it's still implemented up to Android M (but good on you for planning for when they no-op it.)
>From the public API, not in real time. Good news is, you can get better historical data: http://developer.android.com/reference/android/app/usage/UsageEvents.html can tell you what was running and when. If you need real time, you need to cobble together something that watches the surfaceFlinger shared memory hand off http://www.cs.ucr.edu/~zhiyunq/pub/sec14_android_activity_inference.pdf and do some horrid scan of /proc/<pid> looking to map processes to linux UID and map that to package names with the package manager (both of which are not Android Public APIs so could be shut down via SEAndroid or Knox policies, or OEMs just doing something different....) On Wednesday, February 3, 2016 at 12:42:58 AM UTC-5, Mehroz Munir wrote: > > > > On Wednesday, 8 July 2015 18:45:03 UTC+5, Seshu wrote: >> >> Hi All, >> How can we retrieve the list of background runnings apps list in >> android. currently i am using >> public List<ActivityManager.RunningTaskInfo> getRunningTasks (int >> maxNum). But this method is deprecated in API level 21 i.e., from Lollipop >> onwards. is there any alternative method to get the running apps list. >> please try to help me guys >> >> Thanks >> S.Seshu. >> > > > So is ther any alternative for this ? > -- 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. To post to this group, send email to android-developers@googlegroups.com. Visit this group at https://groups.google.com/group/android-developers. To view this discussion on the web visit https://groups.google.com/d/msgid/android-developers/6990781d-8d82-4ab9-9e07-e5249c9efde7%40googlegroups.com. For more options, visit https://groups.google.com/d/optout.