3

I'm writing an application managing access to other applications. User can decide which app he would like to block on device, If someone start blocked app he see screen informing him about blockade. I have my own launcher and background process which check if currently open activity is blocked one. To check top activity I use package and class name from ActivityManager getRunningTasks(); If this app is blocked I cover it with my own View by adding it to WindowManager. This works for every app, except this which also use WindowManager like facebook chat heads or multitasking brought by LG - QSLIDE. This application isn't on top. Of course I can find her process using getRunningAppProcesses, but I cant kill it. Android.os.Process.killprocess don't work also. I know this is not a good idea but I don't have other one.

Is there a possibility to recognize that some app added something to WindowManager and eventually block it? Or just remove view or kill the app?

Cœur
  • 37,241
  • 25
  • 195
  • 267
Artur Latoszewski
  • 735
  • 1
  • 10
  • 21
  • I am facing same issue. have you found any solution?? @Arczi – Waheed Akhtar May 19 '15 at 11:37
  • Still looking for the answer :( @waheedakhtar – Artur Latoszewski May 20 '15 at 12:50
  • Its not just LG - QSLIDE issue. There are so many apps on playstore that will create same issue (Check aircalc). These apps are called floating apps.I am facing same issue. I am able to block every app expect floating apps. – Waheed Akhtar May 20 '15 at 12:59
  • 2nd thing is you or me can not kill others apps so do not think about it.Today i spent whole day to make it working but nothing in my hands – Waheed Akhtar May 20 '15 at 13:05
  • I spent a lot of time trying to find answer for both problems and I had to left it as it is. Everything works expect this "floating apps". If you will find trick to do this please write @waheedakhtar – Artur Latoszewski May 21 '15 at 21:29
  • Yeah same here :( here is our app link https://play.google.com/store/apps/details?id=com.infoweise.applock working fine but missing floating apps. – Waheed Akhtar May 22 '15 at 05:48

1 Answers1

0

Facebook (and many other apps) draw to the Window with SYSTEM_ALERT to manage their little chat heads. As of writing this (6.0.1) there is no API to listen for views being added and/or gather any information about that view.

RyPope
  • 2,645
  • 27
  • 51