I've written my own FilteredCursor that filters rows away from one
cursor, by joining it with another (uses CursorJoiner internally).
It suits my needs and is not quite general. The sort ASC presumption
is a big downside. It's in the source code for my Collectionista
project (revision 48,
On Dec 14, 4:23 pm, pjv ezelsping...@gmail.com wrote:
Would you please share your custom solutions (in code) for reuse?
Sure - take a look at jarkman.co.uk/code/
JoiningAndFilteringCursors.zip
There are two CursorWrapper derived classes in there, FilteringCursor
and JoiningCursor.
Richard, Mark,
Would you please share your custom solutions (in code) for reuse?
CursorJoiner doesn't do very much and doesn't seem to be able to give
you a new joint Cursor back eventually. I think a lot of people could
benefit from some code reuse here.
Thanks,
pjv
On 6 dec, 09:53, jarkman
pjv wrote:
Would you please share your custom solutions (in code) for reuse?
Alas, my implementation was made under contract for another firm, so I
cannot release it at this time.
I'll see about rewriting it at some point, perhaps as part of a chapter
in my upcoming Advanced Android book. I
Mark - thanks for the suggestion.
I ended up making a couple of general-purpose CursorWrapper
subclasses, one for joining two providers one for filtering a
provider (with a callback to define the desired rows).
They certainly seem to work, and they make the calling code very tidy.
I do still
Dianne - thanks for the confirmation. I had spent a while banging my
head on this issue, convinced that there ought to be an easy way if
only I found the right ContentProvider magic.
I can see that we will need to solve similar problems more than once,
and I would love to stay in the world of
On Wed, Nov 26, 2008 at 3:37 AM, jarkman [EMAIL PROTECTED] wrote:
I have the slightly hazy idea that we could write our own Cursor that
took a pair of Cursors and a join expression, so as to do this in a
general way. That would be handy in all sorts of ways. Do you think
that would be
I've been looking at a similar problem. Something like this:
Cursor cursor = context.getContentResolver().query(
Contacts.GroupMembership.CONTENT_URI,
new String[]
{Contacts.GroupMembership._ID,Contacts.GroupMembership.PERSON_ID,
jarkman wrote:
I'd love to make a cursor which also included the name of the person,
but as far as I know there is no way to do that with a single query.
That's probably true.
That is, as far as I can tell, there's no way to do a join via the
content provider interface, and permissions
9 matches
Mail list logo