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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 26, 20262026-05-26T00:28:58+00:00 2026-05-26T00:28:58+00:00

I am developing a program which have 2 buttons : Start and End. When

  • 0

I am developing a program which have 2 buttons : Start and End. When i click Start it will start to get Locations in every 30sec. and send them to a server using socket connection. When i click the End button it will stop all works.
Can i do this without using thread? If i need to use threads what is the best way to implement it. Should i listen LocationProvider with LocationListener to get locations every 30sec and send them in a thread or should i create connection thread and get location in every and send.

  • 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-26T00:28:59+00:00Added an answer on May 26, 2026 at 12:28 am

    If you make a connection in the UI main thread, you application will become unresponsive until the connection is terminated, which is wrong!!! You have to create a thread for each connection you establish, this is strongly recommended.

    You will have to create a thread that will sleep for 30 seconds each time and then do the work that you said.

    Your work should be done in threads, do not use the main thread for these things

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

Sidebar

Related Questions

I have a WPF program that I'm developing in which I want to catch
I am developing a C# program, and i have one function that consumes too
I'm trying to start a program using QProcess (Qt4.4 on vista64bit, developing in MSVC2005).
Ok, I am developing a simple program to do xmlhttprequests so I can get
I'm developing a small POS for a university project. I have a form which
I'm developing a program which allows users to input some information which then gets
I am developing a program which is capable of recognizing several hand gestures. Now
so i have a program i am developing and as im fairly new to
Sorry for the long title. I am developing a network program in C which
I am developing window application in C#. I have developed an installer which takes

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.