I'm new here and new to Android development too, so I want to
apologize for my ignorance.

I'm working on an application that is supposed to gather some data
from an external device continuously, display the data on a chart in
real-time and also store data so it's accessible at a later time as a
table or as a chart. The application needs to store the data all the
time, even if it's not active on the screen.

Currently I have a service that starts on boot and deals with
receiving the data and storing it inside a sqlite database. The
service opens the database and keeps it open all the time, until it's
killed. This part seems to work pretty well so far.

Now, I would like to have an activity that retrieves the last 60
values from the database and plots them on a chart. I'm currently
using Android Plot. I need to have a thread or something that
constantly checks for database changes and redraws the chart on the
screen if needed. My question is, what would be the best way to
accomplish this? How to "share" the database between the service that
runs all the time and an activity?

I searched and answers to somewhat similar questions are all over the
web. However, most people talk about how to share the database between
two or more activities or between an activity and a service that is
started temporarily.

Thanks!

-- 
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en

Reply via email to