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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 9, 20262026-06-09T18:59:49+00:00 2026-06-09T18:59:49+00:00

I have 3 activities, then I navigate from A to B and from B

  • 0

I have 3 activities, then I navigate from A to B and from B to C. The stack are C-B-A (with C on the top). The C Activity have a Runnable that works every interval, and connect to a web service that update the UI. If the Activity C comes to background, is destroyed and then comes to foreground again the task starts with de main Activity A. I want to come back to the C activity. Is possible?

In the emulator works fine but in my smartphone with only this application running, always destory the entire application.. can I do somthing? If I do a service separated from the UI, could improve this?

Edit2: I try this declaration on AndroidManifest

    <activity android:name=".ActivityA" android:label="@string/app_name" 
        android:alwaysRetainTaskState="true">
        <intent-filter>
            <action android:name="android.intent.action.MAIN" />
            <category android:name="android.intent.category.LAUNCHER" />    
        </intent-filter> 
        <intent-filter>
            <action android:name="android.intent.action.VIEW"/> 
            <category android:name="android.intent.category.DEFAULT"/>
            <category android:name="android.intent.category.BROWSABLE"/>
            <data android:scheme="oauthht" android:host="hattrick"/>
        </intent-filter>          
    </activity>
    <activity android:name=".ActivityB" android:label="@string/ActivityB"
              android:screenOrientation="portrait"></activity>
    <activity android:name=".ActivityC" android:label="@string/ActivityC" 
              android:screenOrientation="portrait"
              android:launchMode="singleTask">

Edit2: And the code to call the activities:

In the main Activity A:

public void onClickButtonB(View button) { 
    Intent intent = new Intent();
    intent.setComponent(new ComponentName(this,ActivityB.class));
    startActivity(intent);
}

In the Activity B:

 Bundle bundle = new Bundle();
 bundle.putLong("selectedMatch", matchID);           

 Intent liveIntent = new Intent(); 
 liveIntent.setComponent(new ComponentName(ActivityB.this, ActivityC.class));
 liveIntent.putExtras(bundle);
 startActivity(liveIntent); 
  • 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-06-09T18:59:51+00:00Added an answer on June 9, 2026 at 6:59 pm

    I know which was the problem. The application crashes in background but the exception was caught. This restarts the app in background and mislead me. :-S

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

Sidebar

Related Questions

I have two activities. In first I come to the second activity from first
suppose that you have two activities A(which is the main activity) and B when
I have 2 activities. In child activity i have put something like that in
In my app I have couple activities. How to setup that every time user
Let assume we have two activities. A - main activity, that is home launcher
I want to know that if I have two activities in a program then
Another design question for you If I have 5 activities that can result from
I have four activities A,B,C,D. I am passing an text from activity A to
I have an Android application that contains two Activities . Activity A has a
I have two Activities. Activity A gets a large amount of information from the

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.