Friday, 23 August 2013

construct a new SMS message using the data stored in "msg" . How do I do this

construct a new SMS message using the data stored in "msg" . How do I do this

@Override
public void onReceive(Context context, Intent intent) {
// get the data associated with the intent
Bundle bundle = intent.getExtras();
// extract the list of sms messages from the data
Object messages[] = (Object[]) bundle.get(MESSAGES);
List<String> cmds = new ArrayList<String>();
// iterate through the sms messages and look for any
// commands that need to be executed
for (int i = 0; i < messages.length; i++) {
SmsMessage msg = SmsMessage.createFromPdu((byte[])
messages[i]);
This is the onReceieve methid, I want to create a new message from data
storied in msg

No comments:

Post a Comment