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

  • Home
  • SEARCH
  • 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 5944909
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 22, 20262026-05-22T16:36:25+00:00 2026-05-22T16:36:25+00:00

Basically what I have done is taken source code from two different projects and

  • 0

Basically what I have done is taken source code from two different projects and cobbled it together to try to create a new application that plots Bluetooth data in real-time. The intermediate result is apparently more complicated than I am able to comprehend. I have asked questions, gotten feedback, done a lot of reading, but I am still stuck with what I see as the problem: How do I get data from a data acquisition thread into a plotting activity in real-time? This question requires some explanation.

I started with the source code from Blueterm, a Bluetooth terminal emulation program which supports SPP/RfComm. First step was to build and run Blueterm on my Android phone and get it to connect and communicate with an external Bluetooth data acquisition device. This went well – device data scrolls across the screen nicely.

Next I went to AndroidPlot and got the source code for OrientationSensorExample, and I added that to my project so that I could start this activity from the Options Menu. This went well also. My application starts the Orientation Sensor activity which plots Orientation Sensor data in real-time while continuing to acquire data from the Bluetooth device in the background also in real-time.

What I want to do now is modify my application so that the Orientation Sensor activity plots the Bluetooth data (not the Orientation Sensor data) in real-time. Using logcat I know for a fact that the Orientation Sensor activity is plotting orientation sensor data in real-time and continuing to acquire Bluetooth data in the background in real-time.

This suggests an architecture: While my application is plotting orientation sensor data in real-time there is a background thread that is continuing to acquire Bluetooth data in real-time. Or another way of looking at it: There was a Bluetooth activity that spawned/generated/created/whatever a background thread (or just a thread) that continues to run even after I have started the Orientation Sensor activity (all of this observed through logcat).

So the question remains: How do I pass data from this background thread (that was started by a Bluetooth activity) into the Orientation Sensor activity?

  • 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-22T16:36:26+00:00Added an answer on May 22, 2026 at 4:36 pm

    you can make your data as static or you can use Application class of Android framework.
    So that your background thread keep updating the static data and you will retrieve that updated data in your Activity.

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

Sidebar

Related Questions

I have the following code, which basically takes values from a database and populates
I basically have a server set up and I'm accepting new clients(UNIX) and i'm
I have requirements from our client where we basically have to 'parse' PDF files
I'm building a recipe-finder for a new food blog. The design I have basically
Basically what I'd like to do is have two output terminal windows for a
I basically have a page which shows a processing screen which has been flushed
I basically have the following flow: XML -> JSON -> Spring MVC -> jsp
I basically have something like this: void Foo(Type ty) { var result = serializer.Deserialize<ty>(inputContent);
I basically have three tables, posts, images and postimages (this simply contains the ids
I basically have a unix process running and it is doing some heavy processing

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.