Thanks for the suggestion. I wasn't clear enough, I'm reading two
analog values and store them over time; I store two values every ten
seconds, so I need a database.

I implemented a content provider and everything seems to work great so
far. Actually, it worked pretty well before, except I used to get log
entries from dalvikvm about sqlite errors (I'm ashamed to say I didn't
keep the logs so I can't provide any more details). The application
wasn't crashing or anything but being new to Android I wanted to make
sure I'm at least using the best and safest methods.

I have to update the charting functions to use the CP instead of
direct database access and I'm done.

Thank you all for your help!

Bogdan



On Apr 15, 10:03 am, Kostya Vasilyev <kmans...@gmail.com> wrote:
> Two values?
>
> Service running all the time?
>
> Just put them into static variables accessible from both your Service
> and Activity classes. Back up into shared preferences or a file, so you
> can reload the latest values if/when the service/process is killed.
>
> -- Kostya
>
> 14.04.2011 11:17, bogde пишет:
>
> > Thank you both for taking the time to reply.
>
> > I read about ContentProvider and also read the thread you gave me. It
> > definitely looks like CP is the best approach for me. So I will have
> > the service write data to the database via CP, and the Activity will
> > use CP to display data. I wonder if this adds any unneeded overhead to
> > the whole application. The application runs on a WM8505 based Chinese
> > tablet with only 128 MB of RAM. The purpose of the entire hardware and
> > software is to record and display two values. I really hope the
> > hardware is good enough for the requirements.
>
> > Thanks again!
>
> > Bogdan
>
> --
> Kostya Vasilyev --http://kmansoft.wordpress.com

-- 
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