我有一个RealmResults <Student>对象.我想将它转换为RealmList <Student>对象.有什么建议?
我想获取特定发件人在手机中的短信列表.这些SMS是从SMS网关发送的,因此我没有发件人的号码.但是,我知道发件人的姓名,例如"Google".
这是我到目前为止所尝试的
final String SMS_URI_INBOX = "content://sms/inbox";
Uri uri = Uri.parse(SMS_URI_INBOX);
String[] projection = new String[] { "_id", "address", "person", "body", "date", "type" };
Cursor cur = getContentResolver().query(uri, projection, "person LIKE'%" + "Google" + "'", null, "date asc");
Run Code Online (Sandbox Code Playgroud)
但是,光标为空.