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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 20, 20262026-05-20T15:59:16+00:00 2026-05-20T15:59:16+00:00

I have an application with a very simple UI. Most of the work (bulk

  • 0

I have an application with a very simple UI. Most of the work (bulk processing of images) is done in background using AsyncTask.

It just has two Actvities. The first Activity(MainScreen) lets user make some choices and then fires off the job. The second screen(ProgressScreen) shows the current status of the job with a progressbar and messages.

It works fine.

Here’s the problem. The background task can take hours. If the user selects “back” button, while on ProgressScreen, the background task is still continuing.

Later if he wants to go back & see progress, there’s no way to do it. It I restart the app, it goes to the MainScreen, not the ProgressScreen. I know the background task is going on, since for now I am logging in logcat a message about each image being processed, but I just don’t see a way to go back to ProgressScreen.

I have looked around, I think I need to put something in the onStop() & onRestart() of the ProgressScreen, but not sure what…

I should mention, that this application not for general public, but is for internal use only. (We need to compare the image processing done by Android to those done by other systems).

  • 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-20T15:59:17+00:00Added an answer on May 20, 2026 at 3:59 pm

    You can try to put that processing logic inside a Service (which are meant to run long time operations without user intervention). So, how can your second activity know what the progress of the task is? It can be done in different ways…

    • You can send broadcast messages from the service thread (the one that is processing the images), and catch them in your activity.
    • You can persist the progress somewhere and then make your activity read from there periodically.
    • If you want the progress to be in more real time, you can send a ResultReceiver to the service and make it notify the progress to the activity from there.
    • etc.
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have built a very simple blog application using Ruby on Rails. New to
I have an application that has multiple threads processing work from a todo queue.
I have this scala application which is very simple . All that it does
I have a very simple application test in which I want to drag and
I have a very simple application and I cannot make the WebView to show
I have written a very simple application to update my twitter status on a
I have written a very simple application tha accepts batches of telemetry log rows
We have a very simple ASP.NET web application comprising mostly static content and a
I have a very simple .net application for testing SMTP on .net. But i
I have written very very simple console application which supports some command line options.

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.