Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Android SMS Intent Hangouts 2.0

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*

like image 977
Chris.Jenkins Avatar asked Nov 11 '22 18:11

Chris.Jenkins


1 Answers

This was fixed in hangouts 2.0.128 (2013-11-16)

Worth noting only ACTION_VIEW and ACTION_SENDTO both work now.

like image 142
Chris.Jenkins Avatar answered Nov 15 '22 04:11

Chris.Jenkins