好久没更新博客了,最近都在忙公司的短信项目,等过段时间空闲下来,再好好整理下短信相关的内容。这两天,被测试同事的华为荣耀8搞得焦头烂额,在其他手机能正常使用的Uri,在它身上却问题多多,不得不去吐槽国内定制系统…
private void query(String keyword) {
Uri searchUri = Telephony.MmsSms.SEARCH_URI.buildUpon().appendQueryParameter("pattern", keyword).build();
mQueryHandler.startQuery(0, null, searchUri, null, null, null, null);
}
content://mms-sms/conversations/
android.database.sqlite.SQLiteException: no such column: group_all (Sqlite code 1): , while compiling:
SELECT thread_id, address, body, date, _id FROM (
SELECT thread_id AS tid, date * 1000 AS normalized_date, NULL AS time_body, text_only, NULL AS group_id, ct_t, msg_box, v, retr_txt_cs, ct_cls, NULL AS type, st, NULL AS address, NULL AS person, tr_id, read, m_id, NULL AS body, NULL AS addr_body, m_type, network_type, locked, resp_txt, retr_st, NULL AS error_code, NULL AS group_all, NULL AS reply_path_present, sub, NULL AS risk_url_body, rr, ct_l, NULL AS status, NULL AS subject, _id, m_size, exp, sub_cs, NULL AS group_fail, sub_id, resp_st, date, date_sent, pri, NULL AS group_sent, thread_id, read_status, d_rpt, rpt_a, NULL AS is_secret, m_cls, NULL AS service_center FROM pdu WHERE ((msg_box != 3 AND (m_type = 128 OR m_type = 132 OR m_type = 130))) GROUP BY thread_id HAVING date = MAX(date) UNION SELECT thread_id AS tid, date * 1 AS normalized_date, time_body, NULL AS text_only, group_id, NULL AS ct_t, NULL AS msg_box, NULL AS v, NULL AS retr_txt_cs, NULL AS ct_cls, type, NULL AS st, address, person, NULL AS tr_id, read, NULL AS m_id, body, addr_body, NULL AS m_type, network_type, locked, NULL AS resp_txt, NULL AS retr_st, error_code, group_all, reply_path_present, NULL AS sub, risk_url_body, NULL AS rr, NULL AS ct_l, status, subject, _id, NULL AS m_size, NULL AS exp, NULL AS sub_cs, group_fail, sub_id, NULL AS resp_st, date, date_sent, NULL AS pri, group_sent, thread_id, NULL AS read_status, NULL AS d_rpt, NULL AS rpt_a, is_secret, NULL AS m_cls, service_center FROM sms_secret WHERE ((type != 3)) GROUP BY thread_id HAVING date = MAX(date)) GROUP BY tid HAVING normalized_date = MAX(normalized_date), (OS error - 2:No such file or directory)
content://mms-sms/
content://mms-sms/messages/byphone
content://sms/inbox