Android SMS setting unique ID - android

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?

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

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?

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.

Related

Divert SMS programmatically in android

I am sending text message through my app. Can we divert SMS to another number in android programmatically?
I am not sure if i understand the question correctly.
You want to forward received SMS to another number?
If thats the case use a broadcastreceiver to listen for the intent android.provider.Telephony.SMS_RECEIVED.
Read the sms and send it to the other number
If your app is the one sending the text message, you certainly have control over which number to send it to.
The question is rather vague but you can easily set a number for your debug build to default to instead of using the number provided.

Is it possible to know : Did recipient receive my data SMS message

I'm working on a small application which use data SMS messages.
I know how to manage thé errors during the sending.
I sent several data sms to my contact but I don't know how to know if my data SMS have arrived or not
Can you help me?
When you call SMSManager.sendTextMessage the deliveryIntent parameter tells you whether it was received. This does no mean that the user actually saw it, it just means his network received the text. It may not have been sent to his phone, or it may have been and the user didn't notice the text. There is no way to tell that the user actually looked at it.

Android 4.4 sent SMS Stored in Inbox

In Android 4.4, My App is not an SMS App but it need to send SMS(multiple times).
The thing is that the Sent SMS will be stored in Default SMS App(Hangouts).
It would spam/annoy users a lots. I would like the SMS actions are transparent/silently with End-Users.
AFAIK, we may prevent this by setting my App at the moment I send the SMS & change back later.
But this is not really an option since end-user flow become complicated & may lead to confusion. another reason is Default SMS App may lose the System Broadcast when my App was set as Default SMS App.
Is there complete solution on this?
Thank you for you support.
If i am not wrong.. you want to send sms without storing in default sentitems list..????
The task you mentioning is possible without any confusion in the flow...
This can be done by setting the sentIndent in smsmanager to null.
public final void sendTextMessage (String destinationAddress, String scAddress, String text, PendingIntent sentIntent, PendingIntent deliveryIntent)
This will suppress the sentintent thereby avoiding to store in the default sent items...
There is also a previously discussed question regarding this topic in stackoverflow..
How to send SMS from the Android app without making its record in device SMS view?
Check it out...
If you could share the code u use for sending message.. It would be more easy to help for others...

Is this possible to hide/Change the sender mobile number while sending sms in android?

How can we hide/change sender's mobile number while sending a SMS to a receiver.
For example if I send a sms to some number 1234567890, the receiver can receive my sms without knowing my number.
I had gone through in couple of Questions in Stack Overflow regarding this and it was mentioned that it is not possible to hide / change the sender number.
But I can see some apps in android market which hides the sender SMS number.
Note : In the app, they had clearly mentioned
Your network-operator must support hiding your caller ID.
I want to know if Network Providers in the US support this option or not. Also how can I find out my Network provider supports this and what API I have to use for hiding the sender's mobile number?
It would be awesome if I got any clue in this
Here are the existing questions
change the sender number when sending sms
How to change sender mobile number in Android SMS service
Here's the App Link
SecretSheep
Mr.Hide
No.
But what you can do is use an SMS gateway which enables you to hide the callerID or which gives it a specific name. Just an alternative suggestion.
for example take that site, http://api.textmagic.com/ -> http://api.textmagic.com/https-api/textmagic-api-commands#send
It depends on the providers. Mostly they don't support this.
http://learntelecom.com/sms-fraud/
As described in this document SMS faking is impossible without considerable efforts by the technical staff running the SMS-C. In other words, it does not happen either by accident, faulty configuration data or as the result of raw text messages received from the Internet. It happens because in most cases it requires a software patch on the SMS-C. Therefore; any instances of this happening are as the result of direct action by SMS-C staff, and probably in conjunction with assistance from the staff of the Associated PLMN.

Android: Is there an onSMSSend event?

I've got an idea for an Android Application, however I am unsure if it would work. Essentially what I want to do is "intercept" all text messages sent from any SMS App and make modifications to them.
For example, say I write out the following SMS:
Hi {Name}, how are you today? Can you tell {Boss} I'll be 15 minutes late today.
The onSMSSend function in my application(assuming it is currently running in the background) would then be able to edit the content of the message(Eg. Replacing variables with ones defined in the application), and then send it on to the recipient.
Is Android able to provide this functionality?
No it is not. Android may be able to inform you after an SMS was send. But there is no way to intercept a message that should be sent and apply changes to it on a non rooted phone.
What you could do is to write a new messaging App that allows the user to type a message, choose a number and send the message. Now you have full control over the message that is send but building a replacement for the sms app is a fair amount of work.

Categories

Resources