Java tutorial
//package com.java2s; import android.app.Activity; import android.app.ActivityManager; import android.graphics.BitmapFactory; public class Main { public static void setTaskDescription(final Activity activity, final String label, final int icon, final int color) { activity.setTaskDescription(new ActivityManager.TaskDescription(label, BitmapFactory.decodeResource(activity.getResources(), icon), color)); } }