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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 8, 20262026-06-08T11:38:50+00:00 2026-06-08T11:38:50+00:00

I am targeting Android 4.0 and am communicating with a telemetry device using TCP/IP.

  • 0

I am targeting Android 4.0 and am communicating with a telemetry device using TCP/IP. Android 4.0 forces all networking to be done in a separate thread. First I open a socket, then I contact the device and download some information all from a separate thread. At this point I want to display a progress dialong to show the progress of downloading more detailed information. My problem is that I cannot show the progress dialog from anywhere but the main UI. But, I do not know when I have reached the point in the other thread where I am ready to display the progress dialog. Is there some way I can check for this from the main UI without tying up the system?

  • 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-08T11:38:52+00:00Added an answer on June 8, 2026 at 11:38 am

    To trigger the dialog on your main ui, you need to use ‘context.runOnUiThread()’ where context is the reference to your display activity. It’s also worth looking into using an AsyncTask.

    Here is an android blog post that explains everything in detail: http://android-developers.blogspot.ca/2009/05/painless-threading.html

    As an aside, you can also just start displaying a indeterminate progress dialog from the start, so the user is never waiting without visual feedback, then switch to the determinate when you know the download details.

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

Sidebar

Related Questions

I'm using android-mips-ndk-r5b-windows and latest sdk , I'm targeting Android 2.2 cygwin 1.79 the
This is my first attempt at an Android app. I'm targeting Android 4/Ice Cream
I'm using the Android compatibility library, targeting Android 2.2. If I use ListFragment With
I put together my first Mono for Android project (targeting API level 8, minimum
I'm using NEON SIMD instruction to write a part of an Android app, targeting
I'm working on an android app that we're targeting for all screen sizes? How
I'm writing code targeting ARM Cortex-A on Android devices (using GNU assembler and compiler),
I am trying to implement signature capture using Rhodes targeting an Android tab. I
I developed one simple android application targeting the Mobiles with android 2.0 OS.I want
I developed a win forms app targeting .net 2.0. All of this is in

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.