<?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>jdamcd</title>
	<atom:link href="http://jdamcd.com/feed/" rel="self" type="application/rss+xml" />
	<link>http://jdamcd.com</link>
	<description>Makes things on Android. Cares about UX. Excited by mobile &#38; ubiquitous computing.</description>
	<lastBuildDate>Fri, 26 Apr 2013 13:07:26 +0000</lastBuildDate>
	<language>en-US</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.5.1</generator>
		<item>
		<title>One-shot banners</title>
		<link>http://jdamcd.com/one-shot-banners/</link>
		<comments>http://jdamcd.com/one-shot-banners/#comments</comments>
		<pubDate>Thu, 25 Apr 2013 21:31:59 +0000</pubDate>
		<dc:creator>jdamcd</dc:creator>
				<category><![CDATA[Android]]></category>

		<guid isPermaLink="false">http://jdamcd.com/?p=283</guid>
		<description><![CDATA[I like users. I don&#8217;t want to frustrate them with a modal dialog that asks them to rate an app minutes after installation. It would be nice to invite them to do that at some appropriate moment, though. Only if they want to. It needs to be easy to ignore. It needs to be easy to [...]]]></description>
				<content:encoded><![CDATA[<p>I like users. I don&#8217;t want to frustrate them with a modal dialog that asks them to rate an app minutes after installation. It would be nice to invite them to do that at some appropriate moment, though. Only if they want to. It needs to be easy to ignore. It needs to be easy to make it go away forever.</p>
<p>I&#8217;ve been experimenting with what I&#8217;m going to call the <strong>one-shot banner pattern</strong> in <a title="Holo Sudoku" href="http://holosudoku.com">Sudoku</a>.</p>
<p><strong>Borrowed idea</strong></p>
<p><strong></strong>We ran a private beta when I was working on the Songkick Android app. The most common piece of feedback <strong>by far</strong> was that existing users wanted to log in straight away and couldn&#8217;t find the option. (It normally presents itself when you take an action that requires an account.)</p>
<p><a href="http://jdamcd.com/wp-content/uploads/2013/04/songkick_login.png"><img class="aligncenter size-full wp-image-288" alt="songkick_login" src="http://jdamcd.com/wp-content/uploads/2013/04/songkick_login.png" width="500" /></a></p>
<p>We sketched out a few different options: dialog, notification and banner. The log in/sign up banner won. It sits within the context of the app, it&#8217;s immediately visible without being jarring and it&#8217;s friendly to users that don&#8217;t want to take either action yet.</p>
<p><strong>Current implementation</strong></p>
<p>The version in <a title="Holo Sudoku" href="http://holosudoku.com">Sudoku</a> has evolved a little. It has more in common with the action bar, sharing a consistent height and action pressed states. It&#8217;s also slightly transparent to hint that it&#8217;s a transient feature of the UI.</p>
<p>In practical terms, this is just a <code>Fragment</code> added to the bottom of the <code>Activity</code> layout. Completing the action or pressing the dismiss button will remove the <code>Fragment</code> and <code>SharedPreferences</code> are used to maintain the shown state. All quite simple.</p>
<p><a href="http://jdamcd.com/wp-content/uploads/2013/04/banner_plus.png"><img class="aligncenter size-full wp-image-285" alt="banner_plus" src="http://jdamcd.com/wp-content/uploads/2013/04/banner_plus.png" width="500" /></a></p>
<p>The user is invited to +1 the game after 2 completed puzzles. This is just pressing a button so it&#8217;s pretty low commitment.</p>
<p><a href="http://jdamcd.com/wp-content/uploads/2013/04/banner_rate.png"><img class="aligncenter size-full wp-image-286" alt="banner_rate" src="http://jdamcd.com/wp-content/uploads/2013/04/banner_rate.png" width="500" /></a></p>
<p>I want to ask the user to rate the game once they&#8217;ve played long enough to have formed an opinion. (Hopefully the fact that they&#8217;re still playing means they like it.) This action takes the user out of the app to Google Play, which is potentially disruptive, so it&#8217;s only shown after 5 completed puzzles.</p>
<p><a href="http://jdamcd.com/wp-content/uploads/2013/04/banner_store.png"><img class="aligncenter size-full wp-image-287" alt="banner_store" src="http://jdamcd.com/wp-content/uploads/2013/04/banner_store.png" width="500" /></a></p>
<p>After 10 games, the user probably knows what difficulty they like to play. They might even be running low on puzzles of a particular level. This is probably a good time hint that there are more available.</p>
<p><strong>Click-through rates</strong></p>
<p>Roughly 1/30 users who are presented the rating banner click &#8216;Rate it!&#8217;. This suggests that it&#8217;s serving it&#8217;s purpose. It also makes a pretty strong case against doing something modal. The vast majority of people will not be interested in rating an app even if you know they&#8217;re active users when you ask.</p>
<p><strong>Other resources</strong></p>
<p>Stefano Dacchille has a great <a title="Deal with the unforeseen" href="http://mod3rn-android-coding.posterous.com/handle-the-unforeseen">blog post</a> on holding off asking users to rate an app if they&#8217;ve experienced a crash recently.</p>
]]></content:encoded>
			<wfw:commentRss>http://jdamcd.com/one-shot-banners/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>That sudoku game I made</title>
		<link>http://jdamcd.com/that-sudoku-game-i-made/</link>
		<comments>http://jdamcd.com/that-sudoku-game-i-made/#comments</comments>
		<pubDate>Sat, 13 Apr 2013 09:28:35 +0000</pubDate>
		<dc:creator>jdamcd</dc:creator>
				<category><![CDATA[General]]></category>

		<guid isPermaLink="false">http://jdamcd.com/?p=170</guid>
		<description><![CDATA[Building a thing for fun Back in November, I was browsing games on a rather boring train journey. There are a lot of sudoku games on Google Play. Some of them have respectable ratings and millions of downloads, but none of them felt right to me. They didn&#8217;t feel at home on Android. I started [...]]]></description>
				<content:encoded><![CDATA[<p><strong>Building a thing for fun</strong></p>
<p>Back in November, I was browsing games on a rather boring train journey. There are a lot of sudoku games on Google Play. Some of them have respectable ratings and millions of downloads, but none of them felt right to me. They didn&#8217;t feel at home on Android. I started to sketch out what a sudoku game might look like with the Holo design language applied.</p>
<p>I didn&#8217;t want fancy graphics or complicated customisation options. I wanted something clean, simple, flat, familiar and content-first. This quickly became something I was going to do. The game in my head seemed so obviously missing. I <a href="https://twitter.com/jdamcd/status/264485950850220032">tweeted</a> my fear that I was about to sink a lot of time into something people would never find in such a saturated category. Okay, genius was definitely the wrong word, but I was excited.</p>
<p>When my train arrived, I had a project on GitHub and a really clear idea of what I was building. The first version took two months of spare evenings and weekends. I finally had something that I was comfortable releasing on Christmas eve.</p>
<p><strong>Getting featured</strong></p>
<p>I was on the same train last Friday when I noticed a few crash reports for the game in my inbox. I&#8217;d never had two on the same day before, so I loaded up Google Play to check the featured section. That was a bit optimistic, really, but I knew that the featured apps change on Fridays. It had happend! The game has been downloaded over <strong>half a million</strong> times since then.</p>
<p><a href="http://jdamcd.com/wp-content/uploads/2013/04/featured.png"><img class="aligncenter size-large wp-image-220" alt="Featured" src="http://jdamcd.com/wp-content/uploads/2013/04/featured-1024x808.png" width="500" /></a></p>
<p>I&#8217;ve worked on a couple featured apps before but this felt different. It&#8217;s always been as part of an incredible team. This was just me. It wasn&#8217;t my job. I did it for fun, in my spare time. That was pretty cool.</p>
<p><strong>Taking it places</strong></p>
<p>The sudden influx of users has brought a lot of great feedback. I&#8217;ve read every email and comment. They&#8217;ve been amazingly helpful in planning the next couple of updates. There is definitely more to come.</p>
<p><a title="Holo Sudoku" href="http://holosudoku.com">Download the game</a> and let me know what you think.</p>
]]></content:encoded>
			<wfw:commentRss>http://jdamcd.com/that-sudoku-game-i-made/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>WAKE_LOCK might not be the way</title>
		<link>http://jdamcd.com/wake_lock-might-not-be-the-way/</link>
		<comments>http://jdamcd.com/wake_lock-might-not-be-the-way/#comments</comments>
		<pubDate>Fri, 12 Apr 2013 07:50:35 +0000</pubDate>
		<dc:creator>jdamcd</dc:creator>
				<category><![CDATA[Android]]></category>

		<guid isPermaLink="false">http://jdamcd.com/?p=193</guid>
		<description><![CDATA[One of the most frequent pieces of feedback about Sudoku is that users don&#8217;t want the screen to dim when they&#8217;re playing. I noticed a few similar apps using the WAKE_LOCK permission. There is a simpler, less dangerous solution. View has a neat keepScreenOn attribute. Simply setting this attribute in the XML style for the [...]]]></description>
				<content:encoded><![CDATA[<p>One of the most frequent pieces of feedback about <a href="http://holosudoku.com" title="Holo Sudoku">Sudoku</a> is that users don&#8217;t want the screen to dim when they&#8217;re playing. I noticed a few similar apps using the <code>WAKE_LOCK</code> permission. There is a simpler, less dangerous solution.</p>
<p><code>View</code> has a neat <code>keepScreenOn</code> attribute. Simply setting this attribute in the XML style for the game board means that the screen will no longer dim when that <code>View</code> is visible.</p>
]]></content:encoded>
			<wfw:commentRss>http://jdamcd.com/wake_lock-might-not-be-the-way/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Cleaner screenshots</title>
		<link>http://jdamcd.com/cleaner-screenshots/</link>
		<comments>http://jdamcd.com/cleaner-screenshots/#comments</comments>
		<pubDate>Sun, 10 Mar 2013 10:06:58 +0000</pubDate>
		<dc:creator>jdamcd</dc:creator>
				<category><![CDATA[Android]]></category>

		<guid isPermaLink="false">http://jdamcd.com/?p=161</guid>
		<description><![CDATA[App screenshots on Google Play often show the system nav bar and have distracting stuff going on in the status bar. Here are a couple of ways to make cleaner screenshots &#8211; no Photoshop required. Lose the system nav bar Create a custom emulator device from the Device Definitions tab in AVD manager. Configure the [...]]]></description>
				<content:encoded><![CDATA[<p>App screenshots on Google Play often show the system nav bar and have distracting stuff going on in the status bar. Here are a couple of ways to make cleaner screenshots &#8211; no Photoshop required.</p>
<h4>Lose the system nav bar</h4>
<p>Create a custom emulator device from the <strong>Device Definitions</strong> tab in AVD manager. Configure the device with one of the supported screenshot resolutions (such as 720&#215;1280) and change the <strong>Buttons</strong> toggle to <strong>Hardware</strong>.</p>
<h4>Full health</h4>
<p>The emulator status bar will be empty but it displays the battery as discharging by default. Telling the emulator that it has full battery is just a couple of commands (5554 is the default emulator port).</p>
<script src="https://gist.github.com/5127803.js"></script><noscript><p>View the code on <a href="https://gist.github.com/5127803">Gist</a>.</p></noscript>
<h4>Consistent times</h4>
<p>Set the same time between screenshots for maximum consistency. You can even try to reflect the current app version number in the time, if you&#8217;re feeling super nerdy: <code>adb shell date -s 20130411.130000</code></p>
<h4>Result</h4>
<p><a href="http://jdamcd.com/wp-content/uploads/2013/03/device-2012-12-22-225848.png"><img class="aligncenter size-large wp-image-166" alt="Cleaner screenshot" src="http://jdamcd.com/wp-content/uploads/2013/03/device-2012-12-22-225848-576x1024.png" width="400" /></a></p>
]]></content:encoded>
			<wfw:commentRss>http://jdamcd.com/cleaner-screenshots/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>February hack day</title>
		<link>http://jdamcd.com/february-hack-day/</link>
		<comments>http://jdamcd.com/february-hack-day/#comments</comments>
		<pubDate>Fri, 22 Feb 2013 23:08:59 +0000</pubDate>
		<dc:creator>jdamcd</dc:creator>
				<category><![CDATA[Work]]></category>

		<guid isPermaLink="false">http://jdamcd.com/?p=152</guid>
		<description><![CDATA[We have regular hack days at The Guardian. (They actually tend to be pairs of days, but we still call them &#8220;hack day&#8221;.) These are a great opportunity to build something completely different or explore a new idea. However, I decided to use this particular hack day to throw together a feature I wish we [...]]]></description>
				<content:encoded><![CDATA[<p>We have regular hack days at The Guardian. (They actually tend to be pairs of days, but we still call them &#8220;hack day&#8221;.) These are a great opportunity to build something completely different or explore a new idea. However, I decided to use this particular hack day to throw together a feature I wish we had in the Android app: home screen widgets!</p>
<p><a href="http://jdamcd.com/wp-content/uploads/2013/02/BDZRn6BCYAAJ6Hc.png"><img class="aligncenter size-large wp-image-154" alt="dashclock-extension" src="http://jdamcd.com/wp-content/uploads/2013/02/BDZRn6BCYAAJ6Hc-614x1024.png" width="400" /></a></p>
<p>The first thing I built was a latest news extension for <a title="Google Play: DashClock" href="https://play.google.com/store/apps/details?id=net.nurik.roman.dashclock">DashClock</a>. DashClock has a really nice API, so the whole thing was finished in a couple of hours.</p>
<p><a href="http://jdamcd.com/wp-content/uploads/2013/02/Screenshot_2013-02-19-11-17-13.png"><img class="aligncenter size-large wp-image-153" alt="locscreen-widget" src="http://jdamcd.com/wp-content/uploads/2013/02/Screenshot_2013-02-19-11-17-13-640x1024.png" width="500" /></a></p>
<p>I also made made a resizable home and lock screen picture widget. There was a positive &#8220;can we keep it?&#8221; conversation with the project manager, so this will probably find it&#8217;s way into a future release.</p>
]]></content:encoded>
			<wfw:commentRss>http://jdamcd.com/february-hack-day/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Secret codes</title>
		<link>http://jdamcd.com/secret-codes/</link>
		<comments>http://jdamcd.com/secret-codes/#comments</comments>
		<pubDate>Sat, 16 Feb 2013 11:52:12 +0000</pubDate>
		<dc:creator>jdamcd</dc:creator>
				<category><![CDATA[Android]]></category>

		<guid isPermaLink="false">http://jdamcd.com/?p=84</guid>
		<description><![CDATA[Android has a neat place to hide debug screens. You can register a receiver for SECRET_CODE broadcasts sent via the dialler. This can be a good place to put feature switches or diagnostic info. There are some of these built into the platform. Try dialling *#*#4636#*#*. With these snippets, dialling *#*#1111#*#* will launch the SecretActivity. [...]]]></description>
				<content:encoded><![CDATA[<p>Android has a neat place to hide debug screens. You can register a receiver for <code>SECRET_CODE</code> broadcasts sent via the dialler. This can be a good place to put feature switches or diagnostic info.</p>
<p>There are some of these built into the platform. Try dialling <strong>*#*#4636#*#*</strong>.</p>
<script src="https://gist.github.com/4966518.js"></script><noscript><p>View the code on <a href="https://gist.github.com/4966518">Gist</a>.</p></noscript>
<p>With these snippets, dialling <strong>*#*#1111#*#*</strong> will launch the <code>SecretActivity</code>. <code>FLAG_ACTIVITY_NEW_TASK</code> is required because we don&#8217;t have an <code>Activity</code> context for the <code>startActivity()</code> call. </p>
<p><strong>Note:</strong> The use of the secret code is clearly visible in the <code>AndroidManifest.xml</code>, so it&#8217;s a bad idea to put anything sensitive behind this in a release build.</p>
]]></content:encoded>
			<wfw:commentRss>http://jdamcd.com/secret-codes/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Tech recruiter un-valentine</title>
		<link>http://jdamcd.com/tech-recruiter-un-valentine/</link>
		<comments>http://jdamcd.com/tech-recruiter-un-valentine/#comments</comments>
		<pubDate>Wed, 13 Feb 2013 21:56:20 +0000</pubDate>
		<dc:creator>jdamcd</dc:creator>
				<category><![CDATA[General]]></category>

		<guid isPermaLink="false">http://jdamcd.com/?p=86</guid>
		<description><![CDATA[Dear tech recruiters, I&#8217;ve been working as a software developer for a couple of years now. I&#8217;ve noticed you around. At first I thought it was sad that nobody liked you. Now I understand it, and I think we need to talk&#8230; Now, you&#8217;re not the recruiter that&#8217;s in the employ of some interesting company. [...]]]></description>
				<content:encoded><![CDATA[<p>Dear tech recruiters,</p>
<p>I&#8217;ve been working as a software developer for a couple of years now. I&#8217;ve noticed you around. At first I thought it was sad that nobody liked you. Now I understand it, and I think we need to talk&#8230;</p>
<p>Now, you&#8217;re not the recruiter that&#8217;s in the employ of some interesting company. I have the occasional affable conversation with those people. You&#8217;re the unsolicited emailer. The LinkedIn connector. The &#8220;I know you didn&#8217;t give me your number, but&#8230;&#8221;-er. The third agency I&#8217;ve never heard of that&#8217;s contacted me today.</p>
<p>You tell me I am special, but you get my name wrong.</p>
<p>It probably doesn&#8217;t help that I write code for a platform that&#8217;s in such high demand at the moment. It seems relatively difficult to find good Android developers. However, I&#8217;ve yet to meet anybody in the tech world with a nice thing to say about the recruitment industry. So here is my advice:</p>
<p><strong>1.</strong> People who make software actually turn out to be people. I&#8217;m not a resource. Treat me like a human being. Be polite. </p>
<p><strong>2.</strong> Don&#8217;t email me unless I or some trusted friend/colleague gave you my email address. The emails that I get from recruitment agencies are <em>exactly</em> as interesting as the ones I get from IKEA about decorating my bedroom. I gave IKEA my email address, though.</p>
<p><strong>3.</strong> Same goes for my phone number. Stop calling me. Ugh. It&#8217;s so exhausting. We are never&#8230;</p>
<p><strong>4.</strong> Don&#8217;t pretend we&#8217;re friends or send LinkedIn invitations claiming we know each other. Stop trying to hang out. We see you prowling at the back of the meetup in your suit trousers. We go to those things to learn stuff and have interesting tech talk with our peers, not to be recruited.</p>
<p><strong>5.</strong> Stop advertising roles for rockstars and ninja programmers. It sounds ridiculous and you&#8217;re alienating everybody that&#8217;s less of a single mid-twenties male nerd than I am. Definitely never say &#8220;brogrammer&#8221;. Urgh.</p>
<p><strong>6.</strong> Please, really, seriously don&#8217;t word emails as if I&#8217;m obliged to get in contact with you. This is <em>so</em> obnoxious.</p>
<p><strong>7.</strong> Don&#8217;t contact me about jobs at companies where I used to work. Not to say that those aren&#8217;t good jobs. (Android devs! Go work for Novoda. They make cool stuff.) I just think that if I wanted to work there again, I&#8217;d go for a beer with Kevin and Carl instead of giving you 10% of my salary to introduce me to friends.</p>
<p><strong>8.</strong> When you break rule 2, don&#8217;t tell me how many years you&#8217;ve been in the industry, the yearly turnover of your client or how great a fit you determined I am without even meeting me. I just do not care.</p>
<p><strong>9.</strong> I also don&#8217;t care how you found my profile (It was on LinkedIn, no matter how many times you write &#8220;GitHub&#8221;). Somebody even found my GitHub profile through &#8220;Boolean Searches&#8221;. (Yes, with initial caps, like it&#8217;s a thing.) </p>
<p><strong>10.</strong> If you really must ignore everything else. <strong>Do</strong> tell me the only thing I would care about if I was thinking of changing jobs: the name of the company. </p>
<p>I know, I know. You&#8217;re thinking &#8220;This is just how recruitment works. It gets results!&#8221;. Well, maybe, but these are the reasons that I&#8217;m not responding to your emails. Like, ever. Your industry is broken. </p>
<p>Love,<br />
Steve</p>
]]></content:encoded>
			<wfw:commentRss>http://jdamcd.com/tech-recruiter-un-valentine/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Email auto-complete 2</title>
		<link>http://jdamcd.com/email-auto-complete-2/</link>
		<comments>http://jdamcd.com/email-auto-complete-2/#comments</comments>
		<pubDate>Tue, 12 Feb 2013 23:54:24 +0000</pubDate>
		<dc:creator>jdamcd</dc:creator>
				<category><![CDATA[Android]]></category>

		<guid isPermaLink="false">http://jdamcd.com/?p=80</guid>
		<description><![CDATA[The email auto-complete snippet I posted has been shared a bit, which is really cool, because I hate typing email addresses. I&#8217;ll attempt to answer the two questions that people asked. Can you auto-complete all emails rather than just Google ones? Yes. This version checks that account names are email addresses with a regular expression [...]]]></description>
				<content:encoded><![CDATA[<p>The <a href="http://jdamcd.com/email-auto-complete" title="Email auto-complete">email auto-complete</a> snippet I posted has been shared a bit, which is really cool, because I hate typing email addresses. I&#8217;ll attempt to answer the two questions that people asked.</p>
<p><strong>Can you auto-complete all emails rather than just Google ones?</strong></p>
<p>Yes. <a href="https://gist.github.com/jdamcd/4761834" title="Gist: All email auto-complete">This version</a> checks that account names are email addresses with a regular expression and puts them in a set to avoid duplicates. If you&#8217;re targeting API level 8 or above, there is even an <a href="http://developer.android.com/reference/android/util/Patterns.html#EMAIL_ADDRESS" title="Patterns.EMAIL_ADDRESS">email pattern</a> in the Android framework. (You could also reverse the email check and use this code to auto-complete usernames.)</p>
<p>Thanks to Akshay Dashrath, Nick Butcher and Christopher Orr for suggesting those revisions.</p>
<p><strong>Will users complain about the <code>GET_ACCOUNTS</code> permission?</strong></p>
<p>Yes. A few probably will. I think that for the majority users who pay attention to permissions, it will come down to whether or not they <strong>trust</strong> your app with their accounts. If you need to add this permission solely to improve your login screen UX then it&#8217;s something to consider. However, there are several reasons you might need <code>GET_ACCOUNTS</code> anyway, like if you&#8217;re storing tokens in the account manager or using <a href="http://developer.android.com/google/gcm/index.html" title="Google Cloud Messaging">Google Cloud Messaging</a>. </p>
]]></content:encoded>
			<wfw:commentRss>http://jdamcd.com/email-auto-complete-2/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Notification thumbnails</title>
		<link>http://jdamcd.com/notification-thumbnails/</link>
		<comments>http://jdamcd.com/notification-thumbnails/#comments</comments>
		<pubDate>Mon, 11 Feb 2013 17:51:48 +0000</pubDate>
		<dc:creator>jdamcd</dc:creator>
				<category><![CDATA[Android]]></category>

		<guid isPermaLink="false">http://jdamcd.com/?p=21</guid>
		<description><![CDATA[NotificationCompat is a nice way to take advantage of the rich notification features introduced in Honeycomb and JellyBean without worrying about older platform versions. The thumbnail image just takes a Bitmap, though, so there is some code to write if you want to fetch these images from a server or resize them to fill the [...]]]></description>
				<content:encoded><![CDATA[<p><a href="http://developer.android.com/reference/android/support/v4/app/NotificationCompat.Builder.html" title="NotificationCompat">NotificationCompat</a> is a nice way to take advantage of the rich notification features introduced in Honeycomb and JellyBean without worrying about older platform versions. The thumbnail image just takes a <code>Bitmap</code>, though, so there is some code to write if you want to fetch these images from a server or resize them to fill the available space.</p>
<p><a href="https://github.com/novoda/ImageLoader" title="GitHub: ImageLoader">ImageLoader</a> provides a utility for downloading <code>Bitmap</code>s in this scenario (it&#8217;s synchronous, you need to handle threading yourself):</p>
<p><code>Bitmap thumbnail = new DirectLoader().download(url)</code></p>
<p>If your thumbnail isn&#8217;t served as a square of just the right size, here&#8217;s a <a href="https://gist.github.com/jdamcd/4224231" title="Gist: NotificationThumbnailHelper">helper class</a> that I threw together to scale and crop a <code>Bitmap</code> to the dimensions expected by the notification tray.</p>
<p><code>Bitmap scaled = new NotificationThumbnailHelper(context).scaleBitmap(thumbnail)</code></p>
]]></content:encoded>
			<wfw:commentRss>http://jdamcd.com/notification-thumbnails/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Email auto-complete</title>
		<link>http://jdamcd.com/email-auto-complete/</link>
		<comments>http://jdamcd.com/email-auto-complete/#comments</comments>
		<pubDate>Mon, 11 Feb 2013 14:17:29 +0000</pubDate>
		<dc:creator>jdamcd</dc:creator>
				<category><![CDATA[Android]]></category>

		<guid isPermaLink="false">http://jdamcd.com/?p=49</guid>
		<description><![CDATA[So your login screen has an email address field? It&#8217;s super easy to save your users some typing by auto-completing email addresses from Android&#8217;s account manager. Firstly, ask for the GET_ACCOUNTS permission in the AndroidManifest.xml: &#60;uses-permission android:name="android.permission.GET_ACCOUNTS" /&#62; The method that does all the work queries the account manager for Google accounts (every user should [...]]]></description>
				<content:encoded><![CDATA[<p>So your login screen has an email address field? It&#8217;s super easy to save your users some typing by auto-completing email addresses from Android&#8217;s account manager.</p>
<p>Firstly, ask for the <code>GET_ACCOUNTS</code> permission in the <code>AndroidManifest.xml</code>:<br />
<code>&lt;uses-permission android:name="android.permission.GET_ACCOUNTS" /&gt;</code></p>
<p>The method that does all the work queries the account manager for Google accounts (every user should have at least one of these) and puts those email addresses in an <code>ArrayAdapter</code>.</p>
<script src="https://gist.github.com/4738788.js"></script><noscript><p>View the code on <a href="https://gist.github.com/4738788">Gist</a>.</p></noscript>
<p>The only thing left to do is change the <code>EditText</code> to an <code>AutoCompleteTextView</code> and call <code>setAdapter(getEmailAddressAdapter(context))</code> on that <code>View</code>.</p>
<p>You might also consider simply setting the text of the email field when there is a single email address in the account manager.</p>
]]></content:encoded>
			<wfw:commentRss>http://jdamcd.com/email-auto-complete/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
