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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 26, 20262026-05-26T17:25:31+00:00 2026-05-26T17:25:31+00:00

I have an application where I have an error dialog pop-up. If i do

  • 0

I have an application where I have an error dialog pop-up. If i do not touch the screen letting the screen dim off, and then turn the screen on,the pop up dialog is no more there. I want the dialog to be there even if the backlight is turned after it goes off, like in other normal android dialogs.

This is how I am creating the dialog

Dialog lVoiceDialog=new AlertDialog.Builder(this).setIcon(
            R.drawable.ic_dialog_alert).setMessage(mVoiceCallMessage)
            .setPositiveButton(R.string.yes, clickListener)
            .setNegativeButton(R.string.no,clickListener1).create();
         lVoiceDialog.setOnDismissListener(dismissListener);

where clickListener and clickListener1 are individual listeners for the positive and negative buttons respectively and dismissListener is listener for running code when the dialog is about to be dismissed.

Please

  • 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-05-26T17:25:31+00:00Added an answer on May 26, 2026 at 5:25 pm

    The other answers make me think I misunderstood the question but just in case..

    Your activity is (possibly) being closed when the screen goes off. and restarted when it returns in the normal android activity lifecycle.

    To retain your dialog, you would need to save its state when the activity closes and reshow it when it returns.

    You can demonstrate this by showing the dialog and rotating the phone. Switching orientation does pretty much the same thing.

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

Sidebar

Related Questions

I have the following Codeigniter (MySQL related) error in my application Error Number: 1100
In my application I am getting this error: You can only have one <head
I have a piece of code of my application that's I get the error
i have used impersonation in this application. whenever this error occurs i required to
i have a problem with my Android Application. The Error occures when i want
I am working in a struts-hibernate application. I have seen a error on 3rd
I have created an application in c++ using VS .Net. There is only the
I have an AlertDialog.Builder displaying on an application. When I rotate the screen, I
Folks, I know there have been lots of threads about forcing the download dialog
I have a web application that, under some conditions, pop up JavaScript alert()s that

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.