1

Before OS 7 i was getting all process ID from this line

File[] files = new File("/proc").listFiles();

but in OS 7 its not working. I read many things about this but can't find the way to getting all this process ID

please help Thanks in Advance.

Bhanu Sharma
  • 5,135
  • 2
  • 24
  • 49

1 Answers1

1

Google has significantly restricted access to /proc in Android Nougat.
This has already reported:
https://code.google.com/p/android/issues/detail?id=205565
To get a list of running processes on Android Nougat you will need to use UsageStatsManager or have root access.

Aleksandr
  • 4,906
  • 4
  • 32
  • 47