📅  最后修改于: 2022-03-11 14:52:09.844000             🧑  作者: Mango
ActivityManager am = (ActivityManager)context.getSystemService(Context.ACTIVITY_SERVICE);
ComponentName cn = am.getRunningTasks(1).get(0).topActivity;