4

I am attempting to develop an Android application that sends and receives SMS messages (among other things)

i wish to have my apps SMS messages easily identifiable. I didnt want to use the SMS message body for this unique identifier, i thought there must be an SMS message attribute i can use. sadly i have failed to find one or track down a technical spec for SMS messages in general.

does anyone know if the SMS message standards have an ID field that can be se programmatically?

Hector
  • 4,016
  • 21
  • 112
  • 211
  • "Easily identifiable" by who? Timestmap + phone number should make for a pretty unique key, I think. – PVS Jul 08 '12 at 02:55
  • "Easily identifiable" by my application. it wasnt the content of the unique id i was interested in, just its location within the sms message format (e.g. sms "header") – Hector Jul 08 '12 at 07:09

3 Answers3

1

No, there is not. You can see the contents of an standard SMS message on page two of this document, and on this page.

Bryan Herbst
  • 66,602
  • 10
  • 133
  • 120
0

The way I have handled this is by setting an SMS listener with a higher priority than the system SMS listener that looks for a unique string in all received texts.

If the SMS contains the string I handle it in the application and discard the SMS so that I do not litter the users inbox.

The users message alert tone doesn't even go off. It works quite well.

See this post for more info on how to do this:

Can we delete an SMS in Android before it reaches the inbox?

Community
  • 1
  • 1
darryn.ten
  • 6,784
  • 3
  • 47
  • 65
  • thanks for spending the time to respond, however i didnt want to use the text content itself for the unique id. i imagined the sms standard would make a unique id available – Hector Jul 08 '12 at 07:08
0

i know it's been 4 years . but in case anyone passes through this question. yes SMS has unique id called _id and you can identify SMS through it.

for more info please refere to this answer.

Community
  • 1
  • 1
Mohamed Nageh
  • 1,963
  • 1
  • 19
  • 27