문제

I want to access the content provider for sms in Android version 4.4 onwards. I know about the following way

Uri sms = Uri.parse("content://sms/");

This doesn't seem to work for 4.4. Can anyone help and tell me the right path?

도움이 되었습니까?

해결책

Try below code Ekta:

Cursor c = cr.query(Telephony.Sms.Inbox.CONTENT_URI, // Official CONTENT_URI from docs
                      new String[] { Telephony.Sms.Inbox.BODY }, // Select body text
                      null,
                      null,
                      Telephony.Sms.Inbox.DEFAULT_SORT_ORDER // Default sort order);
라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top