明确将新邮件保存到收件箱 [英] Explicitly saving new messages to inbox

查看:99
本文介绍了明确将新邮件保存到收件箱的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

关于content://sms/inbox的问题:

1)是否建议将传入消息显式存储到收件箱?
2)如果android设备具有本机消息传递应用程序,并且安装了我的消息传递应用程序,然后我将收到的消息显式存储到收件箱,消息会重复吗?
3)不管是否有消息传递应用程序,Android都会自动将新消息存储到收件箱中吗?

1) Is it advisable to explicitly store incoming messages to inbox?
2) What if an android device has a native messaging app and my messaging app was installed to it, and then I explicitly store incoming messages to inbox, will the messages duplicate?
3) Does android automatically store new messages to inbox regardless if there is a messaging application?

谢谢.

推荐答案

关于SMS,详细信息取决于Android版本.在KitKat之前,SMS API未记录.使用KitKat,默认SMS应用程序的概念 引入后,SMS API公开了.

Regarding SMS, details vary depending on the Android version. Prior to KitKat, the SMS API was undocumented. With KitKat, the concept of a default SMS app was introduced, and the SMS API became public.

是否建议将传入消息显式存储到收件箱中?

Is it advisable to explicitly store incoming messages to inbox?

  • Pre-KitKat:是的.如果您的应用程序是主要安装的SMS或仅安装了SMS,并且没有其他应用程序获得SMS_RECEIVED广播.

    KitKat及更高版本:如果您的应用程序是默认的SMS应用程序,则它负责将传入消息写入提供程序.如果不是默认值,则无关紧要,因为您的应用将无法访问提供程序.

    KitKat and on: If your app is the default SMS app, then it is responsible for writing the incoming messages to the Provider. If it isn't the default, then it's irrelevant, since your app won't have write access to the Provider.

    如果android设备具有本机消息传递应用程序并安装了我的消息传递应用程序,然后我将收到的消息显式存储到收件箱中,消息会重复吗?

    What if an android device has a native messaging app and my messaging app was installed to it, and then I explicitly store incoming messages to inbox, will the messages duplicate?

    • Pre-KitKat:是的.除非您的应用程序拦截并中止SMS_RECEIVED广播,否则本机应用程序将编写消息.

      • Pre-KitKat: Yes. Unless your app intercepts and aborts the SMS_RECEIVED broadcast, the native app will write the messages.

        KitKat及更高版本:在任何给定时间,只有一个应用程序可以是默认应用程序,并且只有该应用程序具有对Provider的写权限.如果未将应用选择为默认应用,则应相应地调整其行为.

        KitKat and on: Only one app can be the default at any given time, and only it has write access to the Provider. When an app is not selected as the default, it is expected to adjust its behavior accordingly.

        无论是否有消息传递应用程序,Android都会自动将新消息存储到收件箱中吗?

        Does android automatically store new messages to inbox regardless if there is a messaging application?

        • Pre-KitKat:否.本机消息传递应用程序已配置为处理写入.系统不会自动执行此操作.

          • Pre-KitKat: No. Native messaging apps are configured to handle the writes. The system doesn't do it automatically.

            KitKat及其它:否.如上所述,默认应用负责将传入消息写入提供商.

            KitKat and on: No. As mentioned, the default app is responsible for writing incoming messages to the Provider.

            这篇关于明确将新邮件保存到收件箱的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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