Read inbox messages of a particular number and display them in an activity

后端 未结 3 1840
一整个雨季
一整个雨季 2020-12-05 09:53

I am trying to read messages from an inbox and display them in an activity. My activity contains a button and listview. When I click on the button, all messages from the inb

3条回答
  •  醉酒成梦
    2020-12-05 10:28

    If you want to read messages only from particular number you need to somehow filter your data.

    This example filter cursor and sort it.

          selection = "_id = " + 15;
          Cursor curSms = context.getContentResolver().query(smsUri, null, selection,   null, "date ASC");
    

提交回复
热议问题