I am creating an android app in eclipse and for some reason the .AgainActivity is always launching rather than .Splash. I deleted the .AgainActivity and ran it in the emulator AND the .Splash worked, but it will not run first when both activities are present.
Does anyone know what I need to do?
AndroidManifest XML:
<application
android:icon="@drawable/test_logo"
android:label="@string/app_name" >
<activity
android:label="@string/app_name"
android:name=".Splash">
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
</activity>
<activity
android:label="@string/app_name"
android:name=".AgainActivity">
<intent-filter>
<action android:name="again.we.practice.AgainActivity" />
<category android:name="android.intent.category.DEFAULT" />
</intent-filter>
</activity>
</application>
Splash Java:
package again.we.practice;
import android.app.Activity;
import android.os.Bundle;
public class Splash extends Activity{
@Override
protected void onCreate(Bundle National) {
// TODO Auto-generated method stub
super.onCreate(National);
setContentView(R.layout.splash);
}
}
Your
AndroidManifest.xmlis correct according to it SplashActivityshould display first since it is intended as main.Or just try removing
<intent-filter>forAgainActivityas below,