Issue in showing activity on change of screen orientaion
<p>Actually i have created an simple app in which i want to show another activity on change of screen orientation. I have gone gone through the documentation and example given in stack overflow and by using this i have generated my app and its work fine. But my only doubt is, if in the manifest file inside the activity tag of my main activity, if i used <code>android:screenOrientaion="portrait"</code> and then run the app, then on change of screen orientation my next activity doesn't open, but if i remove this code from the manifest then it works fine.</p>

<p>So my question is if i want my main activity always to open in portrait mode the for that i should have to use this code in the manifest of main activity..and if i do so then on change of screen my next activity is not open.</p>

<p>So can anyone help me to solve this out. The code i have used is:</p>

<p><strong>code in manifest file</strong></p>

<pre><code>&lt;?xml version="1.0" encoding="utf-8"?&gt;
</code></pre>

<p></p>

<pre><code>&lt;uses-sdk android:minSdkVersion="8" /&gt;

&lt;application
    android:icon="@drawable/ic_launcher"
    android:label="@string/app_name" &gt;
    &lt;activity
        android:name=".MainActivity"
        android:configChanges="orientation"
        android:label="@string/app_name"
        android:screenOrientation="portrait"&gt;
        &lt;intent-filter&gt;
            &lt;action android:name="android.intent.action.MAIN" /&gt;

            &lt;category android:name="android.intent.category.LAUNCHER" /&gt;
        &lt;/intent-filter&gt;
    &lt;/activity&gt;
    &lt;activity
        android:name=".ChartEngineActivity"
        android:configChanges="keyboardHidden|orientation" &gt;
    &lt;/activity&gt;
&lt;/application&gt;
</code></pre>

<p></p>

<p><strong>code in main activity</strong></p>

<pre><code>public class MainActivity extends Activity
{
     @Override
     protected void onCreate(Bundle savedInstanceState) 
     {
         super.onCreate(savedInstanceState);    
         setContentView(R.layout.main);
     }

     @Override
     public void onConfigurationChanged(Configuration newConfig) 
     {
         super.onConfigurationChanged(newConfig);
         Intent intentNotes = new Intent(this, ChartEngineActivity.class);
         this.startActivity(intentNotes);   
         finish();
     }
}
</code></pre>
