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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 10, 20262026-06-10T13:03:11+00:00 2026-06-10T13:03:11+00:00

So here is my activity. <activity android:name=.MainActivity_Hard android:configChanges=keyboardHidden|orientation|screenSize android:label=@string/title_activity_main_activity__hard android:noHistory=true android:screenOrientation=portrait > </activity> I

  • 0

So here is my activity.

<activity
            android:name=".MainActivity_Hard"
            android:configChanges="keyboardHidden|orientation|screenSize"
            android:label="@string/title_activity_main_activity__hard"
            android:noHistory="true"
            android:screenOrientation="portrait" >
        </activity>

I marked it as android:noHistory=”true” because I did not want the screen to be added to the activity stack.

But however when I lock the screen and unlock it. The activity disappears and the previous screen appears. This should not happen. Could anyone tell me why.

Note: It happens in ICS (Samsung Galaxy Note), but not with previous devices (Gingerbread,etc.)

  • 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-10T13:03:13+00:00Added an answer on June 10, 2026 at 1:03 pm

    Setting the noHistory attribute in your activity means that as soon as the user navigates away from that activity–bringing up the lock screen included–its finish() function is called automatically, thus destroying it and going back to the previous activity that spawned it.

    This is typically used for splash-screen-type activities which, for example, acts only as a launcher and you don’t want the user to be able to go back to the splash screen from the child.

    If this is not your intention, then you should consider removing the noHistory attribute and maybe managing the activity lifecycle yourself. (For example, if you don’t want your activity to be in the stack, then just call finish() just after it starts another activity.)

    android:noHistory

    Whether or not the activity should be removed from
    the activity stack and finished (its finish() method called) when the
    user navigates away from it and it’s no longer visible on screen —
    "true" if it should be finished, and "false" if not. The default value
    is "false". A value of "true" means that the activity will not leave a
    historical trace. It will not remain in the activity stack for the
    task, so the user will not be able to return to it.

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

Sidebar

Related Questions

Here is my intent-filter code... <activity android:name=IntentReceiver> <intent-filter> <action android:name=android.nfc.action.TAG_DISCOVERED/> <category android:name=android.intent.category.DEFAULT /> <data
Here is my code import org.ksoap2.*; import org.ksoap2.serialization.*; import org.ksoap2.transport.*; import android.app.Activity; import android.os.Bundle;
<uses-sdk android:minSdkVersion=7 /> <application android:description=@string/app_description android:icon=@drawable/icon android:label=@string/app_name android:theme=@android:style/Theme.Light > <activity android:name=com.xyz.Main.MainActivity android:label=@string/app_name > <intent-filter>
here i am using an activity in which there is a list view,which I
Here I'm gettimg memory allocation problem at activity indicator and my code is: -
Here is the short version. I have a Bonus Activity that has 25 image
I want a second Activity to use the DropboxAPI object (mApi here) and invoke
Here's the scenario, I want to get Data from the Service to Activity Whenever
Going round in circles here i think. I have an activity called Locate; public
I am trying to enable ActionBar in an Activity . Here is my Manifest

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.