<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>A Dash Of Web and Mobile Development &#187; html</title>
	<atom:link href="http://blog.iangclifton.com/tag/html/feed/" rel="self" type="application/rss+xml" />
	<link>http://blog.iangclifton.com</link>
	<description>Discussing trends and technologies in web and mobile development</description>
	<lastBuildDate>Wed, 28 Jul 2010 17:06:25 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.9.2</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>Sending HTML Email With Android Intent</title>
		<link>http://blog.iangclifton.com/2010/05/17/sending-html-email-with-android-intent/</link>
		<comments>http://blog.iangclifton.com/2010/05/17/sending-html-email-with-android-intent/#comments</comments>
		<pubDate>Tue, 18 May 2010 02:55:15 +0000</pubDate>
		<dc:creator>Ian G. Clifton</dc:creator>
				<category><![CDATA[Mobile Development]]></category>
		<category><![CDATA[android]]></category>
		<category><![CDATA[email]]></category>
		<category><![CDATA[html]]></category>

		<guid isPermaLink="false">http://blog.iangclifton.com/?p=216</guid>
		<description><![CDATA[It&#8217;s very easy to send email via an Android intent.  Here&#8217;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(&#34;text/plain&#34;);
emailIntent.putExtra(android.content.Intent.EXTRA_SUBJECT, subject);
emailIntent.putExtra(android.content.Intent.EXTRA_TEXT, body);
startActivity(Intent.createChooser(emailIntent, &#34;Email:&#34;));

(It&#8217;s important to note that this should be attempted on a real device.)
I ran into [...]]]></description>
			<content:encoded><![CDATA[<p>It&#8217;s very easy to send email via an Android intent.  Here&#8217;s an example where we already have the subject and body prepared but want to let the user decide on the recipient:</p>
<pre class="brush: java;">
final Intent emailIntent = new Intent(android.content.Intent.ACTION_SEND);
emailIntent.setType(&quot;text/plain&quot;);
emailIntent.putExtra(android.content.Intent.EXTRA_SUBJECT, subject);
emailIntent.putExtra(android.content.Intent.EXTRA_TEXT, body);
startActivity(Intent.createChooser(emailIntent, &quot;Email:&quot;));
</pre>
<p>(It&#8217;s important to note that this should be attempted on a real device.)<span id="more-216"></span></p>
<p>I ran into some trouble with sending HTML in an email because it was being interpreted as plain text both in the user&#8217;s email client and in the recipient&#8217;s.  Simply changing the MIME type didn&#8217;t help, but I eventually came across the solution:</p>
<pre class="brush: java;">
final Intent emailIntent = new Intent(android.content.Intent.ACTION_SEND);
emailIntent.setType(&quot;text/html&quot;);
emailIntent.putExtra(android.content.Intent.EXTRA_SUBJECT, subject);
emailIntent.putExtra(android.content.Intent.EXTRA_TEXT, Html.fromHtml(body));
startActivity(Intent.createChooser(emailIntent, &quot;Email:&quot;));
</pre>
<p>Note that both the MIME type is changed and the EXTRA_TEXT is now set as <code>Html.fromHtml(body)</code> instead of just being passed a string with HTML in it.  So far I&#8217;ve only tested this on a Nexus One running Android 2.1, but I&#8217;ll give it a try on some other platforms and see if it works.</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.iangclifton.com/2010/05/17/sending-html-email-with-android-intent/feed/</wfw:commentRss>
		<slash:comments>21</slash:comments>
		</item>
		<item>
		<title>Setting An Image For Facebook Link Sharing</title>
		<link>http://blog.iangclifton.com/2009/12/31/setting-an-image-for-facebook-link-sharing/</link>
		<comments>http://blog.iangclifton.com/2009/12/31/setting-an-image-for-facebook-link-sharing/#comments</comments>
		<pubDate>Thu, 31 Dec 2009 10:02:03 +0000</pubDate>
		<dc:creator>Ian G. Clifton</dc:creator>
				<category><![CDATA[Web Development]]></category>
		<category><![CDATA[facebook]]></category>
		<category><![CDATA[html]]></category>

		<guid isPermaLink="false">http://blog.iangclifton.com/?p=82</guid>
		<description><![CDATA[When you attach a link to share on Facebook, you&#8217;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&#8217;t ideal or the site owner wants a specific image to show up.  Fortunately, there&#8217;s [...]]]></description>
			<content:encoded><![CDATA[<p>When you attach a link to share on Facebook, you&#8217;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&#8217;t ideal or the site owner wants a specific image to show up.  Fortunately, there&#8217;s a simple tag you can add to solve this problem.<span id="more-82"></span></p>
<p><code>&lt;link rel="image_src" href="http://example.com/logo.png" /&gt;</code></p>
<p>Just put that tag in the head portion of your HTML, and the image specified (in this case &#8220;logo.png&#8221;) will be the new default (and only) choice for Facebook sharing.  There are a few things that you should know though.  First, Facebook caches these images, so you may not see the immediate change.  I&#8217;m not sure exactly how long the cache is, but I saw changes in under 24 hours on a site I was working on.  The other really big thing to know about is that Facebook has specific rules for the image:</p>
<blockquote><p>The thumbnail&#8217;s width or height must be at least 50 pixels, and cannot exceed 130&#215;110 pixels. The ratio of both height divided by width and width divided by height (w / h, h / w) cannot exceed 3.0. For example, an image of 126&#215;39 pixels will not be displayed, as the ratio of width divided by height is greater than 3.0 (126 / 39 = 3.23). Images will be resized proportionally. </p></blockquote>
<p>That&#8217;s per the <a href="http://wiki.developers.facebook.com/index.php/Facebook_Share/Specifying_Meta_Tags">developer wiki</a>.  Although some other sites also make use of the tag and specified image, your image must meet these requirements for it to work with Facebook sharing.  If your image does not meet these requirements, it will not show up at all, and no other options will show up either.  People will not be able to select any thumbnail when sharing your site.</p>
<p>It&#8217;s also worth noting that Facebook makes use of the traditional meta tags (title and description), so you should be sure to include those on your pages.  I know many people have gotten out of the habit of adding them in because they were most commonly used with search indexing, but most search engines use context from your actual content instead of those tags.</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.iangclifton.com/2009/12/31/setting-an-image-for-facebook-link-sharing/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
