Note that there are some explanatory texts on larger screens.

plurals
  1. POSMS sent via SmsManager not automatically in SENT folder?
    text
    copied!<p>I send an sms via the SmsManager API as follows:</p> <pre><code>PendingIntent sentPI = PendingIntent.getBroadcast(context, 0, new Intent("SMS_SENT"), 0); PendingIntent deliveredPI = PendingIntent.getBroadcast(context, 0, new Intent("SMS_DELIVERED"), 0); SmsManager smsManager = SmsManager.getDefault(); smsManager.sendTextMessage(phone, null, formattedMessage, sentPI, deliveredPI); </code></pre> <p>I receive the SMS in the inbox, but the sent sms does not appear in the sent folder - so currently I add it manually via:</p> <pre><code>// store the sent sms in the sent folder (that shouldn't be necessary?!) ContentValues values = new ContentValues(); values.put("address", phone); values.put("body", formattedMessage); context.getContentResolver().insert(Uri.parse("content://sms/sent"), values); </code></pre> <p>But I'm curious if this is really necessary and the right way to do it. I am wondering, why would the message sent via sms manager not appear in the SENT folder automatically. Is that the right way to add it there manually?</p> <p>(I probably should hang the manual saving procedure into a broadcast receiver, so I only store it if the delivery was successful - but that's not part of the question at the moment).</p> <p>I found this thread on the Android google group, but is this really the only way to go?</p> <p><a href="http://groups.google.com/group/android-developers/browse_thread/thread/a3c581689d0db6e1/a1acf6d990ecce52?lnk=gst&amp;q=sms+sent#a1acf6d990ecce52" rel="nofollow">http://groups.google.com/group/android-developers/browse_thread/thread/a3c581689d0db6e1/a1acf6d990ecce52?lnk=gst&amp;q=sms+sent#a1acf6d990ecce52</a></p>
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload