Skip to content

Instantly share code, notes, and snippets.

@drakestone
Created February 21, 2013 07:15
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save drakestone/5002890 to your computer and use it in GitHub Desktop.
Save drakestone/5002890 to your computer and use it in GitHub Desktop.
ActivityManager 로 부터 package 명 가져오기
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());
}
@drakestone
Copy link
Author

AndroidManifest.xml 에 이거 추가해야 할 겁니다.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment