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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 17, 20262026-06-17T18:32:54+00:00 2026-06-17T18:32:54+00:00

In my application, I am finishing my first activity when I move to the

  • 0

In my application, I am finishing my first activity when I move to the next activity like this:

if(className.equals("com.tritonhk.android.LoginActivity"))
            startActivityForResult(in, 1);
        //loadingrelative.setVisibility(View.GONE);
        displayVal = 0;
        Helper.IsFullSync = false;
        LoginActivity.this.finish();

So that when I go in background from any other activity and come back in foreground then that activity must be called by which we went in background.

It is happening in some cases but If I remain in background for more then 10 minutes then my first activity’s oncreate method is called.

It seems that dalvik is killing my application process that is why when I click on my application icon then its new instance is created and hence its onCreate is called.

Please suggest me what should be the better approach for this.

EDIT Problem solved partially. Now with android:launchMode = "standard" behaves normally but not in first attempt. I mean when I install the app and run it and went to background and come back to foreground then it does not work but from the second time it works properly.

  • 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-17T18:32:56+00:00Added an answer on June 17, 2026 at 6:32 pm

    Do u have android:launchMode="standard" for the activity which is called while launching the app? If not add this line.

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

Sidebar

Related Questions

I am close to finishing my first application (a UITableView style one) on the
The first Activity that loads in my application is an initialization activity, and once
I'm currently putting the finishing touches to an application for a client, this application
I am a real n00b in developing iOS app. This is my first application
My application is basically one Activity that I quit by calling this.finish(); System.exit(0); where
I'm working on finishing up my server for my first iPhone application, and I
I'm finishing up my first real PHP application and I am trying to make
When i use the cursor.moveToNext(); in my code then the application Force finishing activity
after finishing my android application development i used the command showing below to get
I am finishing implementing an application, which has inside activity for sending a message

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.