Basically, I made the source code from two different projects and combined it to try to create a new application that displays Bluetooth data in real time. The intermediate result is apparently harder than I can understand. I asked questions, received feedback, did a lot of reading, but I still stick to what I see as a problem: how can I get data from a data collection stream to a real-time graphing operation? This question requires some explanation.
I started with the source code from Blueterm , a Bluetooth terminal emulation program that supports SPP / RfComm. The first step was to create and launch Bluiate on my Android phone and connect to it and connect to an external Bluetooth data acquisition device. It went well: device data scrolls across the screen.
Next, I went to AndroidPlot and got the source code for the OrientationSensorExample , and I added this to my project to start this in the Options menu. Everything went well. My application launches the Orientation Sensor operation, which displays the orientation sensor data in real time, while continuing to receive data from the Bluetooth device in the background also in real time.
Now I want to change my application so that in the Sensoration Sensor action, Bluetooth data (rather than orientation sensor data) is displayed in real time. Using logcat, I know that Orientation Sensor activity displays real-time orientation sensor data and continues to receive Bluetooth data in the background in real time.
This speaks of the architecture: although my application draws the data of the orientation sensor in real time, there is a background stream that continues to receive Bluetooth data in real time. Or another way to look at this: Bluetooth was active, which generated / created / created / regardless of the background stream (or just the stream), which continues to work even after I started working with the orientation sensor (all this was observed through logcat).
, : ( Bluetooth) ?