Android sending and listening for sms being sent -
as of right here have. client know if sms sent, , upon send button being clicked return app.
how listen see if sms sent? in activities onactivityresult()? how tell sms client exit upon sending? need make own screen sending sms, , send sms directly without launching 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 need listen sms being sent, you'll need via android.telephony.smsmanager apis. there's no way guarantee whatever random sms app user uses return flag tell whether sent or not.
Comments
Post a Comment