2

Does anyone know how the Recent Tasks list in Android populates the name it displays next to each app? I would like to change this from the name of the launcher activity to something else.

Josh
  • 268
  • 2
  • 14

2 Answers2

3

Reading though the RecentsPanelView source code (ref 1), it seems like it just takes the package's label. That seems to be the only thing you can change.

ref 1: http://grepcode.com/file/repository.grepcode.com/java/ext/com.google.android/android/4.0.1_r1/com/android/systemui/recent/RecentsPanelView.java#RecentsPanelView.TaskDescriptionAdapter.getView%28int%2Candroid.view.View%2Candroid.view.ViewGroup%29

OrhanC1
  • 1,415
  • 2
  • 14
  • 28
  • That's a bummer. Maybe I should ask this as another question, but Can I change the text in the ActionBar to be something other than the Activities label? – Josh Dec 07 '13 at 01:33
3

This works for me.

    if (Build.VERSION.SDK_INT>=21){
        setTaskDescription(new ActivityManager.TaskDescription(name));
    }
Playhi
  • 137
  • 1
  • 4