[android-developers] Increment field Via Content Values?

2011-04-16 Thread Paul
I have an app that as the user opens 'things' from the ListView, I want to update their view count as they are opened. Currently doing this via raw SQL (...SET views = views + 1...), but would like to run this operation through my content provider's 'update' method, if possible. Does anyone now

Re: [android-developers] Increment field Via Content Values?

2011-04-16 Thread Kostya Vasilyev
ContentProviders are somewhat more abstract than SQL... You could have a special URI that means increment this item's view count, e.g.: authority/item/# - for operations on the entire item authority/item/#/viewcount - updating would increment the view count by one It might also be possible