How to get the SMS sender address in Android - android

I'm new to Android. I'm developing an application and I need to fetch the sender while parsing the message. We will be receiving biz messages like IM-ICICI, fb-623525 etc. I want to know how can I get the SMS address of such alphanumeric character senders.

Related

Android: How to listen to new Gmail messages

I'm creating an app that will use email message body to send SMS to a number. Anytime new mails are sent, the app gets the message and sends to a number.
Gmail api provides a way to fetch inbox messages passing the message id as a parameter
But is there a way to listen to a new mail? So that my function runs anytime a new mail is received.

Is that possible to send a message with Name of sender in android GCM.?

I have developed an android application which can send and receive push messages using Android GCM. Suppose if I am sending a push message to "xyz" device from "aaa" device I am getting a push messages succesfully, but what I need is that parallelly I wanted to display the name of the device which has sent a message with respect to the body of GCM message.
Ex:
xyz:
hi test
Please suggest me on this. Thanks in advance
Regards
Anand
You can send anything in the GCM message. If you want to send the name of the sender alongwith the message, you first need to get the name of the user and save it in a variable. Then add that name with the message in the GCM message. To differentiate the name and message part of the push notification, you can encode the GCM message in a JSON format and then send it to the other user. Then you can decode the message using JSON decoder.

How to use Service to receive sms and read sms from inbox and send sms message from inbox to another activity in Android?

I am working an Android project. In this project I am sending some data from android app to webserver.Now I am able to send data from Android client to WebServer using PHP- MySQL perfectly..Now my question is how to make an android app so that I can receive sms and after receiving sms, how to read sms from inbox and then how to send read(retrived) sms message to that app which is sending data(message) to webserver. I want to receive , read and send to an activity completely in a background.

Efficeint Handling of Multipart SMS or Long SMS in Android

I have a few questions on Android SMSManager.
How do I send long SMS, say more than 160 characters. My application send SMS
as an email when there if no wifi/data connection. The SMS as email
is retrieved by the server and the server sent a msg: "Your email has been
recieved". How do I show this message on the alert dialog box.
How do I retrieve long SMS?
Four of my activity is supposed to send sms, so do i need to have multiple BroadcastReciecver for each activity or can i simple handle with one BroadcastReciever? Can i have a snippet code on such?
Currently i part of code handles as all above. But i know my codes are in-efficeint. Thats one reason i have such question.
Please bear my question.

Is it possible to read and/or modify the SMS header on Android?

I am developing an Android application for 1.6 and above that sends and receives SMS messages through a port.
To send the SMS I am using the method:
SmsManager.sendDataMessage(String destinationAddress, String scAddress, short destinationPort, byte[] data, PendingIntent sentIntent, PendingIntent deliveryIntent)
but have discovered that the byte[] data should contain only the message body. There seems to be no method available to send multi-part data messages and no way of modifying the SMS header (UDH) to specify that the messages is, say, 1 of 3.
I'm having a similar problem on the receiving end when trying to extract the message count information from the SMS I have received through the specified port. I am using SMSMessage.getPdu() to extract a byte[] containing the message header and message body but have no way of extracting the specific information from the header data.
Does anyone know the format the Android platform uses for SMS headers?
You will need to check 3GPP SMS spec. For me, I got the destination port info from 30th and 31st byte.

Categories

Resources