[android-developers] content provider locking?

2012-03-08 Thread bob
So, I have a content provider that maintains a list of movies. Also, there is a service that runs in the background and refreshes the list of movies every five minutes. Is there a good way to ensure no one accesses the content provider's list of movies while they are being refreshed? I

Re: [android-developers] content provider locking?

2012-03-08 Thread James Black
Have the service do a callback to activities during just before starting and after to prevent this, and return an empty list if they are not well-behaved and request during this time. On Mar 8, 2012 9:43 AM, bob b...@coolfone.comze.com wrote: So, I have a content provider that maintains a list

Re: [android-developers] content provider locking?

2012-03-08 Thread Kostya Vasilyev
Using a database transaction should work too. Or a ping/pong generation number. 08.03.2012 18:53 пользователь James Black planiturth...@gmail.com написал: Have the service do a callback to activities during just before starting and after to prevent this, and return an empty list if they are not