How can we get number of activities in activity stack android. As getrunningTask() has been deprecated,please help out.
Asked
Active
Viewed 1,146 times
2
-
does [this](http://stackoverflow.com/questions/31156313/activitymanager-getrunningtasks-is-deprecated-android) help? – jayeshsolanki93 Jul 20 '16 at 05:24
1 Answers
0
i think you have to use now the :
List<ActivityManager.AppTask> getAppTasks()

Adliano Alves
- 311
- 2
- 6
-
1
-
-
you can use if(Build.VERSION.SDK_INT > Build.VERSION_CODES.KITKAT) – Adliano Alves Jul 21 '16 at 07:03