1

I'm writing an app which needs to know whether the app that the user sees is fullscreen or not. I need to use a service for this application. If the view is fullscreen it suppose to show a view, and hide it when it's not fullscreen. I'm using a WindowManager which includes the view.

What code should I use to determine whether some app is using full screen?
Should I put this code in the onCreate() method?

The answers for this thread does not work as I'm using a Service and getWindow() cannot resolve in a Service.

I'm pretty new to Android and the answers that I found about this subject were not very useful, so I'm asking a new question. I will appreciate explanations, the more information the better.

Thank you for your help!

Community
  • 1
  • 1
YosefBro
  • 596
  • 1
  • 7
  • 17
  • I'm not sure if this will work from a service, but this [answer shows how to get a list of running apps](http://stackoverflow.com/a/4213851/494356) which you may be able to use as a starting point. – Khalos Jun 27 '15 at 21:10
  • That's nice. Can I get through that maybe to an activity and then check whether it's fullscreen? I need to know if the current Activity is fullscreen, all over apps don't matter.. – YosefBro Jun 27 '15 at 21:25
  • I'm not sure, but I'd have to assume you will need to look into the action bar for this, it is more likely to have a listener or something for this than a full screen is – zgc7009 Jun 27 '15 at 21:31
  • There's more than an action bar, it's also the status bar on top.. I also dunno how to reach the status bar attributes.. – YosefBro Jun 27 '15 at 21:49

0 Answers0