Hello,
I have an android application with a database of records. I would like to send
some of those records to another instance of the same android application. In
order for this to happen I would like to use a phone number and a text message.
However the text message should not contain data to be read by the user of the
phone but should simply be read by the application on the other end and then
discarded. However I cannot find a good tutorial on this anywhere. To achieve
this purpose do I:
1. Set the message class to zero to make it disappear.
2. Use port numbers (do these work for GSM only or also on CDMA networks)?
In this case do I make up my own port number and hope no other application
on the receiving end will use it? I see SmsManager has a method called
sendDataMessage. Does this send a binary SMS?
3. Can I indeed use binary SMS? Is binary SMS supported on both GSM and CDMA?
4. I see the following methods in android.telephony.SmsMessage:
static SmsMessage.SubmitPdu getSubmitPdu(String scAddress, String
destinationAddress, short destinationPort, byte[] data, boolean
statusReportRequested)
Get an SMS-SUBMIT PDU for a data message to a destination address & port.
static SmsMessage.SubmitPdu getSubmitPdu(String scAddress, String
destinationAddress, String message, boolean statusReportRequested)
Get an SMS-SUBMIT PDU for a destination address and a message.
Is this what I use? Is destinationAddress the destination phone number?
What do I do with the SubmitPdu (payload data unit) once I have instantiated it?
5. Also, I've read status reports can take several days to get back so
are they not somehow pointless. Should I do without them
and have the receiving application send an outbound sms if any at all?
-----------------------------------------------------------------------------------------------------------------
Sorry for asking so many questions, I am just unsure on how to
proceed. For instance don't I have
to set the UDH header somehow or is this done automatically for me
with the above method? Or is
UDH just a GSM specific thing?
Thanks a lot for all clarifications,
John Goche
--
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en