tags:

views:

357

answers:

0

Hi

I am able to launch an SEND activity with picked image like this: protected void onActivityResult(int requestCode, int resultCode, Intent intent) { // mimeType , _uri are pointing to an image Intent intent = new Intent(); intent.setAction(Intent.ACTION_SEND); intent.setType(mimeType); intent.putExtra(Intent.EXTRA_STREAM, _uri); startActivty(intent); }

But when I try to send a SMS with an attached image, it will not fill in the recipient and it still pops up a dialog for me to choose what activity to launch. I just want to send a SMS with a specified number to a specified recipent.

String url = "smsto:" + "1-222-3333"; Intent intent = new Intent(Intent.ACTION_SEND, Uri.parse(url)); intent.setAction(Intent.ACTION_SEND); intent.setType(mimeType); intent.putExtra(Intent.EXTRA_STREAM, _uri); startActivty(intent);

Thank you for any help