Background: I am developing an Android application with Eclipse that has several activities and uses intents to start them (does that make sense?). I have programmed a Data Acquisition activity to start a Plotting activity using the Options Menu. Right now it works to some degree. The Data Acquisition activity acquires data and quickly scrolls it across the screen continuously. Then from the Options Menu I can start the Plotting activity which plots some “made up” data like a sine wave.
Problem: How can I feed the data that is continuously coming from the Data Acquisition activity into the Plotting activity? I don’t think putExtra() is the right way to do this since the data is coming continuously. I need some suggestions where to look for a solution. StackOverflow is showing there are no questions/answers about Android streaming data from one activity to another.
Since only one activity ever runs at a time, it’s not possible for them to transfer data between each other at the same time. To do this, you’ll need to write a
Servicethat acquires the data. This data could then be stored as a file, or in an sqlite database, and read by the graphing activity.