ActivityManager manager = (ActivityManager) getSystemService(Context.ACTIVITY_SERVICE);


List<RunningTaskInfo> info = manager.getRunningTasks(1);

ComponentName cn = info.get(0).topActivity;


String packageName = cn.getPackageName();

String activityName = cn.getShortClassName().substring(1);


저작자 표시 비영리 변경 금지
신고

+ Recent posts