I’ve been fiddling with CB lite for a while now and I’m starting to encounter a few problems as a result of not approaching it from the right angle. I basically have a couple of activities that use the database and I haven’t been able to handle it well. What I did at first was to create a new instance of the StorageManager (which is the class that provides the database) on both activities and, since the database would be the same, I thought this would be ok for synchronization. This has created a lot of problems (specially when restarting the Replication pusher every time I resume an activity) and I thought it would be better to look it up here in the forum.
I’ve seen some recommendations about using a singleton or a content provider, as well as having a service running in the background doing all the syncing.
Using a simpleton is not recommended in android unless you use a library that manages the threads, and making a content provider seems like overkill to me.
Is there a sample case for this that I haven’t come by yet? am I missing something?
Thanks in advance.