I need to pass a Cursor (SQLiteCursor) from a service to an application on API 10, and having hard time finding a decent (and fast) solution.
I’ve seen the CursorWindow class. This is Parcelable but I can’t instantiate this class on API 10 to use SQLiteCursor.fillWindow() because it has no valid constructors. CursorWindow(boolean) is deprecated.
And even if I got a CursorWindow instance with data from a SQLiteCursor, how do I copy this window into a new Cursor? What Cursor implementation should I use for this? I see no usable Cursor that extends AbstractWindowedCursor.
Thanks for your time!
I implemented a
ParcelableCursorclass that implementsCrossProcessCursorandParcelableinterfaces. I’ll post it if anyone is interested. Some operations are not supported/implemented yet, as well as using a customBijectiveMap(which is quite easy to implement).Still looking for a more standard way to do this. Any information would be appreciated greatly!
EDIT: this passed very few tests, so test it before using it.
EDIT2: in fact, it’s full of bugs… I’ll update with a less buggy version soon.
EDIT3: updated with working cursor we are using since one year.