ActivityManager.getRunningTasks is deprecated android
问题 I am working on push notification in android where i am using a below method to show notification, but the problem is that now ActivityManager.getRunningTasks(1); is being deprecated. From one stackoverflow question i read that: " you can use getAppTasks() returning a List<AppTask> where you can get the RecentTaskInfo with getTaskInfo " but i can't figure it out how to use it. Please help me out here in this regard. private void postNotification(Context ctx, Intent intent) { try { if (intent