Java tutorial
//package com.java2s; //License from project: Open Source License import android.content.Context; import android.graphics.Bitmap; import android.graphics.BitmapFactory; import java.lang.reflect.Field; public class Main { public static Bitmap getAppIcon(Context context) { try { Class<?> drawableClass = Class.forName(context.getPackageName() + ".R$drawable"); Field f = drawableClass.getField("ic_launcher"); return BitmapFactory.decodeResource(context.getResources(), f.getInt(null)); } catch (Exception e) { return null; } } }