title: Disable/Hide status bar in Android
body: <p>I am developing an application which should have some extra security features. In this case I have to disable/hide the status bar. I am running with Android 2.2.</p>
  
  <p>And also my device is rooted and if there is an ADB command to disable status bar, it would be fine as well.</p>
  
  <p>For now what I do is basically when user try to expand the status bar I collapse it by invoking some  . But sometimes user can expand it and click on the items in status bar notifications. </p>
  
  <p>This code part will do this,</p>
  
  <pre><code> public void onWindowFocusChanged(boolean hasFocus)
   {
           try
           {
              if(!hasFocus)
              {
                   Object service  = getSystemService("statusbar");
                   Class&lt;?&gt; statusbarManager = Class.forName("android.app.StatusBarManager");
                   Method collapse = statusbarManager.getMethod("collapse");
                   collapse .setAccessible(true);
                   collapse .invoke(service); 
              }
           }
           catch(Exception ex)
           {
  
           }
   }
  </code></pre>
  
  <p>And also I tried setting application as full screen app. But it also has some problems.</p>
  
  <p>Can someone please help me to solve this issue? </p>
  
  <p>Can someone please help me to do this? </p>