📚 Encyclopedia

Android · updated 2026-10-13

Receiving MMS as the default SMS app

androidmmspduwap-pushsmstelephony

Incoming MMS on Android is a two-step dance: a WAP push SMS announces the message (M-Notification.ind), the app calls SmsManager.downloadMultimediaMessage(), and the system fetches the M-Retrieve.conf from the carrier's MMSC. The critical, poorly documented fact: when your app is the default SMS app, the system does not write the downloaded MMS into content://mms. Persisting it is your job.

The root cause that took four releases

AOSP's DownloadRequest.persistIfRequired() deliberately skips persistence when the requester is the default SMS handler. The system only writes the raw M-Retrieve.conf bytes into the file you passed to downloadMultimediaMessage(). An app that waits for a row to appear in content://mms waits forever, while the photo sits unread in its cache directory.

Three earlier "fixes" failed because they were never verified on the phone: the app was not even installed there, and another app (Textra) held the SMS role and was doing the persisting, which created the very symptoms being "fixed".

The working receive path

  1. MmsReceiver gets the WAP push, parses the notification, calls downloadMultimediaMessage() with a UUID-named file, a unique data URI on the PendingIntent, and an explicit component (setClass).
  2. MmsDownloadedReceiver reads the PDU file: PduParser(bytes, true).parse() then PduPersister.getPduPersister(ctx).persist(pdu, Telephony.Mms.Inbox.CONTENT_URI, true, true, null, subId).
  3. Mirror into the app database, deduplicating by Message-ID.
  4. Send the M-NotifyResp.ind acknowledgement to the MMSC, or the carrier may push the same message again.
  5. Notify.

Verified end to end: WAP push to notification in under a second, provider row with m_type=132, msg_box=1.

Gotchas

See also

Linked from

Sources: message memory (project_mms_debugging, project_bugs_fixed), Message app v2.8.0 to v2.10.0