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

  • Home
  • SEARCH
  • 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 7981721
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 4, 20262026-06-04T10:27:41+00:00 2026-06-04T10:27:41+00:00

I am developing an application which starts from LoginPage. When user Login then he

  • 0

I am developing an application which starts from LoginPage. When user Login then he moves to Main Screen where grid view for different departments are present.

Every page of application except login page has a Footer which have different Icons like Home, logout, etc.

I want to add conditional back functionality using mobile back button. Some conditions are as follow:

1) LoginPage —> Main Screen —> On back user should log out and go to Login Page

2) Main Screen –> any department —> Any Sub deprtment –> If user press Back button then go to back in same order

3) User is any where in application —> If press home button from Footer —> Comes to Main Screen –> No back functioality to go on previous page, It should follow condition 1.

4) If User on Login Page then he will exit from application on pressing Back Button

5) If User on main Screen then user should logout and go to Login Page on preseeing Back Button

I have tried with “noHistory=true” in Manifest and with Intent flags in Activity file.

Can any body suggest me best way to solved out 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-06-04T10:27:43+00:00Added an answer on June 4, 2026 at 10:27 am

    With what I understand, you cannot override the functionality of home button. By default, it minimizes your app with its current state, by calling onPause(). When you open the app again, onResume() is called and starts the app from where it was paused. As far as your back button functionality is concerned, most of the above answers are fine.

    Try,

    @Override
    public void onBackPressed()
    {
    finish();   //finishes the current activity and doesnt save in stock
    Intent i = new Intent(CurrentActivity.this, Login.class);
    i.addflags(Intent.flag_activity_no_history);
    startActivity(i);
    }
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I am developing a windows phone application which allows user to download files from
I'm developing an application in java which can take textual information from different web
I am developing application which is having Gujarati font in text-view but my problem
I`m developing an application which receives data from my GPS device like coordinates, speed
I am developing an application which requires real-time updates to the end user. However,
I am planning on developing .NET web application which also will be accessed from
I am developing an application which has several views. I create different xib &
I am developing an application in android in which i creating a list view
I am developing an application which reads from the accelerometer (20 samples per second)
I'm developing an android application, and I have a button which starts/pauses certain simulation

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.