I tried to access the process information through the '/ proc' file. But it didn't work. I wonder to know how Greenify implement this function. Thanks in advance!
Unfortunately you can no longer do this in Android 7.0. With Android 7.0, Google has significantly restricted access to /proc.
This limitation/feature has already been reported to Google: https://code.google.com/p/android/issues/detail?id=205565
An alternative would be to use UsageStatsManager.
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.