0

I want to receive a SMS delivery notification in an Android app. I could register a BroadcastReceiver, get the pdu, construct a SmsMessage from the pdu, and get the status code (sms.getStatus()). See Android SMS delivery notification on failure: false positive .

Now, the status code is either a CDMA(3gpp2) status code shifted left by 16 bits, or a GSM(3gpp) status code.

To know what the status code 0 means, I have to tell a CDMA message from a GSM one.

For CDMA,

0 = Message accepted
2 = Message delivered

while for GSM

0 = Short message received by the SME
# that is, by the recipient phone

The Android source guesses the message type from the network type, but unfortunately this stuff is declared as either private or @hide.

Given a pdu, I need to find out its format to be able to interpret the zero status code.

Community
  • 1
  • 1
18446744073709551615
  • 16,368
  • 4
  • 94
  • 127

1 Answers1

0

The intent from which I extract the pdu has another extra: format => 3gpp. Not sure if all phones would provide it and starting from which API level.

18446744073709551615
  • 16,368
  • 4
  • 94
  • 127