public static String getRunActivityClassName(Context context) {
ActivityManager activityManager = (ActivityManager) context.getSystemService(Context.ACTIVITY_SERVICE);
List<ActivityManager.RunningTaskInfo> taskInfo = activityManager.getRunningTasks(1);
ComponentName topActivity = taskInfo.get(0).topActivity;
String className = topActivity.getClassName();
return className;
}
'프로그래밍 > Android' 카테고리의 다른 글
Android Studio logcat color 설정하기 (0) | 2017.06.15 |
---|---|
Android useful library (0) | 2016.09.05 |
Android Popup Dialog(팝업 다이얼로그) (0) | 2015.05.18 |
Android GCM (0) | 2015.03.26 |
Android getCountryCode (0) | 2015.03.16 |
댓글