How to find out the package run by the user (in real time)?

  • package of the application launched by the user? - Vladyslav Matviienko
  • Yes. I try through .getRunningAppProcesses (), but in real time it will only be possible to monitor with TimerTask (). So I think it is possible to do something like this with the help of BroadcastReceiver () - Shifu
  • It seems to me that there is no such possibility. I personally would not want any program to find out what is starting from me. In addition, as far as I remember, with a certain version of the android getRunningAppProcesses() will also return only the lunch process and its own - Vladyslav Matviienko
  • Here getRunningTasks() already has the status of Deprecated, but getRunningAppProcesses() , while no one is going to cancel;) If this is not possible, then how hard will antivirus ... - Shifu

0