0

I am working on a messaging android app. I have a listview of messages and I want to show conversation when I click on an item (I mean I want to show all the messages that I received from special contact and messages I send to it) I found this link

but I have problems with these lines of code since I don't know anything about content provider concept:

ContentResolver contentResolver = getContentResolver();
final String[] projection = new String[]{"*"};
Uri uri = Uri.parse("content://mms-sms/conversations/");
Cursor query = contentResolver.query(uri, projection, null, null, null);

what does {"*"} part mean in the second line? and why we are giving String[]projection as a projection to query method?

Community
  • 1
  • 1
Suzi
  • 89
  • 4
  • 16

1 Answers1

0

I read that I should not pass null to projection part cause it creates error so I should pass new String[]{"*"} and the app won't stop. here is the link where I find this answer.

Community
  • 1
  • 1
Suzi
  • 89
  • 4
  • 16