I wrote one that goes out to the internet and fetches data. In my code, I use the 'String[] projections' to create my own Cursor implementation. I make a subclass of 'Cursor', an instance of which will be returned by my ContentProvider's query method. The constructor of this Cursor-subclass takes the 'projections' as an input parameter and the subclass uses it to correctly implement the method 'getColumnIndex(String columnName)'.
I don't know about MatrixCursor, though. I can't help you there :) If 'projections' is null, I simply pass a String-array to this constructor holding all possible column-names for my ContentProvider. On Mar 16, 1:45 pm, Ray Bellis <ray.bel...@gmail.com> wrote: > Has anyone got an example of how to write a ContentProvider that gets > its data from somewhere other than a SQLLite database? > > Mine is half working, in so much as I can retrieve the requested data > and apparently populate a MatrixCursor, but I can't figure out what > I'm supposed to do with the 'projections' parameter supplied to the > 'query()' method. > > thanks, > > Ray --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Android Developers" group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers-unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -~----------~----~----~----~------~----~------~--~---