I am making an app in which i have a main activity that the user ‘sees’ on clicking the app icon and another activity which will be started by the user from within the main activity(by clicking the button on main activity screen) by using an intent. Now, how should i make the android manifest ? Should i nest the 2nd activity within the main activity or should i list it separately like the main activity ? Also when do we use an intent filter ? I searched on the web, some people have used an intent filter, others have not. My manifest file is given below. My app is starting but when i launch the 2nd activity, it stops working and asks for force close. Please help. And thanks for your time.
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="com.graphs"
android:versionCode="1"
android:versionName="1.0" >
<uses-sdk android:minSdkVersion="10" />
<application
android:icon="@drawable/brain2"
android:label="@string/app_name" >
<activity
android:name=".GraphsActivity"
android:label="@string/app_name" >
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
</activity>
<activity android:name="MainPlot"></activity>
</application>
</manifest>
both should come separately as flow of activity not effect manifest.
In your case only Setting Launcher activity intent filter needed which you have set.
use