Posts tagged html

Sending HTML Email With Android Intent

It’s very easy to send email via an Android intent. Here’s an example where we already have the subject and body prepared but want to let the user decide on the recipient:

final Intent emailIntent = new Intent(android.content.Intent.ACTION_SEND);
emailIntent.setType("text/plain");
emailIntent.putExtra(android.content.Intent.EXTRA_SUBJECT, subject);
emailIntent.putExtra(android.content.Intent.EXTRA_TEXT, body);
startActivity(Intent.createChooser(emailIntent, "Email:"));

(It’s important to note that this should be attempted on a real device.)

Setting An Image For Facebook Link Sharing

When you attach a link to share on Facebook, you’re typically presented with up to nine thumbnails pulled from img tags on that site. In many cases, one of these thumbnails will work fine, but sometimes the images aren’t ideal or the site owner wants a specific image to show up. Fortunately, there’s [...]