as of right now here is what I have. However the client would now like to know if the sms was actually sent, and upon the send button being clicked they would like to return to the app.
how would you listen to see if the sms was sent? would it be in the activities onActivityResult()? how would you tell the sms client to exit upon sending? do I just need to make my own screen for sending the sms, and send the sms directly without launching a sms app?
public static void launchSMSIntent(String to, String body, Context context)
{
Intent smsIntent = new Intent(Intent.ACTION_VIEW);
smsIntent.setType("vnd.android-dir/mms-sms");
if(to != null)
smsIntent.putExtra("address", to);
if(body != null)
smsIntent.putExtra("sms_body", body);
((Activity)context).startActivityForResult(smsIntent, Constants.SMS_INTENT);
}
If you need to listen for the SMS being sent, you'll need to do it yourself via the android.telephony.SMSManager apis. There's no way to guarantee that whatever random SMS app the user uses will return a flag to tell you whether it was sent or not.