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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 10, 20262026-06-10T01:21:04+00:00 2026-06-10T01:21:04+00:00

i m writing an application n stuckup with one problem.I have three activity A,B

  • 0

i m writing an application n stuckup with one problem.I have three activity A,B and C. when i goes from activty A to B and B to C and if i press menu button on device.my application goes into background state. when i reopen application it shows Activity C. I want when i reopen my application it should shows Activity A instead of any other activity from Activity stack.
I have gone through some activity lifecycle method and try to override it.i have override onStart() ,onPause() method and finsh activity C as well as Activity B and the problem i m facing is when i go from Activity C to activity D activity C finish all background activity n m not able to go back to acitvity C on finish of Activity D.
Can anyone help me how to show specific acitivity on resume of application??
thansks in advance.

here is my manifest.xml

<uses-sdk android:minSdkVersion="4" />
<uses-permission android:name="android.permission.INTERNET" />
<uses-permission android:name="android.permission.READ_PHONE_STATE"/>
<uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE"/>
<application    
              android:icon="@drawable/icon"
              android:label="@string/app_name"
              android:theme="@android:style/Theme.Black.NoTitleBar.Fullscreen" >

    <activity   
        android:label="@string/app_name"
        android:name="com.buttonpay.Login"
        android:screenOrientation="portrait"
        android:clearTaskOnLaunch="true" >
        <intent-filter >
            <action android:name="android.intent.action.MAIN" />
            <category android:name="android.intent.category.LAUNCHER" />
        </intent-filter>
    </activity>


     <activity android:name=".ButtonPayActivity"
                android:theme="@android:style/Theme.Black.NoTitleBar.Fullscreen"
                android:screenOrientation="portrait"/>    


    <!-- HomeTab Activity -->

            <activity android:name="com.buttonpay.home.Utilities"
                        android:theme="@android:style/Theme.Black.NoTitleBar.Fullscreen"
                        android:screenOrientation="portrait"/>


            <activity android:name="com.buttonpay.home.Top_up"
                        android:theme="@android:style/Theme.Black.NoTitleBar.Fullscreen"
                        android:screenOrientation="portrait"/>
            <activity android:name="com.buttonpay.home.HomeScreen"
                        android:theme="@android:style/Theme.Black.NoTitleBar.Fullscreen"
                        android:screenOrientation="portrait"/>

            <activity android:name="com.buttonpay.home.MyAccount"
                        android:theme="@android:style/Theme.Black.NoTitleBar.Fullscreen"
                        android:screenOrientation="portrait"/>
             <activity android:name="com.buttonpay.home.TransactionHistory"
                        android:theme="@android:style/Theme.Black.NoTitleBar.Fullscreen"
                        android:screenOrientation="portrait"/>
              <activity android:name="com.buttonpay.home.TransactionDetailsActivity"
                        android:theme="@android:style/Theme.Black.NoTitleBar.Fullscreen"
                        android:screenOrientation="portrait"/>
                <activity android:name="com.buttonpay.home.TransactionList"
                        android:theme="@android:style/Theme.Black.NoTitleBar.Fullscreen"
                        android:screenOrientation="portrait"/>
               <activity android:name="com.buttonpay.home.BusinessSummaryActivity"
                        android:theme="@android:style/Theme.Black.NoTitleBar.Fullscreen"
                        android:screenOrientation="portrait"/>
               <activity android:name=".home.MobileMoneyActivity"
                        android:theme="@android:style/Theme.Black.NoTitleBar.Fullscreen"
                        android:screenOrientation="portrait"/>


     <!-- balance tab Activity -->
            <activity android:name="com.buttonpay.balance.BalanceTab"
                        android:theme="@android:style/Theme.Black.NoTitleBar.Fullscreen"
                        />



     <!-- Favouritetab Activity -->
             <activity android:name="com.buttonpay.favourite.FavouriteTab"
                        android:theme="@android:style/Theme.Black.NoTitleBar.Fullscreen"
                        />

  <!-- ComingSoon -->
<activity android:name="com.buttonpay.home.ComingSoon"
                        android:theme="@android:style/Theme.Black.NoTitleBar.Fullscreen"
                        android:screenOrientation="portrait"/>

 <!-- Settings -->
<activity android:name="com.buttonpay.settings.SettingList"
                        android:theme="@android:style/Theme.Black.NoTitleBar.Fullscreen"
                        android:screenOrientation="portrait"/>



</application>

  • 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-10T01:21:06+00:00Added an answer on June 10, 2026 at 1:21 am

    In the manifest, set this on your root activity (that is the first one that gets launched in your application, the one with ACTION_MAIN and CATEGORY_LAUNCHER):

    android:clearTaskOnLaunch="true"
    

    You don’t need to do anything else. No overriding of lifecycle methods.

    EDIT Add additional information after some empirical experimentation:

    You need to make sure that your root activity is always in the task’s activity stack to make this work. This means that you can’t call finish() on the root activity until the user actually wants to quit your application (ie: when he presses the BACK key when in your root activity).

    In your example you have a LoginActivity, MenuActivity and DescriptionActivity and the LoginActivity is the root activity. When the LoginActivity launches the MenuActivity it cannot call finish() on itself. In this case, when the user presses the BACK key while in the MenuActivity, it will return to the LoginActivity. If this isn’t what you want then you need to set a flag in the LoginActivity that you’ve already launched the MenuActivity and when onResume() is called you can check that flag to determine if you are returning from the MenuActivity and in that case you can just immediately call finish().

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

Sidebar

Related Questions

im writing an application using Visual Studio 2010 Express Edition. I have a problem
Writing an application Menu.java extending ListActivity and I have added a TextView header at
Writing GWT application. I have CellTable and a code that i'v got from google-example
im writing application on asp mvc. so, i have jQuery tabs on index.aspx, which
Im writing an application for workers in our factory and one of requirements is
I'm writing an application in C# which needs to attach one of its own
I am writing an application that is accepting POST data from a third party
I have followed a tutorial to create a simple blog writing application in PHP
Writing an application in Cocoa that will take input from the user, format it
Im writing a application that reads logs from 1-many computers in the network. 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.