How can you check if status bar is visible in Android
<p>What i want to reach is, that the user can't go out of the activity except when he presses one of the supplied buttons.<br/>
I've already caught the home and back button, but when i try to remove the status bar, my problems begin.
I would like to have one of the following:
<li>Status bar always invisible in Activity2</li>
<li>Status bar inaccessible, it is visible, but you can't activate it (see incoming call screen as example)</li></p>

<p>If I go for solution 1, this isn't possible if my application is running and Activity1 is showing the status bar, then Activity2 is shown under the status bar, the status bar overlays the top of Activity2<br/>
Except when I start Activity2 from another application, then Activity2 isn't showing the status bar.
<img src="http://i.stack.imgur.com/kQMSZ.png" alt="Status bar overlays Activity2">
<img src="http://i.stack.imgur.com/iLKU0.png" alt="No Status Bar visible here">
What am I doing wrong?</p>

<p>Part of AndroidManifest.xml:</p>

<pre><code>        &lt;activity
        android:label="@string/app_name"
        android:launchMode="standard"
        android:name=".Activity1"
        android:screenOrientation="portrait"
        android:theme="@android:style/Theme.Black.NoTitleBar" &gt;
        &lt;intent-filter &gt;
            &lt;action android:name="android.intent.action.MAIN" /&gt;
        &lt;/intent-filter&gt;
    &lt;/activity&gt;
    &lt;activity
        android:label="@string/app_name"
        android:launchMode="standard"
        android:name=".Activity2"
        android:noHistory="true"
        android:screenOrientation="portrait"
        android:theme="@android:style/Theme.NoTitleBar.Fullscreen" &gt;
        &lt;intent-filter &gt;
            &lt;category android:name="android.intent.category.HOME" /&gt;
            &lt;category android:name="android.intent.category.DEFAULT" /&gt;
            &lt;category android:name="android.intent.category.MONKEY" /&gt;
        &lt;/intent-filter&gt;
    &lt;/activity&gt;
</code></pre>
