0

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!

Arief Rivai
  • 228
  • 6
  • 19

1 Answers1

-1

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.

Original Source Here.

Community
  • 1
  • 1
Chirag
  • 56,621
  • 29
  • 151
  • 198
  • I used android.telephony.SmsManager.sendTextMessage, and messages were appearing in the outbox(in a Samsung Galaxy something, and an HTC phone, don't remember the exact model). According to your answer they modified the android OS in such a way that it stores every message sent and provide the sent messages to the apps which require it? –  Mar 10 '13 at 19:52