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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 7, 20262026-06-07T05:45:18+00:00 2026-06-07T05:45:18+00:00

I need execute a long running task on my android application (network activity). I

  • 0

I need execute a long running task on my android application (network activity).
I use a new thread to do it.
This is working fine.

The problem is I need to update my sqlite database with the results of this process and I must not let the user do any UI interaction while I am doing this update.

I was thinking in use a ProgressDialog to force the user to wait. But what context to use on the creation of this ProgressDialog ?
The problem is I do not know what activity the user is using now. So I need some way of block the user interface who works in a global way.

  • 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-07T05:45:19+00:00Added an answer on June 7, 2026 at 5:45 am

    You an AsyncTask with a ProgressDialog.

    Are you sure that this is the behavior you are looking for though? Do you really want to randomly pop up a dialog in the middle of the user’s task? This doesn’t sound like a great user experience. Ideally you would want to perform these operations w/o disrupting the user… are you sure this isn’t possible? (Maybe you can give more detailed info on this).

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

Sidebar

Related Questions

My application is using an image processing library to handle a long running task.
I need to make a long running task in the background. I'm using OmniThreadLibrary
In my Windows Form application I need to call a long-running operation of a
I have a particularly long running method that I need to execute from my
I need NAnt to kick off a long running console app on the local
I've a single statement running on WPF application that takes a long time (by
I've got a long running, daemonized Python process that uses subprocess to spawn new
I am creating an application which must execute a function that takes too long
Is there a library/framework to execute long running actions in .NET? Looking for something
I have a long text file of redis commands that I need to execute

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.