安卓:发送短信(通过发件箱)

编程入门 行业动态 更新时间:2024-10-21 10:32:59
本文介绍了安卓:发送短信(通过发件箱)的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧! 问题描述

我工作的短信应用程序为Android,这无疑需要发送的短信(去图;!)

现在,我知道有很多的描述使用SmsManager的发送短信息在网络上的来源。但是,很显然,使用该方法时,短信息不存储在已发送文件夹.. 。其中是一种对短信应用程序的基本要求。

我如何添加一个条目(的消息)进入发件箱,以便它能够发送(或存储在发送文件夹自动).... 什么是字段的值_id,主题ID,读,状态,类型,service_center(消息表的属性)??

任何其他的替代品也欢迎。 :) 在此先感谢...

解决方案   

但是,很显然,当使用该   的方法,该短信息未存储在   已发送文件夹......这是怎样的   对于短信的基本要求   应用程序。

一个已发送文件夹的概念是一个应用,而不是操作系统的特征。如果你想创建自己的SMS客户端应用程序,创建自己的已发送文件夹中的应用程序的功能。你知道你要发送什么信息,这样你就可以将它们存储你喜欢的地方(例如,SQLite数据库)。

如果你想发送短信,并让它们出现在用户选择的SMS客户端的已发送文件夹,请不要使用 SmsManager的。相反,使用 ACTION_SENDTO ,并在消息由用户选择的SMS客户端发送,如证明的此示例项目。

I'm working on an SMS Application for Android, which undoubtedly needs to send SMSes (go figure! ;)

Now, i know there are a plenty of sources on the net that describe using the SmsManager to send SMSes...But, apparently, when using that method, the SMSes aren't stored in the "SENT" Folder...which is kind of a basic requirement for an SMS application.

How do i add an entry (of a message) into the "Outbox", so that it gets sent (and stored in the SENT Folder Automatically).... What would be the Values of the fields "_id,threadid,read,status,type,service_center" (Attributes of the message table)??

Any other alternatives are also welcome. :) Thanks in Advance...

解决方案

But, apparently, when using that method, the SMSes aren't stored in the "SENT" Folder...which is kind of a basic requirement for an SMS application.

The concept of a "SENT" folder is a feature of an application, not the operating system. If you wish to create your own SMS client application, create your own "SENT" folder as a feature of that application. You know what messages you are sending, so you can store them wherever you like (e.g., SQLite database).

If you want to send SMS messages and have them appear in the "SENT" folder of the user's chosen SMS client, don't use SmsManager. Instead, use ACTION_SENDTO and have the message be sent by the user's chosen SMS client, as is demonstrated by this sample project.

更多推荐

安卓:发送短信(通过发件箱)

本文发布于:2023-11-12 12:04:05,感谢您对本站的认可!
本文链接:https://www.elefans.com/category/jswz/34/1581454.html
版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系,我们将在24小时内删除。
本文标签:发送短信   发件箱

发布评论

评论列表 (有 0 条评论)
草根站长

>www.elefans.com

编程频道|电子爱好者 - 技术资讯及电子产品介绍!