检索棉花糖中的SMS [英] Retrieving SMS in marshmallow

查看:122
本文介绍了检索棉花糖中的SMS的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我的本​​地收件箱中的SMS失败.我无法从我的应用程序中检索它.我使用的查询是:

I have a failed SMS in my native inbox. I m not able to retrieve it from my application. The query I use is:

content://mms-sms/conversations/73

SELECT transport_type, _id, thread_id, address, body, date, date_sent, read, type, status, locked, error_code, sub, sub_cs, date, date_sent, read, m_type, msg_box, d_rpt, rr, err_type, locked, st FROM (SELECT DISTINCT date * 1 AS normalized_date, 'sms' AS transport_type, _id, thread_id, address, body, date, date_sent, read, type, status, locked, error_code, NULL AS sub, NULL AS sub_cs, date, date_sent, read, NULL AS m_type, NULL AS msg_box, NULL AS d_rpt, NULL AS rr, NULL AS err_type, locked, NULL AS st FROM sms WHERE (thread_id = 73 AND (type != 3)) UNION SELECT DISTINCT date * 1000 AS normalized_date, 'mms' AS transport_type, pdu._id, thread_id, NULL AS address, NULL AS body, date, date_sent, read, NULL AS type, NULL AS status, locked, NULL AS error_code, sub, sub_cs, date, date_sent, read, m_type, msg_box, d_rpt, rr, err_type, locked, st FROM pdu LEFT JOIN pending_msgs ON pdu._id = pending_msgs.msg_id WHERE (thread_id = 73 AND msg_box != 3 AND (msg_box != 3)) ORDER BY normalized_date ASC) ORDER BY normalized_date ASC

其中73是线程ID.在棒棒糖和奇巧中,效果很好.但是在棉花糖中,它返回"0"新消息.

where 73 is the thread ID. In lollipop and kitkat , it works fine. But in marshmallow, it returns "0" new messages.

请在这里帮助我.

棉花糖中的本机SMS DB参数是否有变化?

Was there any changes in native SMS DB params in marshmallow???

推荐答案

之所以会出现此问题,是因为在棉花糖中,查看SMS的访问受到限制.创建一个名为"sms_restricted"的SQL视图,它仅包含MESSAGE_TYPE_INBOX和MESSAGE_TYPE_SENT.独自暴露给其他应用程序开发人员.

This issue occurs because in marshmallow, there is a restricted access in viewing SMS. A SQL view is created named "sms_restricted" and it contains only MESSAGE_TYPE_INBOX and MESSAGE_TYPE_SENT. That is alone exposed to other application developers.

除非将我们的应用程序设置为默认消息传递应用程序",否则无法访问失败的消息,草稿消息,发件箱消息,排队的消息.

The failed messages, draft messages, outbox messages, queued messages are not accessible unless our application is made as "Default Messaging application".

这篇关于检索棉花糖中的SMS的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆