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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 4, 20262026-06-04T11:35:41+00:00 2026-06-04T11:35:41+00:00

For a new project in Android I receive the location from various users from

  • 0

For a new project in Android I receive the location from various users from a server, which I then need to put on Google Maps as an overlay. Now this al works perfect except it seems impossible for me to change the location for the overlays periodically. I can’t use a timer cause it throws the ConcurrentModificationException when I remove and display the overlays again (which i understand why it does that, you can’t modify the overlays in another thread). I also can’t do this when receiving the new locations because I use websockets to retrieve them and this also works in a different thread.

Now is there some way i can update the UI periodically inside the UI thread, so the overlays can be removed (just moving the overlays would be fine also, but that still requires a periodic update I guess…)?

It seemed like such a simple problem but i’ve been searching for it for hours and can’t find any solution for it…

Any help on how this should be done would be very appreciated!

Greets!

E.

  • 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-04T11:35:43+00:00Added an answer on June 4, 2026 at 11:35 am

    Creat a Handler on your UI thread and store it in a class variable. Then, on your timer, or in your websocket thread use that handler to post a Runnable with the update code back to the UI thread.

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

Sidebar

Related Questions

My android app project need to add a new function of saving the click
I imported ApiDemos from android-sdk folder using File/New/Project/Android Project/Create Project Existing Samples. When I
So I started a new android project in my default workspace. Then I decided
When I start a new Android project in Eclipse (Helios), the strings.xml has 2
For a new project I need to load big XML files (200MB+) to a
I'm starting a new project that involves users paying to see educational videos. These
When creating a new android project, the build target has two choices: Android 2.2,
I just created a new project in android using eclipse. Just a plain and
I just created a new project on Android and it shows the following: I
I just created a new android project and prepared the basic structure for it.

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.