title: Android: How to get recent tasks list and origActivity?
body: <p>I'd want to get recent task list.</p>
  
  <p>I use the following code, but when I try to get origActivity info, origActivity is always null:</p>
  
  <pre><code>ActivityManager activityManager = (ActivityManager) c.getSystemService(Context.ACTIVITY_SERVICE);
  List&lt;RecentTaskInfo&gt; recentTasks = activityManager.getRecentTasks(8,0);
  </code></pre>
  
  <p>I want to know application label, package name and activity name of all activities of the list.</p>
  
  <p>The only way to know these elements is to use origActivity from RecentTaskInfo but it is always null (I get a NullPOinterException). </p>
  
  <p>The only information that I can get is the Activity id.</p>
  
  <p>There is a way to know application label, package name and activity name of all recent task?</p>