As of Hangouts 2.0 Google have broken (or undocumented) how to send SMS body from third party apps via Intent.
This renders Sending SMS via an intent from your app on 4.4 completely broken.
The following Intents do not work:
Intent smsIntent = new Intent(Intent.ACTION_SENDTO);
smsIntent.setType("vnd.android-dir/mms-sms");
smsIntent.putExtra("address", "12125551212");
smsIntent.putExtra("sms_body","Body of Message");\
And
Intent sendIntent = new Intent(Intent.ACTION_SENDTO);
sendIntent.setData(Uri.parse("sms:"));
sendIntent.putExtra("sms_body", x);
Hangouts completely ignores setType("vnd.android-dir/mms-sms")
Falling back to the Uri.parse
method is the only option, but the app still ignores sms_body
key.
At this point in time its undocumented so playing around with a few variations of %body%
to no fruition.
Worth noting we tried http://www.ietf.org/rfc/rfc5724.txt to create a URI as per the spec.
sms:12345666777?body=Text here
but no help there.
*Note: I was using ACTION_VIEW, changed to ACTION_SENDTO, still to no avail*
This was fixed in hangouts 2.0.128 (2013-11-16)
Worth noting only ACTION_VIEW
and ACTION_SENDTO
both work now.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With