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 7183459
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 28, 20262026-05-28T17:59:05+00:00 2026-05-28T17:59:05+00:00

I use the group to show activity in one tab. A and B Activty

  • 0

I use the group to show activity in one tab.
A and B Activty are the same group.
A call B such as below code:

Intent intent = new Intent(AActivity.this, BActivity.class).addFlags(Intent.FLAG_ACTIVITY_CLEAR_TOP);  
Window w = MyGroup.group.getLocalActivityManager().startActivity("BActivity", intent);  
View view = w.getDecorView();  
MyGroup.group.setContentView(view);

And BActivity is a ListActivity.

@Override
public void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
this.setContentView(R.layout.list);
RL url = new URL(urlstr);
HttpURLConnection connection = (HttpURLConnection)url.openConnection();
connection.setConnectTimeout(10000);
connection.setDoInput(true);
connection.setDoOutput(true);
connection.setUseCaches(false);
InputStream is = connection.getInputStream();
//extract information from is, and show in list view
}

I want to show dialog to show loading.
I already try AsyncTask and Thread Runnable method.
But the error Unable to add window -- token android.app.LocalActivityManager$LocalActivityRecord@2afe9488 is not valid; is your activity running? shows.
How to solve it?

  • 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-28T17:59:06+00:00Added an answer on May 28, 2026 at 5:59 pm

    you can use ProgressDialog Class with the Help of Handler Class. This way you can achieve what you want to do.

    progDailog = ProgressDialog.show(loginAct,"Process ", "please wait....",true,true);
    
    new Thread ( new Runnable()
    {
         public void run()
         {
          // your loading code goes here
         }
    }).start();
    
    
         Handler progressHandler = new Handler() 
         {
    
             public void handleMessage(Message msg1) 
             {
    
                 progDailog.dismiss();
                 }
         }
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I use group for tabhost. In MyGroup, below code to call AActivity: Intent intent
I try use below code to load an URL. URL url = new URL(urlstr);
I want to group the common methods in one file and use it. For
I have used tabbar with activity group in my application. I have four tab
How to use Linq to select and group complex child object from a parents
How do you use GAP to identify the name of a group from its
I want to use jquery draggable/droppable to let the user select a group of
Is there a way to group a bunch of DLL's and still use them
I can use stat() to figure out what permissions the owner, group, or others
WHERE gets processed before GROUP BY in the SELECT statement. How can I use

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.