Add the following. <uses-permission android:name="android.permission.GET_TASKS"></uses- permission>
On 4月27日, 下午9时14分, Simon <carep...@gmail.com> wrote: > Hello! > > I need a little bit help getting information about the last lets say 5 > application that was opened/used. > > ActivityManager m = > (ActivityManager)this.getSystemService(ACTIVITY_SERVICE); > RecentTaskInfo task = m.getRecentTasks(5,0).get(0); > > Then i used: > > String output = "the last application you've executed is '"+task.id > +"' and the PID is '"+task.toString()+"'"; > But it didnt work out well. I think im on the right track with > ActivityManager to track the latest app. > > Thank you! > > And ye i only need to get enough information so i can run/start them > later. > > //Simon -- 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