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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 23, 20262026-05-23T01:50:27+00:00 2026-05-23T01:50:27+00:00

First, I should be clear by providing a little background: I’m using Eclipse to

  • 0

First, I should be clear by providing a little background: I’m using Eclipse to develop an Android application that plots Bluetooth data. It consists primarily of a Bluetooth Activity, a background thread created by the Bluetooth Activity, and a Plotting Activity.

The primary focus of my question: Once the Plotting Activity is known to be active, what approach can I use to send BluetoothData from the background thread to the Plotting Activity so I can plot it?

This is open source code that I am hacking. Using Logcat I know for a fact that the Bluetooth Activity created a background thread for continually producing BluetoothData even after the Bluetooth Activity is gone. And I have found the background method that logs the BluetoothData to Logcat. Now I want to leverage this method to send BluetoothData to the active Plotting Activity so I can plot it.

I can tell you what appears to work. Interested? Define a static method, plotData(BluetoothData) in the Plotting Activity and call if from the background thread. Clips along in real-time just fine. The plots are nice. But I’ve been told I shouldn’t have to use static methods as though there is some problem with that. So what else should I use?

Any suggestions?

  • 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-23T01:50:28+00:00Added an answer on May 23, 2026 at 1:50 am

    You shouldn’t use a background thread. Instead you should use a Service that collects the data. In this case every activity you create can bind to that service and be informed if new data was received. With a handler, the service can easily send the data to the activity that is binded.

    A little question: Can you please explain why there should be a problem with static methods and more precisely: which kind of problems?

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

Sidebar

Related Questions

[1] In JDBC, why should we first load drivers using Class.forName(some driver name). Why
I had a requirement where in the text field the first character should be
What should a small team choose for their first game, when they are low
First check out this code. I seems like it should work for me, but
What single aspect of agile development should we implement first to improve our development
Example: I have two shared objects (same should apply to .dlls). The first shared
First, let's get the security considerations out of the way. I'm using simple authentication
First off, I am using Windows XP. I have multiple hard drives and it
I thought by setting the first element to a null would clear the entire
EDIT: I'm not sure that my original question is clear enough. I need an

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.