Created
February 21, 2013 07:15
-
-
Save drakestone/5002890 to your computer and use it in GitHub Desktop.
ActivityManager 로 부터 package 명 가져오기
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
final ActivityManager am = (ActivityManager)getSystemService(ACTIVITY_SERVICE); | |
List<ActivityManager.RunningTaskInfo> infos = am.getRunningTasks(100); | |
for (ActivityManager.RunningTaskInfo info : infos) { | |
Log.d(TAG, info.baseActivity.getPackageName()); | |
} | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
AndroidManifest.xml 에 이거 추가해야 할 겁니다.