Skip to content

Instantly share code, notes, and snippets.

@asparagui
Created January 16, 2014 22:17
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save asparagui/8464567 to your computer and use it in GitHub Desktop.
Save asparagui/8464567 to your computer and use it in GitHub Desktop.
Uri path=Uri.parse("android.resource://" + getActivity().getApplicationContext().getPackageName() + "/" + R.drawable.ticket_image_temp);
Intent sendIntent2 = new Intent(Intent.ACTION_SEND);
sendIntent2.setClassName("com.android.mms", "com.android.mms.ui.ComposeMessageActivity");
sendIntent2.putExtra("sms_body", "some text");
sendIntent2.putExtra(Intent.EXTRA_STREAM, path);
sendIntent2.setType("image/png");
startActivity(sendIntent2);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment