Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 935763
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 15, 20262026-05-15T21:12:29+00:00 2026-05-15T21:12:29+00:00

I have an application with two activities and I’d like to be able to

  • 0

I have an application with two activities and I’d like to be able to have two icons appear in the launcher, each launching the respective activity within the app.

Specifically, I want one icon to launch my main app, and another icon to launch my settings activity. Is this possible?

Here is what I’ve tried so far:

    <activity android:label="MyApp" android:name=".MyApp">
        <intent-filter>
            <action android:name=".MyApp"/>
            <action android:name="android.intent.action.MAIN"/>
            <category android:name="android.intent.category.LAUNCHER"/>
        </intent-filter>
    </activity>


    <activity android:label="Settings" android:name=".Settings">
        <intent-filter>
            <action android:name=".Settings"/>
            <action android:name="android.intent.action.MAIN"/>
            <category android:name="android.intent.category.LAUNCHER"/>
        </intent-filter>
    </activity>

This creates two launcher icons, but they both run my main app instead of the second icon running my settings app. I’ve tried just having the launcher category but then I don’t get an icon so it looks like I need the main action as well.

Is this the right approach or should I be declaring two applications in the manifest instead?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-15T21:12:30+00:00Added an answer on May 15, 2026 at 9:12 pm

    What you need to do is have your settings activity launch in another task. You can do this by specifying its task affinity. This is done with the attribute android:taskAffinity. By default all activities share the same task affinity that defaults to main package specified in the manifest. On your settings activity you can specify android:taskAffinity="your.own.package.SettingsTask" to have the settings activity launch in its own task.

    Extra documentation.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

In my application I have two activities. In the first activity I have a
Say I have two Activities in an Android application, EditPerson and EditEmployee . It
In my application, I have two different activities and both are list activities. I
I'm writing an application which will have two Activities, when the user presses the
I have two web application. Their folder hierarchy in server is like that. first
I'm working on an application which have 5 activities and any of the activity
I'm new to the android .In my application i have two activities. In the
I have two activities in my Android 2.1 application. The first is the Main
I have two activities, say Activity A and Activity B . Activity A is
Is tight looping in a program bad? I have an application that has two

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.