[Android] - 안드로이드 최상위 Activity 이름값 찾기

Android Java 2015. 10. 14. 10:24
반응형

ActivityManager am = (ActivityManager) mContext.getSystemService(Context.ACTIVITY_SERVICE);

List<RunningTaskInfo> Info = am.getRunningTasks(1);

ComponentName topActivity = Info.get(0).topActivity;


Log.e("Top activity", topActivity.getClassName().trim().toString());

반응형
: