title: React Native immersions mode
body: <p>I want to add immersive mode (fullscreen, without on screen navigation bar) to my React Native app. In the best situation I would have it only when viewing the app in Landscape mode. That way the users will be able to really watch a video in fullscreen.</p>
  
  <p>So I've added this to my mainactivity.java</p>
  
  <p><div class="snippet" data-lang="js" data-hide="false" data-console="true" data-babel="false">
  <div class="snippet-code">
  <pre class="snippet-code-js lang-js prettyprint-override"><code>    @Override
      protected void onStart()
      {
          getWindow().getDecorView().setSystemUiVisibility(View.SYSTEM_UI_FLAG_LAYOUT_STABLE
                  | View.SYSTEM_UI_FLAG_LAYOUT_HIDE_NAVIGATION
                  | View.SYSTEM_UI_FLAG_LAYOUT_FULLSCREEN
                  | View.SYSTEM_UI_FLAG_HIDE_NAVIGATION
                  | View.SYSTEM_UI_FLAG_FULLSCREEN
                  | View.SYSTEM_UI_FLAG_IMMERSIVE);
          super.onStart();
      }</code></pre>
  </div>
  </div>
  </p>
  
  <p>View is imported from: </p>
  
  <pre><code>import android.view.View;
  </code></pre>
  
  <p>When the app "Launches" you see the white loading screen for a second. In that screen I see the immersive mode. But when the React Native app launches it will come back.</p>
  
  <p>Does somebody know the way to do this?</p>