ContentProvider we've implemented a couple of these methods, which we all know. But the cursor returned by the query method is implemented by itself and then the data structure that needs to be passed in to the cursor in its own writing is incorrect. Sometimes it might feel like it can Testing is not possible because the cursor is pointing to a collection of underlying data that cannot carry data or that should not carry data
Cursor is initialized when the pointer points to the data collection where the position is-1 this will always be thrown without this value.
The document says that when the cursor should be implemented instantiate a matrixcursor it's actually a table of our own custom.
string[] columns = new string[] {"_id", "_value"};
Matrixcursor cursor = new matrixcursor (columns);
This is the table of our own established table the first column is the ID the second column is value
This gives you a table instead of a database or a cursor interface.
string[] STRs = new string[]{"0", "a"};
Cursor.addrow (STRs);
So we've written id=0 value=a for the table.
When we use the Contentresolver query method, the cursor will be passed right back without any exceptions inside the cursor wrapper.
ContentProvider provides custom data structures