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

  • SEARCH
  • Home
  • 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 892751
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 15, 20262026-05-15T14:06:31+00:00 2026-05-15T14:06:31+00:00

I was wondering is it possible to create multiple instances of a single Activity

  • 0

I was wondering is it possible to create multiple instances of a single Activity in Android?

I currently start my own inCall screen for a Voip Test by using the following code:


     public void initInCallScreen(String pName, String phoneNumber, int contactID, boolean 
        callDirection, int lineID){

    //starts in callScreen dialog
    final Intent myIntent = new Intent(context, CallDialogActivity.class);
    myIntent.putExtra("NAME", pName);
    myIntent.putExtra("NUMBER", phoneNumber);
    myIntent.putExtra("ID", contactID);
    myIntent.putExtra("CALLTYPE", callDirection); //True = Incoming, False = Outgoing
    myIntent.putExtra("LINEID", lineID);
    myIntent.setFlags(Intent.FLAG_ACTIVITY_NEW_TASK);
    context.startActivity(myIntent);

This allows me to start the Activity fine.

However when I call it for a second it just returns to the Activity already created rather than creating a new Activity and placing it on the stack.

I would like to be able to create the activity multiple times so that I have two or 3 Activities on the stack and the user can switch between them, using Home, Back buttons etc…

Is this possible and if so what am I doing wrong?

  • 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-15T14:06:32+00:00Added an answer on May 15, 2026 at 2:06 pm

    However when I call it for a second it
    just returns to the Activity already
    created rather than creating a new
    Activity and placing it on the stack.

    You probably changed your manifest to add an android:launchMode attribute that is interfering with your goal. By default, starting an activity starts a new instance.

    Also:

    • Get rid of myIntent.setFlags(Intent.FLAG_ACTIVITY_NEW_TASK);, since you do not want a new task based on what you have written here
    • Since context is probably a Context, I do not know why you are going through all of the ContextWrapper / getBaseContext() stuff
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I'm just wondering if it is possible to create diagrams from multiple datasets in
I was wondering if its possible to create a Thread and kill/finish The Activity,
I was wondering if it is possible to create a flash movie that rotates
I was wondering if it was possible to create a SPARQL UpdateRequest in Jena
I am wondering if it is possible to create a new dataframe with certain
Just wondering if it is possible to dynamically create a list of strings in
I was wondering if it were possible to dynamically create an XML layout file
I was wondering if the following is possible. Create a class that accepts an
I am wondering it is possible to have multiple GridFS in Mongo? The reason
I was wondering if it's possible in Android to declare different activities (say .ActivityA

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.