Reputation: 1725
Consider the following:
I have three packages:
package.a
package.b
package.c
Each package contains a class and an activity
package.a>>activity.a>>class.a
package.b>>activity.b>>class.b
package.c>>activity.c>>class.c
I am assembling all of these together into one application and I want activity.c to be the first activity in the stack. In other words, I want it to run first. Do I simply modify the order in the manifest? What initializes the first application and what sets their corresponding order? After the first activity is started can I just go back and forth with intents?
Thanks for your help!
Upvotes: 0
Views: 180
Reputation: 12375
You need to set your activity C with this intent filter
:
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
This way that will be the only activity launched from the home screen.
Upvotes: 1
Reputation: 35598
You want to use the CATEGORY_LAUNCHER
intent filter on the activity you want to be launched when the application starts.
CATEGORY_LAUNCHER The activity can be the initial activity of a task and is listed in the top-level application launcher.
Once the application is started, you can move back and forth using intents.
Upvotes: 1