The Data content provider returns individual rows related to a record. Basically if you have a contact with a name, a phone number, and an email address, then the Data content provider will return 3 rows for that contact. The Data content provider returns some data for the record and its type (like Phone.CONTENT_ITEM_TYPE or Email.CONTENT_ITEM_TYPE). If you want to extract specific information about a contact like a phone number or address, then you'll have to constraint the returned rows to only those type of records using the where clause of the content provider (some examples are given here)...
I think I'm partially with you on this one. I understand that for each piece of data, you will get an individual row, and since I have stored the following :
name of James Elsey
name of Dave Smith
postcode for James elsey
postcode for Dave smith
phone number for James Elsey
Then that equates to 5 separate pieces of data, so that makes sense.
My confusion is your suggestion of using a where clause. I've looked at the examples you linked but I can't see how they will help. The examples use a contactID in the where clause to limit the results to a single contact, I don't want this
How can I get the fields for each contact, to have 2 rows in the cursor, so I can process each row individually (such as populating my POJO)?
If you want to get individual information about all contacts like phone numbers or email addresses or postal addresses, you can use separate content providers. Like to get phone numbers you can use Phone provider, to get email addresses, you can use Email provider and to get postal address, you can use StructuredPost provider. Again for all these content providers, there can be multiple rows for the same person, like if a person has a home phone no. and a work phone no, the phone provider will return 2 rows for one person...