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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 17, 20262026-06-17T03:11:49+00:00 2026-06-17T03:11:49+00:00

I am facing issue with showing AlertDialog when I switch from one activity to

  • 0

I am facing issue with showing AlertDialog when I switch from one activity to another through navigation(Back button).

scenario is like this:
1. My application is running on and I am on second Page of application.
2. I press back button but at same time for second page one scenario is execute & AlertDialog is open on screen.
3. I already press back button I redirect to main screen & AlertDialog dismiss with out any user input.

Already used this ,but it should not work for me.

1.  Intent.FLAG_ACTIVITY_NEW_TASK
2. onRetainNonconfigurationInstance() & getLastNonConfigurationInstance()

I want to show same AlertDialog on Home Page (MainActivity),if I navigate through it.
I want to do this for all my pages to home one.

Anybody having any kind of idea & suggestion.

Thanks,

  • 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-17T03:11:50+00:00Added an answer on June 17, 2026 at 3:11 am

    If you want to get user interaction before user leave 2nd Activity then You have to put AlertDialog in onStop() oronDestroy() of 2nd Activity or If you want to show AlertDialog after your 2nd Activity is closed and You are in Main Activity then you have to put AlertDialog in onActivityResult() of Main Activity. (But for this you have to start 2nd Activity from MAin Activity using startActivityForResult())

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

Sidebar

Related Questions

i am facing an issue of taking picture from android camera and then showing
Facing some issue in Talend Admin Console, the jobs that are running from IDE
issue facing while loading the messages in to mq channel, recieving an error like
I facing issue in iOS 6 iPad On button click -> open popover with
I'm facing issue with redirecting the viewControllers using pop/pushViewControllers. I've three view controller like
Recently I started facing issue with one of my scripts that loads a json
I am facing issue deleting set of records from a table named links_data because
I am facing one issue in Magento. I am having one Magento store with
I'm facing one issue while writing Office Outlook 2007 Add-In, I'm accessing the email
I am facing one issue because of URL encoding in window.open function when used

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.