SMS内容提供者光标为空

时间:2018-10-07 09:08:29

标签: android cursor sms

这是在选定日期内获取SMS日志的代码,但它返回空光标:

        long lFrom = login.getTime();
        long lTo= logout.getTime();

        String[] whereValue = {String.valueOf(lFrom),String.valueOf(lTo)};
 Cursor cursor = this.getContentResolver().query(allMessages, new String[]{"date", "type", "address"},
            Telephony.Sms.DATE + " BETWEEN ? AND ?", whereValue, null);

0 个答案:

没有答案