본문

171104(토) - LockerRoom

LockerRoom


Running app catching problem

- Android 5.0 이상에서는 아래와 같은 running process catch가 통하지 않는다.

runningAppProcessInfos = activityManager.getRunningAppProcesses();

activityManager.getRunningAppProcesses().get(0).processName


- 방법은 2가지가 존재한다.

1. android.app.usage 사용

- https://developer.android.com/reference/android/app/usage/package-summary.html

https://developer.android.com/about/versions/android-5.0.html#System


2. AccessibilityService 사용

https://developer.android.com/reference/android/accessibilityservice/AccessibilityService.html

https://jungwoon.github.io/android/2016/10/03/Accessibility-Service/

공유

댓글