发送短信编程并不存储在发件箱? [英] Sending SMS programatically not stored in outbox?
问题描述
我在做一个项目的短信编程..我用这个code发送短信:
I'm making a project SMS programatically .. I use this code to send sms:
SmsManager sms = SmsManager.getDefault();
sms.sendTextMessage(phoneNumber, null, message, sentPI, deliveredPI);
如果消息发送和传递,而不是存储在发件箱。裘ü解决呢?谢谢!
If message sent and delivered, not stored in outbox. Cau u fix that? thanks!
推荐答案
一个已发送文件夹的概念是应用程序的功能,而不是操作系统。如果你想创建自己的SMS客户端应用程序,创建自己的已发送文件夹中的应用程序的功能。你知道你要发送什么信息,这样你就可以将它们存储你喜欢的地方(例如,SQLite数据库)。
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).
如果你想发送短信,并让它们出现在用户选择的SMS客户端的已发送文件夹,请不要使用SmsManager的。相反,使用ACTION_SENDTO和具有该消息可以由用户选择的SMS客户端发送的,足以证明通过此示例项目。
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.
这篇关于发送短信编程并不存储在发件箱?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!