fix orientation
<p>Reading android.os.Build.VERSION.SDK_INT I need fix orientation of my app. So, if version &lt; 3 I need fix orientation to portrait.
Using this code does not run. </p>

<pre><code>@Override
    public void onCreate(Bundle savedInstanceState){ 
      super.onCreate(savedInstanceState);
      setContentView(R.layout.activity_main);
    setRequestedOrientation(ActivityInfo.SCREEN_ORIENTATION_PORTRAIT);
</code></pre>
