0

I have two projects with similar starting splash and menu activities, but the package name is different. When I run my latest project it is pulling the other menu activity from the other project. Is this something i've screwed up in naming something? I checked my Manifest and everything appears to be correct. Anyone had this happen before? Manifest:

 <activity android:name=".Splash" 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=".Menu" android:label="@string/app_name"> <intent-filter> <action android:name="android.intent.action.MENU" /> <category android:name="android.intent.category.DEFAULT" /> </intent-filter> </activity> Activity: package com.****.tools; import android.app.Activity; import android.content.Intent; import android.os.Bundle; public class Splash extends Activity { /** Called when the activity is first created. */ @Override public void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.splash); Thread timer = new Thread(){ public void run(){ try{ sleep(3000); }catch (InterruptedException e){ e.printStackTrace(); }finally{ Intent openMainMenu = new Intent("com.*****.MENU"); startActivity(openMainMenu); } } }; timer.start(); } } package com.****.tools import android.app.Activity; import android.os.Bundle; public class Menu extends Activity{ @Override public void onCreate(Bundle savedInstanceState){ super.onCreate(savedInstanceState); setContentView(R.layout.menu); } } 
1
  • Can you please post your manifest file, or at least the <activity>..</activity> lines? If possible also your Activity class of your "latest project" Commented Jun 24, 2012 at 6:09

1 Answer 1

1

You are opening the actitty using action but not defined in new manifest so it is taking from the old

Intent openMainMenu = new Intent("com.*****.MENU");//<--------- startActivity(openMainMenu); 

Note the new Action name should be differ from old one other wise it will so a select dialog having both activity in that.

 <activity android:name=".Menu" android:label="@string/app_name"> <intent-filter> <action android:name="com.*****.MENU_NEW" /> <action android:name="android.intent.action.MENU" /> <category android:name="android.intent.category.DEFAULT" /> </intent-filter> </activity> Intent openMainMenu = new Intent("com.*****.MENU_NEW");//<--------- startActivity(openMainMenu); 
Sign up to request clarification or add additional context in comments.

1 Comment

I see what you are saying! I can't believe I messed up the dang name! Thanks!

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.