tag:blogger.com,1999:blog-107352312024-03-09T17:42:06.242+00:00The Radioactive YakReto Meierhttp://www.blogger.com/profile/04583545000534514486noreply@blogger.comBlogger208125tag:blogger.com,1999:blog-10735231.post-46277310797110406252016-10-12T21:49:00.002+01:002016-10-12T21:49:58.567+01:00The Cloud of Smart Things<div dir="ltr" style="text-align: left;" trbidi="on">
<blockquote class="tr_bq">
<i>Note: These days I'm posting most of my blog-type content over on <a href="https://medium.com/@retomeier">my Medium page</a>. If you're interested in the things I'm saying, doing, and writing, you should probably head over there. This post is an excerpt from my latest Medium post: <a href="https://medium.com/@retomeier/the-cloud-of-smart-things-dc6e04491fb3#.te258kmx1">The Cloud of Smart Things: The Future of Technology is Intelligent, Invisible, and Connected</a>. Head over to <a href="https://medium.com/@retomeier/the-cloud-of-smart-things-dc6e04491fb3#.te258kmx1">Medium</a> for the full article.</i></blockquote>
<div class="graf graf--p graf-after--h3" id="1750" name="1750" style="background-color: white; letter-spacing: -0.003em; line-height: 1.58; margin-top: 8px; text-align: left;">
<span style="font-family: inherit; letter-spacing: -0.014em;">I believe a new industrial revolution is underway; driven by machine intelligence that’s increasingly enabling autonomous cloud-connected devices with which we interact in natural ways.</span></div>
<div class="graf graf--p graf-after--h3" id="1750" name="1750" style="background-color: white; color: rgba(0, 0, 0, 0.8); letter-spacing: -0.003em; line-height: 1.58; margin-top: 8px; text-align: left;">
<span style="background-color: transparent; font-family: inherit;">The combination of </span><a class="markup--anchor markup--pullquote-anchor" data-href="http://research.google.com/pubs/MachineIntelligence.html" href="http://research.google.com/pubs/MachineIntelligence.html" rel="nofollow" style="-webkit-tap-highlight-color: rgba(0, 0, 0, 0.439216); background-color: transparent; background-image: linear-gradient(rgba(0, 0, 0, 0.439216) 50%, rgba(0, 0, 0, 0) 50%); background-position: 0px 1.05em; background-repeat: repeat-x; background-size: 2px 0.115em; font-family: inherit; text-decoration: none;" target="_blank">Machine Intelligence</a><span style="background-color: transparent; font-family: inherit;">, the public Cloud, and the cheap hardware that enables the Internet of Things represents an opportunity to propel the Maker community of awesome, enthusiastic hobbyists into the forefront of the next industrial revolution.</span></div>
<div class="graf graf--p graf-after--h3" id="1750" name="1750" style="background-color: white; color: rgba(0, 0, 0, 0.8); letter-spacing: -0.003em; line-height: 1.58; margin-top: 8px; text-align: left;">
<span style="font-family: inherit; letter-spacing: -0.003em;">The technological advances that make a $5 Raspberry Pi possible, allow to integrate computer control from everything from our </span><a class="markup--anchor markup--p-anchor" data-href="https://nest.com/thermostat/meet-nest-thermostat/" href="https://nest.com/thermostat/meet-nest-thermostat/" rel="nofollow" style="-webkit-tap-highlight-color: rgba(0, 0, 0, 0.439216); background-color: transparent; background-image: linear-gradient(rgba(0, 0, 0, 0.6) 50%, rgba(0, 0, 0, 0) 50%); background-position: 0px 1.07em; background-repeat: repeat-x; background-size: 2px 0.1em; font-family: inherit; letter-spacing: -0.003em; text-decoration: none;" target="_blank">thermostat</a><span style="font-family: inherit; letter-spacing: -0.003em;">, to </span><a class="markup--anchor markup--p-anchor" data-href="http://www2.meethue.com/" href="http://www2.meethue.com/" rel="nofollow" style="-webkit-tap-highlight-color: rgba(0, 0, 0, 0.439216); background-color: transparent; background-image: linear-gradient(rgba(0, 0, 0, 0.6) 50%, rgba(0, 0, 0, 0) 50%); background-position: 0px 1.07em; background-repeat: repeat-x; background-size: 2px 0.1em; font-family: inherit; letter-spacing: -0.003em; text-decoration: none;" target="_blank">our lights</a><span style="font-family: inherit; letter-spacing: -0.003em;">, sprinklers, curtains, and mailboxes. Machine Intelligence will allow these devices to be autonomous, or controllable using conversational voice commands.</span></div>
<div class="graf graf--p graf-after--h3" id="1750" name="1750" style="background-color: white; color: rgba(0, 0, 0, 0.8); letter-spacing: -0.003em; line-height: 1.58; margin-top: 8px; text-align: left;">
<span style="font-family: inherit; letter-spacing: -0.003em;">In 10 years it won’t be weird to talk to the things in your house to control them. You’ll talk conversationally and your home will recognize you (and your family members) individually and personally. Anything with a switch will be updated, and your home, car, office, and hotel room will learn your habits and preferences, acting autonomously to control everything from the thermostat, to windows, curtains, and lighting.</span></div>
<div class="graf graf--p graf-after--h3" id="1750" name="1750" style="background-color: white; color: rgba(0, 0, 0, 0.8); letter-spacing: -0.003em; line-height: 1.58; margin-top: 8px; text-align: left;">
<span class="markup--strong markup--p-strong" style="font-family: inherit; letter-spacing: -0.003em;">In 20 years</span><span style="font-family: inherit; letter-spacing: -0.003em;"> Artificial intelligence will progress to the point where little interaction is required for your assistant to manage most mundane interactions with devices. Mind control will replace vocal instructions and text entry.</span></div>
<div class="graf graf--p graf-after--h4" id="2607" name="2607" style="background-color: white; color: rgba(0, 0, 0, 0.8); letter-spacing: -0.003em; line-height: 1.58; margin-top: 6px; text-align: left;">
<span style="font-family: inherit; letter-spacing: -0.003em;">The active, passionate, vocal, and enthusiastic community of Android App Developers was — and continues to be — a critical factor in Android’s success and growth. Those early Android developers took advantage of what quickly become a revolution; I believe a similar opportunity exists today for Makers.</span></div>
<blockquote class="tr_bq" style="background-color: white; color: rgba(0, 0, 0, 0.8); letter-spacing: -0.003em; line-height: 1.58; margin-top: 6px; text-align: left;">
<span style="font-family: inherit; letter-spacing: -0.003em;"><a href="https://medium.com/@retomeier/the-cloud-of-smart-things-dc6e04491fb3#.te258kmx1">Read the full article over at Medium</a>.</span></blockquote>
</div>
Reto Meierhttp://www.blogger.com/profile/04583545000534514486noreply@blogger.com0tag:blogger.com,1999:blog-10735231.post-8003465923848044232015-10-28T17:10:00.000+00:002015-10-30T17:47:26.785+00:00Getting Started with Android using Android Studio in Preparation for a Zombie Apocalypse<div dir="ltr" style="text-align: left;" trbidi="on">
<br />
<div style="text-align: center;">
<div class="separator" style="clear: both; text-align: center;">
<iframe allowfullscreen="" class="YOUTUBE-iframe-video" data-thumbnail-src="https://i.ytimg.com/vi/Z98hXV9GmzY/0.jpg" frameborder="0" height="315" src="https://www.youtube.com/embed/Z98hXV9GmzY?feature=player_embedded" width="560"></iframe></div>
<br /></div>
One of the biggest challenges in creating training material is capturing, and holding, people's attention. We also want to appeal to a <a href="https://medium.com/google-developers/enabling-the-next-50-million-developers-94438cf84676#.r378uop91">diverse audience</a> -- meaning a wide variety of training techniques and styles.<br />
<br />
In the past I've tried <a href="http://blog.radioactiveyak.com/">blogging</a>, <a href="http://www.amazon.com/Professional-Android-4-Application-Development/dp/1118102274">authoring books</a>, <a href="https://www.youtube.com/watch?v=GcNNx2zdXN4">conference speaking</a>, and <a href="https://www.udacity.com/course/developing-android-apps--ud853">MOOC training</a> -- this video is the first in what will hopefully become <a href="http://www.androidnomicon.com/">a series of narrative driven guides</a> to developing for Android.<br />
<br />
It takes you through the process of installing Android Studio and creating your first "Hello World" app, interleaving this instructions with the experiences of a startup trying to answer the question we've all been asking: <br />
<br />
<b>What are the Best Practices Android App Development in a Zombie Apocalypse?</b><br />
<br />
The first step is to get Android Studio installed. Android Studio is the official Google IDE for Android development, and will simplify your development experience significantly.<br />
<br />
Then it's really about learning best practices for developing apps with good user experiences in “high stress” situations, such as global apocalyptic events including a zombie uprising.<br />
<br />
<i>Installing Android Studio</i><br />
<ol style="text-align: left;">
<li><b>Check for the Java 7 SDK</b>. Android development requires version 7 of the Java SDK. You can check if it’s installed by typing <span style="font-family: "courier new" , "courier" , monospace;">java -version</span> at the command prompt. The version number comes after the leading “1” — for example “1.8.0_60” is Java version "8.0_60". If you get an error or the version number is too low, download and install the JDK from <a href="http://goo.gl/zXjC">Oracle’s JDK site</a>.</li>
<li><b>Download and Install Android Studio</b>. Android Studio is Google’s official IDE for Android development. Download it from the <a href="http://goo.gl/2qpr">Android Developer SDK page</a>. Once downloaded, double-click to install and run. The final installation step will download the latest Android SDK.</li>
<li><b>Create a new Android Studio Project</b>. Select “Create a new Android Studio Project” from the project wizard. Enter a name for your app, and enter a domain. The domain and app name will be combined to form the package name. Package names must be unique across apps, so make sure only you are likely to use the domain you select.</li>
<li><b>Select the Minimum SDK to Target</b>. Selecting an early version will allow more users to install your apps, but the backwards compatibility burden will make it more challenging for you to use new features only available in newer Android releases. The “Help Me Choose” link will show you the proportion of users on each version and the main features introduced in each release.</li>
<li><b>Create a New Activity</b>. Activities are UI screens for your app. Selecting a “Blank Activity” will create a standard material design “main screen”.</li>
<li><b>Run your app!</b> The default template will create a “hello world” implementation. Hit the green “run” button to see it running on your emulator, or follow <a href="http://developer.android.com/tools/device.html">these instructions to run it on an Android device</a>.</li>
</ol>
<i>Zombie Apocalypse Best Practices</i><br />
<br />
Most of the standard best practices for mobile app development are applicable in the case of zombie attack or other apocalyptic / post-apocalyptic event.<br />
<ol style="text-align: left;">
<li><b>Solve a Real Problem</b>. It’s critical for any startup to find a real problem to solve. In the case of an apocalyse, time is a critical factor, so it can be critically important to focus on a problem that’s directly relevant to the apocalypse at hand.</li>
<li><b>Use the Support Library</b>. The Android support library simplifies adding backwards compatibility to your apps. In apocalyptic situations it’s critical that your app is available to the largest group of users possible, and you don’t want to burn cycles adding backwards compatibility manually.</li>
<li><b>Downloads Take Time</b>. In the panic driven development caused by the risk of imminent death, it’s important to understand your bottlenecks. Downloading Android Studio and the SDK will take some time, so take that opportunity to board up doors and make your development environment more secure. Buying time now may save your life.</li>
<li><b>Preventative Optimizations Aren’t Premature</b>. Performance should always be a consideration, and in this circumstance you may not be able to come back and refactor later. More details here.</li>
<li><b>Don’t Forget the Zombies</b>. Developing apps is fun! It’s easy to get caught up in the excitement of a new project, but don’t forget the zombies trying to break down the door.</li>
<li><b>Good UX is Critical</b>. Users of mobile devices don’t have the time to learn your apps quirks. This is especially true while they’re desperately fleeing for their lives. Take the time to create a UX that’s intuitive and easy to use — a potential user should be able to download and use your app while sprinting from a hoard of the undead.</li>
<li><b>Always Take the Shovel</b>. Never leave a potential weapon behind. That’s just good sense.</li>
<li><b>Minimize Time to Market</b>. No matter what the context, it’s important that you get your app out there as quickly as possible to secure a competitive advantage in a crowded market place. This is especially true in an apocalypse. Singularities like this only come along once in a lifetime, so it’s important to get out there early and win mind share.</li>
</ol>
<i>More?</i><br />
<i><br />
</i> What do you folks think? Would you like to see more Android tutorials with this kind of narrative story telling element included? </div>
Reto Meierhttp://www.blogger.com/profile/04583545000534514486noreply@blogger.com0tag:blogger.com,1999:blog-10735231.post-66946752768806660832014-06-25T20:01:00.000+01:002014-06-25T20:01:19.627+01:00What's the best way to learn Android?<div dir="ltr" style="text-align: left;" trbidi="on">It's a question I've heard a lot, and there's lots of good answers:<br />
<ol><li><b>Check out the <a href="http://d.android.com">Android developer Site</a></b> is the most common answer, but there's a <i>lot</i> of documentation on DAC, and it can be hard to find a path that takes you from "getting started" to "protips" without reading everything.</li>
<li><b>Read <a href="http://www.amazon.com/gp/product/1118102274?ie=UTF8&tag=interventione-20&linkCode=as2&camp=1789&creative=390957&creativeASIN=1118102274">this book</a> by <a href="http://plus.google.com/+RetoMeier">that guy</a></b> is one of my favorites! But book-learning isn't for everyone - and books aren't interactive or social (...and it's hard to keep them fully up to date).<br />
<li><b>Download <a href="http://developer.android.com/samples/index.html">some samples</a> and use <a href="http://stackoverflow.com/questions/tagged/android">StackOverflow</a></b> works for a lot of people, but it's a very unstructured way to learn, and what you're building may not map well to the samples you're using.</li></ol>Today I'm thrilled to announce the newest answer: a Massive Open Online Course (MOOC) created by me and my fabulous colleagues from Google's Developer Relations team and the awesome people at Udacity: <a href="https://www.udacity.com/course/ud853">Developing Android Apps: Android Fundamentals</a>.
<br/><br/>
We're launching today at I/O with a sneak-peak at Lesson 1, with the rest of the course opening up July 15.
<br/><br/>
<div class="separator" style="clear: both; text-align: center;"><a href="https://www.udacity.com/course/ud853" imageanchor="1" style="margin-left: 0em; margin-right: 0em;"><img src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgpDHa8flZP_30_W4oAPOaGtngD8Fs5jQF9rkQK3qnsKKOz_JH4xjxLbLIjD6pbzPZAKcDnf37tAW5kD0DDmCOXXGkUgDKnXrmijnSA4HV00DAte8YPWRNkzg76Rqhw27f1QzjqxA/s1600/AndroidProfessor_Udacity_trans.png" height="236" width="320" /></a></div></div>It's not the first Android course, or the first Android MOOC, but I sincerely believe it's the <i>best</i> one.
<br/><br/>
While creating this course, we tried to follow a couple of basic principles:
<ul><li><b>Get. Coding. Faster.</b> Typically you’ll see courses like these spend the first 3 lessons introducing theory or building hello world. Not here.</li>
<li><b>Recalibrate your intuition.</b> Mobile is different, and often what we’ve learned from years of desktop, web, and server development will take us in the wrong direction. We look for times when your gut will tell you to do one thing, and explain why it’s better practice to go in another direction.</li>
<li><b>Have fun.</b> Coding is fun — or at least it <i>should</i> be. We had a lot of fun building this course, and tried to make sure students would enjoy it just as much. These days Android is Serious Business, but that doesn’t mean learning it has to be.</li>
<li><b>Get there faster.</b> Online courses are self-paced, so we move quickly and give you the resources you need to dive deeper where you need to.</li></ul>The result -- I hope -- is a course that teaches you not just how to develop for Android, but how to start <i>thinking</i> like an Android developer. So if you want to learn Android (or want a refresher) -- check it out, and let us know what you think!
<blockquote>What makes me the most proud of this course is how much of a team effort it's been. It required extraordinary efforts from my co-instructors Katherine and Dan, as well as Alex Lucus and Neto Marin who led the development of the "Sunshine" sample app, Mike Denny who helped design the UI, and a whole team of people at Udacity including Jennie Kim, Sarah Spikes, James Williams, Calvin Hu, Katy Reichelt, and Larry Madrigal without whom this could never have been possible.
</blockquote>Reto Meierhttp://www.blogger.com/profile/04583545000534514486noreply@blogger.com3tag:blogger.com,1999:blog-10735231.post-3163916241535756232013-05-20T18:16:00.001+01:002013-05-20T18:16:20.569+01:00Android Protips 3: Making Apps Work Like Magic (and more!) at Google I/O 2013<div dir="ltr" style="text-align: left;" trbidi="on">This year at Google I/O, I had the opportunity to present two sessions: <a href="https://www.youtube.com/watch?v=GcNNx2zdXN4">Android Protips 3: Making Apps Work Like Magic</a> and <a href="http://www.youtube.com/watch?v=49pWckcaZEI">What's New in Google Play Services</a>, as well as moderating the <a href="https://www.youtube.com/watch?v=A5OOJDIrYls">Android Fireside Chat</a>, and <a href="https://www.youtube.com/watch?v=GZBLgd07Ra4">interviewing Hugo Barra and Hiroshi Lockheimer</a>.<br />
<br />
Presenting on stage in a packed room in front of over 1,000 Android developers is one of the highlights of my year. The lead up to Google I/O involves weeks of late nights and seemingly endless practice and reviews, but the positive reaction from the attendees (and online viewers) makes it worth it.<br />
<br />
My first session was the third part of my Android Protips trilogy: <em><a href="https://www.youtube.com/watch?v=GcNNx2zdXN4">Making Apps Work Like Magic</a></em>. During the keynote Larry Page talked about building things that don't exist - that theme was central to my session. It's easy to get caught up in the details, looking to what others are doing and figuring out how to get just that little bit further ahead of our competition. But in an industry where progress moves so quickly that what we grew up with as scifi becomes reality by the time we're adults, real success means breaking out of that cycle - thinking bigger - and instead of developing apps for the future, defining the future itself.<br />
<br />
<object height="338" width="601"><param name="movie" value="http://www.youtube.com/v/GcNNx2zdXN4?version=3&hl=en_US"></param><param name="allowFullScreen" value="true"></param><param name="allowscriptaccess" value="always"></param><embed src="http://www.youtube.com/v/GcNNx2zdXN4?version=3&hl=en_US" type="application/x-shockwave-flash" width="601" height="338" allowscriptaccess="always" allowfullscreen="true"></embed></object><br />
<div class="separator" style="clear: both; text-align: center;"></div><br />
You can check out the slides - with speaker notes - in <a href="https://plus.google.com/photos/+RetoMeier/albums/5877250422845467265">this gallery</a>:<br />
<br />
<a href="https://plus.google.com/photos/+RetoMeier/albums/5877250422845467265" imageanchor="1"><img border="0" height="358" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjFXhYtOT1GHbgY2bHbcO3qy_Xfh1Jm6TGaLvk0wze47UBD5T_zR58cgQ3ZsrFOxMuaBbIABGSbiSplAZNWO8Nfp_ohfguH7snMoESakZ22JgLN8YMDqER_VFUNxjXZJ1nhOS74SQ/s640/Making_Apps_Work_Like_Magic_Reto_Meier_IO13-000.jpg" width="600" /></a><br />
<br />
Or you can <a href="http://commondatastorage.googleapis.com/androiddevelopers/Android_Protips3_Making_Apps_Work_Like_Magic.pdf">download the deck as a PDF</a>. The code snippets are posted at <a href="https://docs.google.com/document/d/1bur8-SqJVNcoX-jmRO1GSXS_Hx2HEa-zUbLKpfp2xvY/edit?usp=sharing">Android Protips 3: Making Apps Work Like Magic - The Code Snippets</a> for your copy/paste pleasure.<br />
<br />
As in the past couple of years, I presented entirely using an Android tablet (the Transformer Prime with HDMI out). The interstitial animations where created by a very good friend of mine -- Pandamusk, with additional music provided by Joel Alford "Bliss".<br />
<br />
I also had the pleasure of presenting <em><a href="http://www.youtube.com/watch?v=49pWckcaZEI">What's New in Google Play Services</a></em> with Rich Hyndman.<br />
<br />
We offer a brief introduction to Google Play services, how to install and use them, and what was added for Google I/O 2013. We give an overview of each of the new services without digging too deep - so if you're new to Google Play services, or just want to get an idea of which of the deep-dive sessions you should check out, check it out.<br />
<br />
<object height="338" width="601"><param name="movie" value="http://www.youtube.com/v/49pWckcaZEI?hl=en_US&version=3"></param><param name="allowFullScreen" value="true"></param><param name="allowscriptaccess" value="always"></param><embed src="http://www.youtube.com/v/49pWckcaZEI?hl=en_US&version=3" type="application/x-shockwave-flash" width="601" height="338" allowscriptaccess="always" allowfullscreen="true"></embed></object><br />
<br />
I always enjoy the candor and insight the engineering and design leads share during the <i><a href="https://www.youtube.com/watch?v=A5OOJDIrYls">Android Fireside Chat</a></i>, and have to admit that it was a little intimidating interviewing that many people, who are so much smarter than me, all at once. I'm pretty happy with how it turned out though, and thought they gave some great answers that help explain where Android is and where it's going.<br />
<br />
<object height="338" width="600"><param name="movie" value="http://www.youtube.com/v/A5OOJDIrYls?version=3&hl=en_US"></param><param name="allowFullScreen" value="true"></param><param name="allowscriptaccess" value="always"></param><embed src="http://www.youtube.com/v/A5OOJDIrYls?version=3&hl=en_US" type="application/x-shockwave-flash" width="600" height="338" allowscriptaccess="always" allowfullscreen="true"></embed></object><br />
<br />
As a bonus, I also had the chance to <a href="https://www.youtube.com/watch?v=GZBLgd07Ra4">interview Android VP of Engineering Hiroshi Lockheimer and Android VP of Product Management Hugo Barra</a> as part of the Google Developers Live clips.<br />
<br />
<object height="338" width="601"><param name="movie" value="http://www.youtube.com/v/GZBLgd07Ra4?hl=en_US&version=3"></param><param name="allowFullScreen" value="true"></param><param name="allowscriptaccess" value="always"></param><embed src="http://www.youtube.com/v/GZBLgd07Ra4?hl=en_US&version=3" type="application/x-shockwave-flash" width="601" height="338" allowscriptaccess="always" allowfullscreen="true"></embed></object><br />
<br />
As always, I/O was an exhilirating and it was exhausting. All the videos for all the sessions will soon be available on YouTube and the I/O session pages. Hopefully you find them interesting, educational, and useful - and go out and start building things that don't exist!<br />
</div>Reto Meierhttp://www.blogger.com/profile/04583545000534514486noreply@blogger.com3tag:blogger.com,1999:blog-10735231.post-63910902834771183392012-08-29T18:43:00.000+01:002012-08-29T18:43:24.292+01:00CarHacker: Defeating the Curved Interior of a Prius to Mount a Nexus7<div dir="ltr" style="text-align: left;" trbidi="on">
I'm a white middle-class male working in the tech industry in the Silicon Valley, so it should come as absolutely no surprise to anyone that I drive a Prius.<br />
<br />
As I told Ian during our <a href="http://www.youtube.com/watch?v=6j8det-FN80">podcast player App Clinic</a>, the only thing missing from the stock version of this modern marvel of hybrid engineering technology is a convenient place to mount my <a href="http://www.google.com/nexus/#/7">Nexus 7</a>.<br />
<br />
The Prius interior is a combination of smooth lines and continuous curves that offer seemingly few surfaces flat enough to accomodate 7 inches of Android tablet awesomeness. Until today.<br />
<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEh4iiRJ5RZx2W81qSWsjlCQydE2by9SQzV48SM90VP9V0Khk38l2TZ4PSLdSSy8XZS9FfJ8k6WCqMrpC1ckM9Bv1EZ80v6zqSjGY8AszpJH-dtxoVfzsIph0ahhE2oHkZ8KKKeC3g/s1600/IMG_20120828_132553.jpg" imageanchor="1" style="margin-left: 0em; margin-right: 0em;"><img border="0" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEh4iiRJ5RZx2W81qSWsjlCQydE2by9SQzV48SM90VP9V0Khk38l2TZ4PSLdSSy8XZS9FfJ8k6WCqMrpC1ckM9Bv1EZ80v6zqSjGY8AszpJH-dtxoVfzsIph0ahhE2oHkZ8KKKeC3g/s640/IMG_20120828_132553.jpg" width="600" /></a></div>
<div class="separator" style="clear: both; text-align: center;">
<br /></div>
<div class="separator" style="clear: both; text-align: center;">
</div>
With all my music in the cloud and a full-blown addiction to the unrivaled Google Maps (and by extension Google Navigation), I elected to purchase a model without the fancier radio package or built-in GPS receiver.<br />
<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEg_C56_q-3zWMSeo-Rc0ngAAdUCPWDRCMt8ikZ8P9jtsq1gMv65rAbYhDPZ69JOWCDxfapJ-bKU-eXlNlXZugFxBLBRVvshUqEhwA-Sl1BEh4LmNy5NoMWBZjItePxz7lRvsCK8gQ/s1600/2009-prius-interior.jpg" imageanchor="1" style="clear: right; float: right; margin-bottom: 1em; margin-left: 1em;"><img border="0" height="224" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEg_C56_q-3zWMSeo-Rc0ngAAdUCPWDRCMt8ikZ8P9jtsq1gMv65rAbYhDPZ69JOWCDxfapJ-bKU-eXlNlXZugFxBLBRVvshUqEhwA-Sl1BEh4LmNy5NoMWBZjItePxz7lRvsCK8gQ/s320/2009-prius-interior.jpg" width="320" /></a></div>
The music I own is in <a href="http://play.google.com/music/">Google Music</a>, and what I don't own I listen to using <a href="https://play.google.com/store/apps/details?id=com.pandora.android">Pandora</a> or <a href="https://play.google.com/store/apps/details?id=com.spotify.mobile.android.ui">Spotify</a>. If I want to listen to the radio, I use <a href="https://play.google.com/store/apps/details?id=tunein.player">TuneIn</a>.<br />
<br />
<div style="text-align: right;">
</div>
As a result, my car stereo - which takes up a significant portion of the dash - is nothing more than an elaborate routing mechanism to get the audio from my Android devices directed out of the car's speakers. It also represents one of the few flat surfaces available within a vehicle seemingly designed to contain absolutely no straight sides.<br />
<br />
<b>When is a Tablet Stand Not a Tablet Stand? When It's a Mount.</b><br />
<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgZhZF_o3x7HdRsCi3J16IjxiMPKIslJFmQXI9bogCzEadUFheGbmk8hxlZCTZ0TfJYV7RawsYXUxNKkeAyTOxgtYY7YFU8XJzCwLBnW4HZ5pJ1-pOrnG1mVnIwzxhjLkLSEMDbUw/s1600/31Bqqv5pRwL._SS400_.jpg" imageanchor="1" style="clear: left; float: left; margin-bottom: 1em; margin-right: 1em;"><img border="0" height="133" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgZhZF_o3x7HdRsCi3J16IjxiMPKIslJFmQXI9bogCzEadUFheGbmk8hxlZCTZ0TfJYV7RawsYXUxNKkeAyTOxgtYY7YFU8XJzCwLBnW4HZ5pJ1-pOrnG1mVnIwzxhjLkLSEMDbUw/s200/31Bqqv5pRwL._SS400_.jpg" width="200" /></a></div>
I've been using <a href="http://www.amazon.com/gp/product/B006UBTQTE/ref=as_li_ss_tl?ie=UTF8&camp=1789&creative=390957&creativeASIN=B006UBTQTE&linkCode=as2&tag=interventione-20">this handy little tablet stand</a> since I got my Xoom, and everything since - from 7 and 10 inch Galaxy Tabs to my new Nexus 7.<br />
<br />
It has both long and a short third legs to allow for propping your tablet at either 10 or 80 degrees.<br />
<br />
It turns out that my Prius has a legacy mounting slot at the top of the in-car stereo panel (<b>Edit</b>: turns out this is for playing "compact discs") into which the shorter leg fits very snuggly.<br />
<br />
The application of a couple of 3M backing tabs from some wall hooks is used to hold it firmly in place laterally and a<span style="text-align: center;"> <a href="http://www.amazon.com/gp/product/B0000AQOHL/ref=as_li_ss_tl?ie=UTF8&camp=1789&creative=390957&creativeASIN=B0000AQOHL&linkCode=as2&tag=interventione-20">3M cable tie hook</a> keeps the power and audio cables neatly tucked away.</span><br />
<div class="separator" style="clear: both; text-align: left;">
<br /></div>
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEh9BilqT-uB4rAFgGNrb1_YISCOKYRCikRNDjsE9DXv_0vFsY7c6Zf8eEGzt4CgcHZ2hzUSNx-MspZb-R_iiamVy-6i5Sa_hGw-3JJmJjG7gKER-jwp3wLAANokqB_JTglYmH7A0g/s1600/IMG_20120828_074429.jpg" imageanchor="1" style="clear: left; float: left; margin-bottom: 1em; margin-right: 1em;"><img border="0" height="270" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEh9BilqT-uB4rAFgGNrb1_YISCOKYRCikRNDjsE9DXv_0vFsY7c6Zf8eEGzt4CgcHZ2hzUSNx-MspZb-R_iiamVy-6i5Sa_hGw-3JJmJjG7gKER-jwp3wLAANokqB_JTglYmH7A0g/s320/IMG_20120828_074429.jpg" /></a> <a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgXjGnKYOqUZ3_ZRTCoXMF34NOjgCOUAE8ygmGQkWF_GxG60SIjx4carV31KZqyZ73-Dl8uhvP8DVCaPCcSvngkK_0SoxeP8XYQv7KR_cID3bagLmNTP1e8tpYmIr1E3aWbsLuVSQ/s1600/IMG_20120828_074437.jpg" imageanchor="1" style="clear: left; display: inline !important; margin-bottom: 1em; margin-right: 1em;"><img border="0" height="270" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgXjGnKYOqUZ3_ZRTCoXMF34NOjgCOUAE8ygmGQkWF_GxG60SIjx4carV31KZqyZ73-Dl8uhvP8DVCaPCcSvngkK_0SoxeP8XYQv7KR_cID3bagLmNTP1e8tpYmIr1E3aWbsLuVSQ/s320/IMG_20120828_074437.jpg" /></a></div>
<div class="" style="clear: both; text-align: center;">
<div style="text-align: left;">
The pincers of the stand are collapsable, so I can bring them as close together as I need in order to use the same mount to hold a phone, 7" or 10" tablets each in portrait or landscape orientations. The whole thing leans backwards slightly, and that - plus the "tacky" pads on the stand - help to keep everything in place when driving.<br />
<br />
It would be better if I could figure out a way to use the Nexus 7 pogo pins for charging, and maybe come up with some kind of bluetooth solution for audio, but for now I'm pretty happy!</div>
<div style="text-align: left;">
<br /></div>
<div class="separator" style="clear: both; text-align: left;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEg69QiWhNpM-R9IsUTlmgMo334R15XlpMIm1l3mKaNKb26RovaVBw5eHtmM6pdo0VwfOAKWDDbmUxWay_c2nZEI-5iNkXdWO2tpa6CzI1IxmcQBTIM02ufr9-bn1jkD9xX4dlxinA/s1600/IMG_20120828_132456.jpg" imageanchor="1" style="margin-left: 0em; margin-right: 0em;"><img border="0" height="280" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEg69QiWhNpM-R9IsUTlmgMo334R15XlpMIm1l3mKaNKb26RovaVBw5eHtmM6pdo0VwfOAKWDDbmUxWay_c2nZEI-5iNkXdWO2tpa6CzI1IxmcQBTIM02ufr9-bn1jkD9xX4dlxinA/s320/IMG_20120828_132456.jpg" /></a> <a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiOncHh9_sUnT1pndOr5NjqfCNT-qTNHCidE23SKwJyQd_x4rXY7q7d0E_n1d_CBTJ-YZeMj1MfFIoewuhTqby5GaQp_4_keqA1ffqtPHEU9tmB_0Lam5cQaKBhaL4oTqQ3mayxXg/s1600/IMG_20120828_132510.jpg" imageanchor="1" style="margin-left: 0em; margin-right: 0em;"><img border="0" height="280" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiOncHh9_sUnT1pndOr5NjqfCNT-qTNHCidE23SKwJyQd_x4rXY7q7d0E_n1d_CBTJ-YZeMj1MfFIoewuhTqby5GaQp_4_keqA1ffqtPHEU9tmB_0Lam5cQaKBhaL4oTqQ3mayxXg/s320/IMG_20120828_132510.jpg" /></a></div>
<div style="text-align: left;">
<br /></div>
</div>
<br /></div>
Reto Meierhttp://www.blogger.com/profile/04583545000534514486noreply@blogger.com11tag:blogger.com,1999:blog-10735231.post-11096190952209835502012-08-13T21:56:00.000+01:002012-08-13T21:56:12.354+01:00The Friday App Clinic: Podcast Players<div dir="ltr" style="text-align: left;" trbidi="on">
<blockquote class="tr_bq">
Every week The Friday App Clinic takes a critical look at a selection of apps in a particular category. Our focus on is to help developers learn how to make their apps magical, and we'll use these corresponding blog posts to provide links to some of the techniques you can use to make that happen.</blockquote>
<a href="https://developers.google.com/live/shows/ahNzfmdvb2dsZS1kZXZlbG9wZXJzcg4LEgVFdmVudBiMqagDDA/">Last Friday</a> Ian Ni-Lewis and I took the scalpel to podcast players. Up on the tablet were Doggcatcher, Beyond Pod, Pocket Casts, Volksempfänger, Listen Up, Good News, Podax, and Hipstacast.<br />
<br />
<div style="text-align: center;">
<iframe allowfullscreen="allowfullscreen" frameborder="0" height="315" src="http://www.youtube.com/embed/6j8det-FN80" width="560"></iframe></div>
<b><br />
</b> <b>Podcast Player Essentials</b><br />
<b><br />
</b> Let's start by looking at the fundamentals to creating a good podcast player.<br />
<br />
<i>Audio playback and control</i><br />
<br />
This Android Training class on <a href="http://developer.android.com/training/managing-audio/audio-output.html">Managing Your Audio Playback</a> explains audio focus and how to make sure your app responds to hardware and bluetooth multimedia control keys.<br />
<br />
We recommend you create a <a href="http://developer.android.com/guide/topics/appwidgets/index.html">homescreen widget</a> to show users what's playing, and offer a shortcut to pause or skip tracks.<br />
<br />
Use the <a href="http://developer.android.com/reference/android/media/RemoteControlClient.html">Remote Control Client</a> to offer the same details and shortcuts to users from the lock screen, and enrich your ongoing <a href="http://developer.android.com/guide/topics/ui/notifiers/notifications.html">Notifications</a> to support pause and resume playback at any time. While some of the apps we looked at allowed you to pause playback from a notification, doing so removed the notification, requiring you to relaunch the app to resume playback.<br />
<br />
<i>Offline Media Playback</i><br />
<br />
Like any media playing app, a podcast player should continue to work even when your network connection is intermittent or disabled.<br />
<br />
You can use the <a href="http://developer.android.com/reference/android/app/DownloadManager.html">Download Manager</a> to download podcasts in the background, using techniques like prefetching, as described in Android Training class <a href="http://developer.android.com/training/efficient-downloads/index.html">Transferring Data Without Draining the Battery</a>, to ensure that users are never left listening to "dead air" while the next track buffers or downloads.<br />
<br />
Taking things a step further, Ian called out the elimination of the refresh button as the gold standard for podcast players.<br />
<br />
Eliminating the refresh button is <i>hard</i> - which explains why all of the apps we looked at included a refresh button. To effectively remove it, you need to ensure that all your feeds are constantly up to date. The best solution is to use <a href="http://developer.android.com/guide/google/gcm/index.html">Google Cloud Messaging</a> to notify each installation of your app whenever a new podcast is available.<br />
<br />
<b>Making Podcast Player Work Like Magic</b><br />
<i><br /></i>
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgIF1VJpHEVLyKvDOb9lAcjGPW02ou9EKo53YBEnMAiG87jCF_PV2eEZLfrKW_edKl1sI1iWCZnQrUnVJe77BoI0dFv2tFPRVF6gvXZ5iTjzfBPoSdew1Q9gCknDKbPekhPyOaLwg/s1600/Podcast_Must_Haves.png" imageanchor="1" style="clear: right; float: right; margin-bottom: 1em; margin-left: 1em;"><img border="0" height="225" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgIF1VJpHEVLyKvDOb9lAcjGPW02ou9EKo53YBEnMAiG87jCF_PV2eEZLfrKW_edKl1sI1iWCZnQrUnVJe77BoI0dFv2tFPRVF6gvXZ5iTjzfBPoSdew1Q9gCknDKbPekhPyOaLwg/s400/Podcast_Must_Haves.png" width="400" /></a></div>
<i>Playing a Podcast</i><br />
<br />
Listening to podcasts is the sort of thing you tend to do when you're using your eyes for something else.<br />
<br />
With your eyes otherwise occupied interacting with your app needs to be intuitive and familiar.<br />
<br />
From a user-perspective, there's very little difference between a podcast player and a music player, but we noticed that many of the podcast players were presented more as <i>podcast feed managers</i> rather than media players, with playback controls like pause and skip were often hidden behind secondary tabs or even menu options.<br />
<br />
Consider arranging your UI to focus around playback, so the media control buttons should always be available whenever a podcast is playing.<br />
<i><br /></i>
<i>Discovery</i><br />
<br />
Podcasts are amazing -- there's thousands of hours of fresh content in every posible genre available for free, every day. But like TV and radio, content discovery is a key challenge.<br />
<br />
The perfect podcast player should be as easy to use as the radio. Turn it on, and you should be able to start listening to something interesting within one or two clicks. That means presenting new users with a selection of content that's likely to get them hooked.<br />
<br />
In the apps we looked at, we noticed that the behavior of the "next" and "previous" buttons was often unpredictable. If the user hits "next", your app should be able to determine something for them to listen to without them having to pick it out specifically.<br />
<br />
Similarly, never present users with an empty screen, or rely on them knowing and entering a podcast URL in order to get started. Even if they're experienced podcast listeners with their favorite feeds, make it easy for them to test your app before they go to the trouble of importing their favorites.<br />
<br />
<i>Managing Subscriptions</i><br />
<br />
The focus of many of the apps we looked at was in managing your subscriptions and controlling which episodes were downloaded. These are largely implementation details that help you decide how often to refresh feeds, which feeds to fetch, and which episodes to download ahead of time.<br />
<br />
While important, this functionality but is secondary to the point of your app. In most cases, a user's preferences will be global for all their favorite podcasts, so rather than having them configure different settings for each feed, create a sensible (customizable) default and apply it to all their subscriptions. Now you only need to allow users to browse content and select the sources they favor.<br />
<br />
Show users what they've got organized in ways that are familiar and obvious: genres, albums, artists, and playlists.<br />
<blockquote class="tr_bq">
Tune in every Friday at 1pm Pacific Time (UTC-7) for The Friday App Clinic with Ian Ni-Lewis and Reto Meier.</blockquote>
</div>
Reto Meierhttp://www.blogger.com/profile/04583545000534514486noreply@blogger.com5tag:blogger.com,1999:blog-10735231.post-17564867125397982442012-07-30T17:38:00.000+01:002012-07-30T17:38:17.355+01:00Making Apps Indistinguishable from Magic<div dir="ltr" style="text-align: left;" trbidi="on"><blockquote><center>"Any sufficiently advanced technology is indistinguishable from magic."<br />
– <i>Arthur C. Clarke</i></center></blockquote><b>Imagine yourself from 1990 transported to the present, and being handed a smartphone</b><br />
<br />
Had you handed 12 year-old me a Galaxy Nexus and a Nexus 7, and I'd have assumed they were props from ST:TNG. Show Asphalt 6: Adrenaline to a kid who's been obsessively playing Test Drive II on his 33Mhz 386, and watch him shit his pants.<br />
<br />
When I was 12 years-old, it was 1990. I was running a BBS out of my parents living room and the World Wide Web didn't exist, but I downloaded shareware from local BBSs and browsed USENet with my brand-new 14.4kbit/s modem.<br />
<br />
I'd <i>seen</i> a mobile phone, but the first SMS message wouldn't be sent for another 2 years.<br />
<br />
Today we all have handheld devices that operate by voice and touch, that let you take pictures, record video, watch movies, and play songs. If that would have been vaguely comprehensible to a 12 year old in 1990, throw in a quick demo of Shazam or an international video Hangout.<br />
<br />
<b>You're not building apps for a portable handheld computer with a cell radio-based Internet connection. You're developing apps for a magic box</b><br />
<br />
When you watch a good movie you don't think about how it was made. It's only when something breaks the illusion: an actor glancing at the camera, a piece of the set falling over, or a boom mic dropping into frame, that you're reminded that you're not looking through a magic window, but at actors on a set.<br />
<br />
As developers, our goal should be to provide an app experience so immersive, that 12 year-old me never loses the feeling of wonder while playing with the magic box from the future.<br />
<br />
<b>Hide the connection</b><br />
<br />
Make it seem as though all the information your app provides is somehow magically stored within the device itself.<br />
<br />
You don't stop to think how you're online until you need to wait for a download to complete or when a connection fails. Aggressively prefetch and <a href="https://plus.google.com/photos/111169963967137030210/albums/5757766248642813025/5771000879913579170">queue-and-send</a> messages when you're next connected.<br />
<br />
It's your responsibility to ensure that network speeds and intermittent connectivity don't leak in to the user experience.<br />
<br />
<b>Hide the Internet</b><br />
<br />
The Internet Protocol provides best effort delivery over a service characterized as unreliable. That means downloads will fail, connections will be dropped, and errors will be received.<br />
<br />
Your users don't need to know or understand what this means or why it happens; implement silent retries with exponential back-offs to handle data transfer problems without interrupting your users, and display error messages only when they're actionable.<br />
<br />
<b>Hide your user interface</b><br />
<br />
We learn through positive and negative reinforcement, so when you guess wrong <a href="http://www.youtube.com/watch?v=fn7-JZq0Yxs">Venkman</a> gives you a shock, and you're that much more hesitant to guess the next time.<br />
<br />
The best interface is the one you don't notice, where the very first thing you try does exactly what you want it to do, and any accidental actions that prove destructive are easily reversed.<br />
<br />
Help your users establish and build trust with your app.<br />
<br />
<b>Hide the battery</b><br />
<br />
Magic devices run forever without being plugged in. You can't stop the battery from draining all by yourself, but you can <a href="http://developer.android.com/training/efficient-downloads/index.html">do your part</a> to ensure it lasts as long as possible.<br />
<br />
<b>Hide the device</b><br />
<br />
A good app includes a combination of dynamic layouts flexible enough to <a href="http://developer.android.com/training/multiscreen/index.html">support any screen size</a>. A <i>great</i> app considers how its core functionality is best served given the screen and hardware on which it's running.<br />
<br />
That probably includes a series of different layouts, but might also require an entirely different user experience when the underlying hardware is radically different from a standard smartphone. A magic app seems as though it's designed specifically for <a href="https://plus.google.com/photos/111169963967137030210/albums/5757766248642813025/5757766347577251282">whatever platform</a> you're running it on.<br />
<br />
<b>Hide your app</b><br />
<br />
A magic box provides a series of <a href="https://plus.google.com/photos/111169963967137030210/albums/5757766248642813025/5757766287026061714">useful actions</a> and functions: sending a message, looking at a map, or recognizing music.<br />
<br />
To keep the magic alive your app should should be designed to serve a particular function, one that's obvious as soon as the app loads. Similarly, it should be available whenever you need it (even if you didn't realize you needed it), and should be accesible by clicking an intuitive icon, a widget, or a notification.<br />
<br />
<b>An alternative title</b><br />
<br />
Sometimes you don't know what point you're trying to make until long after you've finished making it. Such was the case for me this year upon reflecting on my Google I/O 20212 session, "Making Good Apps Great", which - as it turns out - I should have titled: "Making Apps Work Like Magic."</div><br />
<center><iframe width="601" height="338" src="http://www.youtube.com/embed/PwC1OlJo5VM" frameborder="0" allowfullscreen></iframe></center>Reto Meierhttp://www.blogger.com/profile/04583545000534514486noreply@blogger.com12tag:blogger.com,1999:blog-10735231.post-53168593609617702522012-07-09T17:05:00.000+01:002012-07-09T17:05:11.174+01:00Making Good Apps Great: The What and the How<div dir="ltr" style="text-align: left;" trbidi="on">
<span style="background-color: white;">Once again the 1,300-seat main Android session room at Google I/O was consistently jam-packed, with attendees sitting on the floor and lining up to get in. As such, it was a real thrill to deliver my sequel to last years Android Protips presentation -- <i>Android Protips 2: Electric Boogaloo</i>.</span><br />
<br />
It's now on YouTube for your viewing pleasure.<br />
<br />
<div class="separator" style="clear: both; text-align: center;">
<object height="338" width="600"><param name="movie" value="http://www.youtube.com/v/PwC1OlJo5VM?version=3&hl=en_US"></param>
<param name="allowFullScreen" value="true"></param>
<param name="allowscriptaccess" value="always"></param>
<embed src="http://www.youtube.com/v/PwC1OlJo5VM?version=3&hl=en_US" type="application/x-shockwave-flash" width="600" height="338" allowscriptaccess="always" allowfullscreen="true"></embed></object></div>
<br />
If you want a closer look at the slides, I've created this gallery, which features speaker notes as the captions.<br />
<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="https://plus.google.com/photos/111169963967137030210/albums/5757766248642813025" imageanchor="1" style="margin-left: 0em; margin-right: 0em;" target="_blank"><img border="0" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjr72C05385zKZ8GS0eOlgIx0iHdvRGUCn-p4km589QXq1uJPax6D_IVgi1EMMx1lw4KwA04mMfWcruKz7Oin-9Sq4aMkV6w5W97TOCQL0XEHE9yT4GrkgJfziOsSwJYJev4_axWg/s640/Making_Good_Apps_Great_Reto_Meier_IO2012-001.jpg" width="600" /></a></div>
<br />
If downloading is more your thing, they're also available for <a href="http://commondatastorage.googleapis.com/io2012/presentations/live%20to%20website/101.pdf">downloading as a PDF</a>.<br />
<br />
The code snippets are posted at <a href="https://docs.google.com/document/d/1vUqHxmcDcNDmPepXVBJgjIJTmvJey54BKxctTfXWYBc/edit">Making Good Apps Great: The Code Snippets</a> for your copy/paste pleasure.<br />
<br />
<b>Presenting Without a Computer</b><br />
<br />
Like last year, I presented without a computer -- instead using a Asus Transformer Prime paired with a Nexus 7. O<span style="background-color: white;">ne app, running on two tablets, connected via Bluetooth.</span><br />
<br />
The Transformer Prime was wired up with HDMI-out and a USB-connected clicker that let me transition between slides.<br />
<br />
The Bluetooth-connected Nexus 7 showed me my "Speaker View": My speaker notes, the current / next slide preview, my pre-written live tweets, and a countdown timer.<br />
<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgr-rHij0SP3wcx_fFKOMZEZDLluSI6EWLtmEoqlYuG2lkzdZYrcyp9JSFiAp6X-UTO7tuM0dH5NgVOVhgC9ZxhMQjMs4ZMhyphenhyphenUB3BtTsc-WAidlAAfwqUm_zTnly_uYgNm1SBfQtA/s1600/Making_Good_Apps_Great_Reto_Meier_IO2012_Slide_91.jpg" imageanchor="1" style="margin-left: 0em; margin-right: 0em;"><img border="0" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgr-rHij0SP3wcx_fFKOMZEZDLluSI6EWLtmEoqlYuG2lkzdZYrcyp9JSFiAp6X-UTO7tuM0dH5NgVOVhgC9ZxhMQjMs4ZMhyphenhyphenUB3BtTsc-WAidlAAfwqUm_zTnly_uYgNm1SBfQtA/s640/Making_Good_Apps_Great_Reto_Meier_IO2012_Slide_91.jpg" width="600" /></a></div>
<br />
Whenever the Transformer Prime transitioned slides, it transmitted the current slide to the Nexus 7.<br />
<br />
The slides themselves I created using Powerpoint, using the "Export as a series of pictures" option. Except the animations which were custom created by Pandamusk, <a href="http://www.ign.com/blogs/pandamusk/2012/06/30/android-animations-google-io-2012">as detailed here</a>.<br />
<br />
The app just steps through each of the images / animations in sequence.<br />
<br />
<b>Can I Get the App? Can I See the Source?</b><br />
<br />
Yes and yes. I need to make a few improvements before I open source it.<br />
<br />
<b>Really? Because you said that last year and…</b><br />
<br />
Yes. Sorry! The code took a little more tidying than I expected. I'll try and be a little more... prompt, this year.</div>Reto Meierhttp://www.blogger.com/profile/04583545000534514486noreply@blogger.com1tag:blogger.com,1999:blog-10735231.post-40272941927385816962012-04-23T17:32:00.000+01:002012-04-23T19:08:15.805+01:00Professional Android 4 Application Development: Because I only work in powers of 2<div dir="ltr" style="text-align: left;" trbidi="on">
<a href="http://www.amazon.com/gp/product/1118102274?ie=UTF8&tag=interventione-20&linkCode=as2&camp=1789&creative=390957&creativeASIN=1118102274">Professional Android 4 Application Development</a>, started shipping today (Monday) from Amazon US - so those of you who pre-ordered should be seeing your copies in a couple of days. I'm really excited and can’t wait to find out what people think.<br />
<br />
<a href="http://www.amazon.com/gp/product/1118102274?ie=UTF8&tag=interventione-20&linkCode=as2&camp=1789&creative=390957&creativeASIN=1118102274"><img alt="Professional Android 4 Application Development cover image" border="0" id="BLOGGER_PHOTO_ID_5440390027628256882" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjGWycLwQ65pwnI7X-EqaGSc75czdkFMaFLmrouDnixLloUgDPeonBRyldIBHrEH3qGxLU28S6xQMg8Bd_n46wMaPpCDDLFGE6_Tbo8tCM1pJXC9dGUJjwwKHy7g2HQUT6JxZm4DA/s1600/ProAndroid4AppDev.jpg" style="border-bottom-color: rgb(187, 187, 187); border-bottom-style: solid; border-bottom-width: 1px; border-image: initial; border-left-color: rgb(187, 187, 187); border-left-style: solid; border-left-width: 1px; border-right-color: rgb(187, 187, 187); border-right-style: solid; border-right-width: 1px; border-top-color: rgb(187, 187, 187); border-top-style: solid; border-top-width: 1px; display: block; height: 320px; margin-bottom: 10px; margin-left: auto; margin-right: auto; margin-top: 0px; padding-bottom: 4px; padding-left: 4px; padding-right: 4px; padding-top: 4px; text-align: center; width: 254px;" title="Professional Android 4 Application Development" /></a><br />
<b>Where to buy</b><br />
<br />
If you're interested in picking up a copy, you can get the paperback delivered to your door from these fine retailers:<br />
<ul>
<li><a href="http://www.amazon.com/gp/product/1118102274?ie=UTF8&tag=interventione-20&linkCode=as2&camp=1789&creative=390957&creativeASIN=1118102274">Amazon.com</a></li>
<li><a href="http://www.amazon.co.uk/gp/product/1118102274?ie=UTF8&tag=interventione-21&linkCode=as2&camp=1634&creative=19450&creativeASIN=1118102274">Amazon.co.uk</a></li>
<li><a href="http://www.barnesandnoble.com/w/professional-android-4-application-development-reto-meier/1107429064?ean=9781118102275">Barnes & Noble</a></li>
</ul>
If you prefer to travel light, there's an electronic version to suit your tastes:<br />
<ul>
<li><a href="http://www.amazon.com/gp/product/B007SR7NOO/ref=as_li_ss_tl?ie=UTF8&tag=interventione-20&linkCode=as2&camp=1789&creative=390957&creativeASIN=B007SR7NOO">Kindle</a></li>
<li><a href="https://play.google.com/store/books/details/Reto_Meier_Professional_Android_4_Application_Deve?id=g3hAdK1IBkYC">Google Play Books</a></li>
<li><i><a href="http://www.wrox.com/WileyCDA/WroxTitle/Professional-Android-4-Application-Development.productCd-1118102274.html">DRM-free PDF, Mobi, and ePub</a> coming soon from Wrox</i></li>
<li><i>Safari Books coming soon</i></li>
</ul>
I'm particularly pleased with the electronic editions of this release, which are significantly better than those of Professional Android 2. It's nice to see that this time they're out at the same time as the paperbacks.<br />
<br />
<b>What's new?</b><br />
<br />
This edition is a monster. Everything has been revised and expanded, with four new chapters and more than 300 extra pages (that's around 50% more) added since Professional Android 2.<br />
<br />
Some of the highlights amongst the new content include:<br />
<ul>
<li>Fragments and the Action Bar</li>
<li>CursorLoaders</li>
<li>The audio focus APIs</li>
<li>NFC, Wi-Fi Direct, and Android Beam</li>
<li>Using the Intent Service</li>
<li>A new chapter on publishing your app to Google Play</li>
<li>Introductions to LVL, IAB, and C2DM</li>
<li>Creating collection-based widgets and rich notifications</li>
<li>Using new sensors (including the barometer)</li>
<li>Property animations</li>
<li>Accessibility </li>
<li>Implementing copy and paste</li>
</ul>
<b>Some context</b><br />
<br />
The whole thing took me a touch over a year to write. I started writing an update for Gingerbread and Honeycomb back in March of 2011 and before I'd finished, Ice Cream Sandwich dropped and I found myself doing some frantic rewrites and adding a few extra pages.<br />
<br />
That means it's been two years between revisions, and as <a href="http://www.amazon.com/gp/product/1118102274?ie=UTF8&tag=interventione-20&linkCode=as2&camp=1789&creative=390957&creativeASIN=1118102274">Professional Android 4</a> rolls off the presses there have been 8(!) platform releases.<br />
<br />
Professional Android 2 was released within a few weeks of Android 2.1. As of now, 87% of devices are running a newer build of Android. The Android ecosystem has grown to include tablets, with more than 800 different Android devices created by 55 OEMs and available on over 300 carriers.<br />
<br />
More than 850k new Android devices are activated daily, with the 450k+ apps in Google Play having been downloaded more than 10 billions time.<br />
<br />
<b>Support</b><br />
<br />
You can download all the code snippets and sample projects used in the book from the <a href="http://www.wrox.com/WileyCDA/WroxTitle/Professional-Android-2-Application-Development-2nd-Edition.productCd-0470565527,descCd-DOWNLOAD.html">Wrox Open Source site</a>.<br />
<br />
If you've got any questions related to the book, you can post them over at the <a href="http://p2p.wrox.com/book-professional-android-4-application-development-685/">Wrox P2P forums</a>. For anything programming related, I'd recommend using <a href="http://stackoverflow.com/questions/tagged/PA4AD">Stack Overflow</a> (and adding a PA4AD tag). I'll be monitoring both and endeavoring to answer promptly.<br />
<br />
I've created a <a href="https://plus.google.com/112248467291233929130/posts">+Professional Android 4 Application Development</a> Google+ Page, and you can always get in touch with me over at <a href="http://www.twitter.com/retomeier">Twitter</a> or on <a href="https://plus.google.com/111169963967137030210?prsrc=3">Google+</a>.</div>Reto Meierhttp://www.blogger.com/profile/04583545000534514486noreply@blogger.com7tag:blogger.com,1999:blog-10735231.post-42542914275816214352012-03-26T17:24:00.000+01:002012-03-26T17:24:47.320+01:00Understanding Mobile Radio State to Build Apps that Don't Drain the Battery<blockquote class="tr_bq"><b>tl;dr: </b>Read the new Android Training Class, <i><a href="http://developer.android.com/training/efficient-downloads/index.html">Transferring Data Without Draining the Battery</a>,</i> to learn how to potentially halve the battery life impact of your apps' data transfers based on the underlying radio architecture.</blockquote><b>One of the beauties of modern smartphone platforms is the abstraction of underlying hardware.</b><br />
<br />
I've been building mobile apps for almost 5 years, and had no idea how the underlying 3G radio worked. I didn't have to. I just open a connection and start downloading data.<br />
<br />
Dalvik negotiates a transport mechanism to ensure I get the fastest and most efficient data connection possible. Wi-Fi or mobile, Edge or LTE, it doesn't matter. Or so I thought.<br />
<br />
We all know that data transfers on mobile radios chews up a lot of battery, so we're careful to restrict how much we download. It's a balance between app latency and chewing up bandwidth and battery life. <br />
<br />
<b>Turns out it's not so much the amount you transfer, but how frequently you power up the radio.</b><br />
<br />
The problem with abstractions is that hiding the complexities means disguising some possible optimizations—something I came to learn after speaking to the good folks at at AT&T and DoCoMo.<br />
<br />
<div class="separator" style="clear: both; text-align: center;"><a href="http://developer.android.com/training/efficient-downloads/efficient-network-access.html#RadioStateMachine" imageanchor="1" itemprop="image" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="113" src="http://developer.android.com/images/efficient-downloads/mobile_radio_state_machine.png" width="400" /></a></div><br />
<a href="http://developer.android.com/training/efficient-downloads/efficient-network-access.html">Optimizing Downloads for Efficient Network Access</a> explains that to minimize the power drain associated with the mobile radio, it will go into standbye mode whenever it's not in use. Before you can upload or download data the mobile radio needs to be powered-up. Powering up from standby introduces around 2 seconds of latency when making data transfer requests.<br />
<br />
No one wants to wait an extra 2s every time they try to follow a link, so rather than dropping straight back to standby, there is a tail-time during which the radio stays active to reduce that latency.<br />
<br />
The exact numbers vary depending on the carrier, but once you stop transferring data the radio stays on—at full power—for around 5 seconds. Then stays at a "low energy" state (which introduces some latency, but uses less battery) for around another 12 seconds.<br />
<br />
<b>Every data transfer session will cause the radio to draw energy for almost 20 seconds</b>.<br />
<br />
<span itemprop="description">As an app developer, knowing that every time you touch the network you can draw power for nearly 20 seconds should have a dramatic impact on the way you structure you data transfer routines.<br />
<br />
That includes <a href="http://developer.android.com/training/efficient-downloads/efficient-network-access.html#PrefetchData">prefetching</a>, <a href="http://developer.android.com/training/efficient-downloads/efficient-network-access.html#BatchTransfers">batching your downloads</a>, <a href="http://developer.android.com/training/efficient-downloads/redundant_redundant.html">eliminating redundant downloads</a>, and prefetching even <a href="http://developer.android.com/training/efficient-downloads/connectivity_patterns.html">more aggressively</a> when using higher bandwidth (but more power-hungry) radios.</span><br />
<br />
<b>Learn more at Android Training</b><br />
<br />
This is just a brief summary, my Android Training class: <a href="http://developer.android.com/training/efficient-downloads/index.html">Transferring Data Without Draining the Battery</a> teaches you more about the underlying radio hardware, how to use that knowledge to optimize your apps' battery impact, and how to analyze your apps' current transfer profile.Reto Meierhttp://www.blogger.com/profile/04583545000534514486noreply@blogger.com11501 Charleston Rd, Mountain View, CA 94043, USA37.420498008677363 -122.0823258161544837.420104008677363 -122.08294281615449 37.420892008677363 -122.08170881615447tag:blogger.com,1999:blog-10735231.post-13047331749307043072012-01-02T03:21:00.000+00:002012-01-04T17:10:24.996+00:002011: My Year in Review<div dir="ltr" style="text-align: left;" trbidi="on">
2011 was a big year for me. I moved from London to the Bay Area, got promoted, wrote <a href="http://www.amazon.com/gp/product/1118102274/ref=as_li_ss_tl?ie=UTF8&tag=interventione-20&linkCode=as2&camp=217145&creative=399373&creativeASIN=1118102274">Professional Android 4 Application Development</a>, and had my first Thanksgiving.<br />
<br />
In amongst all that I read some books, took some pictures, and played with some Android gadgets. Here's a little summary of the highlights.<br />
<br />
<b>Books</b><br />
<br />
This year I used Google Books to store my <a href="http://books.google.com/books?uid=103165518259240682176&as_coll=1010&source=gbs_lp_bookshelf_list">2011 reading list</a>. My count was down somewhat (16 books compared to 23 last year), mainly due to the free-time spend writing the aforementioned book. This year's highlights:<br />
<br />
<ul style="text-align: left;">
<li><b>Favorite Book</b>: <a href="http://www.amazon.com/gp/product/0553801473/ref=as_li_ss_tl?ie=UTF8&tag=interventione-20">A Dance with Dragons</a> by George R. R. Martin.</li>
<li><b>Most Read Author</b>: I read two books by <a href="http://www.amazon.com/gp/entity/Courtney-Summers/B001JSCFY6/?ie=UTF8&tag=interventione-20">Courtney Summers</a> and two by <a href="http://www.amazon.com/mn/search/?_encoding=UTF8&redirect=true&keywords=Wil%20Wheaton&tag=interventione-20">Wil Wheaton</a>, but 16 books doesn't leave a lot of room for doubling up in a year when Feist, Pratchett, and Martin all release new books. </li>
<li><b>Hardcover versus Paperback</b>: 4 hardcovers, 5 Kindle eBooks, 7 paperbacks.</li>
</ul>
<b>Apps</b><br />
<br />
Lots of changes <a href="http://blog.radioactiveyak.com/p/reto-meiers-installed-android-apps.html">to the list</a> this year. iPlayer, Ocado, and the London Cycle Hire Widget all drop off the list thanks to my move Stateside. Beluga gets dropped in favour of G+ Messenger, and TweetDeck gets the old uninstall thanks to increasingly poor performance and my shift away from Twitter towards Google+.<br />
<br />
New to the list this year are <a href="https://market.android.com/details?id=com.pandora.android">Pandora</a> and <a href="https://market.android.com/details?id=com.google.android.music">Google Music</a>, which have revolutionized the way I listen to music since moving to the US. <a href="https://market.android.com/details?id=com.zeptolab.ctr.paid">Cut the Rope</a>, <a href="https://market.android.com/details?id=com.threed.bowling">3D Bowling</a>, and the <a href="https://market.android.com/details?id=com.mxtech.videoplayer.ad">MX Video Player</a> earned their striped keeping me entertained flying between California and Western Australia, and <a href="https://market.android.com/details?id=com.mobilesrepublic.appy">News Republic</a> has come out on top when it comes to giving me news on the go.<br />
<br />
<b>Photography</b><br />
<br />
A move to the Bay Area (and its hundreds of hiking trails through gorgeous nature reserves), a visit to NYC, and a trip back to Australia provided ample fodder for some photography. This year I tried my hand at some HDR processing too. A portfolio of my <a href="https://plus.google.com/photos/111169963967137030210/albums/5692859986746506145">best pics is online here</a>.<br />
<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="https://plus.google.com/photos/111169963967137030210/albums/5692859986746506145" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="266" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjuvIIV9gXm-Kv2fgJGo6Lb7BdhhTP2TOj87Y2Kzg977g0M80vphDFdE23-IhnUe1NR7Ouoazr7UAPTEu_R6WdJTRmtHm9t24UO1mbHtaY7XdXM8_yFN0gwsadOET8DDROD7NOlww/s400/Sunset_HDR_15.jpg" width="400" /></a></div>
<br />
<b>Gadgets</b><br />
<br />
What am I carrying these days? Check out <a href="http://blog.radioactiveyak.com/p/reto-meiers-gadget-compendium.html">Reto Meier's Gadget Compendium</a>.<br />
<br />
The big changes this year were the introduction of the <a href="http://www.google.com/nexus/#">Galaxy Nexus</a> to replace my Nexus S, and the inclusion of a <a href="http://www.samsung.com/global/microsite/galaxytab/10.1/index.html">Galaxy Tab 10.1</a> at the expense of the Xoom and a 7" Galaxy Tab. The 10" Tab is thin, light, and last forever -- indispensable for long haul travel.<br />
<br />
Trends for 2011:<br />
<ul>
<li><b>Lighter and thinner</b>: The 10" Galaxy Tab probably weighs less than the 7" version. My Galaxy Nexus is the thinnest Android phone I've owned and is lighter than the smaller device it replaces.</li>
<li><b>Bigger screens</b>: A 10" tablet replaced the 7" version and the Galaxy Nexus has a bigger screen than the Nexus S. People talk about screens being "too big", but provided they weigh less and don't suck up more power, I don't see a problem.</li>
</ul>
As for 2012? I'm hoping to see some Android @ Home gear this year. I think it might be time to upgrade my camera gear -- starting with a prime lens and going from there. I like the new Kindles, but the Kindle 3G I'm using right now does everything I need, so I don't see a Fire in my future.</div>Reto Meierhttp://www.blogger.com/profile/04583545000534514486noreply@blogger.com4tag:blogger.com,1999:blog-10735231.post-9446388037256186392011-11-09T04:22:00.001+00:002011-11-17T17:00:45.013+00:00Australia in High Dynamic Range<div dir="ltr" style="text-align: left;" trbidi="on">
<div dir="ltr" style="text-align: left;" trbidi="on">
<div class="separator" style="clear: both; text-align: center;">
<a href="https://plus.google.com/photos/111169963967137030210/albums/5675763521899654785/5675763553582753858" imageanchor="1" style="margin-left: 0em; margin-right: 0em;"><img border="0" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEh0Yu0GNQxK1-qhovM5KEj4sUin7asfpfkcKXZ0tNI3CNDlBINQCeenxlEuQb3edfPjcN6Q9cY6bsRsTsO5OKJpMT_j3hca4cwiw3H_WBwILDR8vw7L-G9aEiUJs8Cl3kP2VFCFtQ/s640/BallaratHDR_13.jpg" width="600" /></a></div>
</div>
I've been really impressed with the work <a href="https://plus.google.com/105237212888595777019/posts">+Trey Ratcliff</a> has been sharing on Google+, which led to me wondering if <a href="http://en.wikipedia.org/wiki/High_dynamic_range_imaging">HDR</a> might be a way to add some "punch" to my landscape photography. My recent holiday back to Oz offered the perfect excuse to experiment. I've put my best HDR photos so far into <a href="https://plus.google.com/photos/111169963967137030210/albums/5675763521899654785">this Google+ album</a>.<br />
<br />
I've been working on my photography skills for a while now, but there are certain scenes that I've found particularly challenging. Dramatic sunsets, photos taken in bright sunlight (or towards the sun), or photos taken on dark, gray days have been a struggle to capture adequately on camera.<br />
<br />
HDR seemed like a technique that might help me capture on film what I could see with my eyes, and what better place to practice than on a Western Australian beach at sunset?<br />
<div class="separator" style="clear: both; text-align: left;">
<br /></div>
<div class="separator" style="clear: both; text-align: center;">
<a href="https://plus.google.com/photos/111169963967137030210/albums/5675763521899654785/5675763650278317778" imageanchor="1" style="margin-left: 0em; margin-right: 0em;"><img border="0" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiHSD3XQAqew6Gsv8aL1msZbjmieoqOlCkRIgOdEtI3RxsG8PbHLFmW2h_ab7AWPkP0xVkmDVIGkSGaPv0RRmvN_ehyphenhyphenswpuWfubYraAhD1pCbS6kzLfZLLyxge3v_HBfLUgnK_oIQ/s640/Sunset_HDR_15.jpg" width="600" /></a></div>
We also spent some time in Ballarat, over in Victoria. In recent years rural Australia has been known for a crippling drought followed by devastating floods, but when we visited it was a velvet field punctuated by saphires, with the dams and lakes all filled to capacity.<br />
<div class="separator" style="clear: both; text-align: left;">
<br /></div>
<div class="separator" style="clear: both; text-align: center;">
<a href="https://plus.google.com/photos/111169963967137030210/albums/5675763521899654785/5675763526664634754" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="267" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhNHSBwIliqxehZASLDAgFvvRhbmboryhX7Nl6CFwfRWQbVPllHwTtBJ67g4Yhzm-kVbvErqbDregeRdxg0d9D7i7aXFqajcbvMYx36uqIhsHUY8dp2MnwaYjJXYcobCnweEUqzlg/s400/BallaratHDR_16.jpg" width="400" /></a></div>
We were staying within the shadow of <a href="http://en.wikipedia.org/wiki/Mount_Buninyong">Mount Buninyong</a>, which provided the perfect opportunity to experiment with some midday shots taken from a high vantage point.<br />
<br />
Bird's eye views are always stunning in person, but I've had difficulty turning that view into interesting photos -- particularly as I seldom make it to these places at dusk or dawn when the natural light would be more favorable. My initial results were definitely encouraging.<br />
<div class="separator" style="clear: both; text-align: left;">
<br /></div>
<div class="separator" style="clear: both; text-align: center;">
<a href="https://plus.google.com/photos/111169963967137030210/albums/5675763521899654785/5675763528325630850" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="266" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgGgJLtAIKhpqJ4863BJMm6f3o2PVhngeTJHar33Mo9qh1KmmNgc6dPGZBG-A43mPzC6OZTKrkoVWsenYOM2cIr_SPhZrKpr50b1OK_DSefVCHpQawMwiDVL3SM2kKV02ogNbidtA/s400/BallaratHDR_18.jpg" width="400" /></a></div>
To help experiment, my trusty Canon EOD 500D has an exposure bracketing option that lets me take three consecutive pictures using different exposures. Photoshop comes with an automation plugin that merges multiple exposures to produce HDR images.<br />
<br />
I learned a few things from my experience so far. The first - somewhat obviously - is to look for scenes with an abundance of color depth. Rich greens offset by deep blues and grays look fantastic.<br />
<div class="separator" style="clear: both; text-align: left;">
<br /></div>
<div class="separator" style="clear: both; text-align: center;">
<a href="https://plus.google.com/photos/111169963967137030210/albums/5675763521899654785/5675763553922747042" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="266" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEi2Y-HGOavlVrJzl8pVxYvWwqQ6D_VA00m-zTzyg0kG5begehnXsGkZI1G1Mjtg5U1102qCI5YBcFrpItVh22gFu72sZ5fGbwbrPWcG5R8dR6JwqUyJ0-45pZCqR0RImiqbBykfJw/s400/BallaratHDR_1.jpg" width="400" /></a></div>
Somewhat less obvious is the effect that a hint of rich color can add to an otherwise monochromatic scene. HDR will add layers of depth to grey clouds and dark seas, so a small splash of red or green can produce dramatic results.<br />
<div class="separator" style="clear: both; text-align: left;">
<br /></div>
<div class="separator" style="clear: both; text-align: center;">
<a href="https://plus.google.com/photos/111169963967137030210/albums/5675763521899654785/5675763568611986578" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="266" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiOQFAtzVoYDbbMvXWpFLidxR2Rrie81OJa1dO4JaDtpzHrqDOUarsNVJg9_1PNpp5oCY2MR0-xuOBAltxYSXWz3aK4Ta_kNZxeFppOe7oQgEPTttl3-lyQDlpQzwiV7HXhqpsnPw/s400/StKilda_HDR_2.jpg" width="400" /></a></div>
I also learned that taking portrait photos in HDR is much more difficult. Close-ups can be incredibly unflattering as skin tones are exaggerated and people start to creep into the <a href="http://en.wikipedia.org/wiki/Uncanny_valley">uncanny valley</a>.<br />
<br />
It's also tricky to photograph scenes with movement. When you merge the images, slight differences are often shown up as artifacts or ghosting. A steady hand is a must (my best results used a tripod), and shooting toward the sun will minimize your exposure times. Looking at the images blown up on my 24" monitor, it's also clear that there are more annoying pixel artifacts, halos, and ghosting that I need to work on to improve the final effect.<br />
<br />
Overall, I need to practice to get better results, but I the progress so far is promising and HDR is definitely a tool I'll be adding to my amateur photography tool-belt.<br />
<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="https://plus.google.com/photos/111169963967137030210/albums/5675763521899654785/5675763528524253874" imageanchor="1" style="margin-left: 0em; margin-right: 0em;"><img border="0" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjrzz_LboBdaaGOXjCseJPSFK2ZB97jNITlACw7hwpTv0DS-46j11uKjOzLxPZPzj4EWp7f8Dzdl1L54zWa8mByLCccTHJNqFsTnckEoidMJjUVhGh4xjTiIYf3Ddk0-PXldTdgvg/s640/KandPHDR_5.jpg" width="600" /></a></div>
<div class="separator" style="clear: both; text-align: left;">
<span class="Apple-style-span" style="background-color: white; color: #333333; font-family: 'Trebuchet MS', Verdana, Arial, sans-serif; font-size: 13px; line-height: 18px;"><i>[I've disabled comments here in favour of using Google+. Feel free to join the conversation <a href="https://plus.google.com/111169963967137030210/posts/D2DbVQjeRCr" style="color: #e1771e; text-decoration: none;">over there</a>.]</i></span></div>
</div>Reto Meierhttp://www.blogger.com/profile/04583545000534514486noreply@blogger.com0tag:blogger.com,1999:blog-10735231.post-88040570950326949302011-11-08T03:23:00.000+00:002011-11-08T03:26:12.924+00:00Memories in the White Space<div dir="ltr" style="text-align: left;" trbidi="on">
A distinct melancholy accompanies me as I sort through the images and artifacts of my youth.<br />
<br />
<div class="separator" style="clear: both; text-align: center;">
<img border="0" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEht-2wW6Tqv2zl7bOs7lS3LIvLmw_XrR2rsAPCREANPffVfx0vrNdia9JWNTUhkX1-GUY_7juCzwLV7xunbZA1kw4jddz2w4mq_fPiG1LJN4mWDnhrIPGDlxIDYBOjJfB1xYzdEVw/s400/Dice.jpg" width="300" /></div>
<br />
My wife and I left Australia almost 7 years ago. We lived in London and now the Bay Area, but for me <i>home</i> is still Perth. We're back this month—the first time in three and a half years—and I'm using the opportunity to free my parents of some of the detritus I left with them before taking off in 2005.<br />
<br />
Our visit has been timed to coincide with the wedding of one of my very best friends. I've been friends with the groom and most of his side of the wedding since our first year at Duncraig Senior High. We were all members of the <i>Academic Extension</i> program (a particularly nefarious way to target those of us most likely to be on the fringes of high school social life and stigmatize us further by segregating us into separate classes.)<br />
<br />
When we all get together for some quiet drinks the night before the wedding it's only a matter of minutes before my accent has slowed and thickened, and we're poking fun and chatting as though I'd never left. The same pattern repeats as we catch up with close friends I'm lucky to see every few years. We share a hug and a beer and talk about their new kids, houses, fiances, spouses, and business ventures with an easy comfort that makes it seem like only a or two week has passed since we last hung out.<br />
<br />
Back at my parent's house, amongst the polyhedral dice, Star Trek VHS tapes, and school assignments are 10 A3 scrapbooks filled with photographs of me, my friends, and family from birth until I moved out at 21. <br />
<br />
I grew up in the age before digital cameras and smartphones captured every moment (magic or otherwise) ready for posting to Facebook. As teenage boys, my friends and I were particularly adept at avoiding my mum's instamatic. As a result, flipping through the stacks of photo albums is a surreal experience. Christmases, birthdays, high school balls, and graduation ceremonies are all captured in full colour—but what strikes me most is the memories that live in the white space between the photos.<br />
<br />
A thumb-obscured image doesn't capture the experience of all-night LAN parties spent playing Doom 2. A single photo of us playing pickup basketball (without the hoop in frame) is a faint reminder of the hours spent on court and the four broken arms collected between me and the aforementioned groom during games; plaster-cast testimony to our passion for the game.<br />
<br />
A shot of me posing, awkward and gangly, in my inter-school sports uniform captures nothing about the day, but brings back the crowd of apathetic high-schoolers gathering around the high-jump mats, and the rush (and not a small amount of surprise) I felt as they genuinely cheered me on to jump my own height and break the school record.<br />
<br />
<div class="separator" style="clear: both; text-align: center;">
<img border="0" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhb1l51mrH_vqc37M27KVlWSVctJ2Xv4B5Zx0-5V0lV2QiimxkZnQlaeq21eYYnzyqeQBo9oRq3iDzzrK5HoYSlTIARE3OCUXDTBiL_P0Hx-wINOaJUpgkZmccz74cZtCHLp5jOmg/s400/Childhood_1.jpg" width="610" /></div>
<br />
There aren't any photos to commemorate the long nights spent playing AD&D, or the Friday nights we all spent at WesTrek watching boot-leg videos of each new episode of TNG, but the Player's Handbooks and mountains of Star Trek videos, books, and technical manuals bring back the memories all the same.<br />
<br />
20 years. That's how long I've known some of my closest friends. Two thirds of my life. I'm a proper geek, so don't find it easy to build these effortless friendships, so the comfort of sliding back into them is tempered by the knowledge that it'll be years until I can next hang out with some of my best friends. <br />
<br />
Email, Facebook status updates, and Google+ will help us stay in touch until the next time we voyage the 8,000 miles back home. When that happens there'll be more kids to meet, new houses to tour, and new businesses to hear about. We'll hug, share a few beers, and it'll be like we never left.<br />
<br />
<i>[I've disabled comments here in favour of using Google+. Feel free to join the conversation <a href="https://plus.google.com/111169963967137030210/posts/Db7D1mxrxMT">over there</a>.]</i></div>Reto Meierhttp://www.blogger.com/profile/04583545000534514486noreply@blogger.comtag:blogger.com,1999:blog-10735231.post-25998141657144084602011-07-07T16:24:00.000+01:002011-07-07T16:24:29.513+01:00Obligatory Post Speculating on Google+<div dir="ltr" style="text-align: left;" trbidi="on">I love product launches. It's the perfect time to speculate with no inconvenient research or history to get in the way.<br />
<br />
<blockquote>This goes for everything on this blog, but it's probably worth highlighting in this instance that these opinions are my own. They do not represent the thoughts and opinions of Google, the Google+ team, or anyone else who works at Google.</blockquote><br />
My history of speculating on products tends to be bullish on Google and cynical of social. I thought <a href="http://blog.radioactiveyak.com/2007/11/android-in-action.html">Android</a> and Wave were going to change the world, and that Twitter was a waste of time.<br />
<br />
<b>Twitter with conversations</b><br />
<br />
Despite my initial reservations I'm a big user of <a href="http://www.twitter.com/retomeier">Twitter</a>, but I find that most of my interaction there is effectively anonymous - I'm either reading things by interesting people I don't know, or sharing things I think are interesting with people I've never met. <br />
<br />
I've found that half my use of <a href="http://profiles.google.com/reto.meier">Google+</a> works similarly - by posting publicly and creating a "My Stream" circle full of interesting folks who I don't know personally.<br />
<br />
Where I think Google+ adds value is with threaded conversations. By attaching the conversation that emerges from each post, anonymity is reduced and the process of sharing and reading are suddenly more social.<br />
<br />
<b>Facebook with sharing controls</b><br />
<br />
I remember quite clearly the moment my use of Facebook went from regular to sporadic. My manager's passing comment on my most recent status update (something along the lines of "<i>I'm so bored I'm considering setting myself on fire just to liven up my day</i>") prompted <a href="http://blog.radioactiveyak.com/2007/10/could-facebook-hitting-critical-mass.html">this blog post</a>.<br />
<br />
I've always maintained a policy of only adding people I know and would recognize in person as Facebook friends. Nonetheless, when your extended family, school friends, and current / former work colleagues are all reading the same stream, and seeing the same pictures, the intersection of "appropriate material" rapidly tends towards zero.<br />
<br />
Using circles to fragment my audience has been an elegant solution for me.<br />
<br />
I've created the obvious circles like "friends", "family", and "Googlers" but I've found smaller adhoc circles particularly useful when socializing<br />
<br />
<b>Socializing+</b><br />
<br />
In the paleolithic age we used email to arrange social events and share the photos afterwards, but it never really worked.<br />
<br />
Facebook is a good alternative, but it requires adding people you don't necessarily know to your "friends" list.<br />
<br />
Being able to create an adhoc circle (or just add individual people to a post) - makes it easy to work out the details for a 4th July BBQ - and then post the photos - all in one place. <br />
<br />
I've not spent a lot of time with Huddles or Hangouts yet, but they seem a natural extension. I can see using Huddle instead of SMS to let folks know you're running late, to get parking advice, or confirm the orders for a lunch-run. I've used similar products (most notably Beluga and GroupMe) to coordinate amongst a large group at conferences or events like MWC or Google I/O.<br />
<br />
<b>Social photo sharing without wanting to punch your screen</b><br />
<br />
Photos are probably the reason most folks joined Facebook to begin with. It's also the reason many people hate Facebook. <br />
<br />
I'll happily rave about the Google+ photo experience which is awesome. It's easy to share photos with just a small group, or post your best amateur photography for the world to critique.<br />
<br />
<b>I don't want to be social at work</b><br />
<br />
For all the good uses, let me highlight a couple that I don't see catching on.<br />
<br />
I admit to having been a little skeptical of Google+ during the dogfooding stage. With 20/20 hindsight, I think a lot of that had to do with it being effectively a corporate social network. My email inbox is full enough as it is; I really don't need another stream to monitor in order to be involved in work conversations.<br />
<br />
<b>This is not a blog</b><br />
<br />
You'll note that I haven't posted this directly on Google+.<br />
<br />
I don't want to read your essay in my social stream, just give me an abstract and link to your blog. For added bonus points, make sure your blog links back to your Google+ profile.<br />
<br />
<b>In Conclusion</b><br />
<br />
Twitter is entirely public and as a result my interactions there are regular but tend towards the impersonal. Facebook is limited to people I know so the interactions are more personal, but (increasingly) less frequent.<br />
<br />
Google+ lets me choose which group of people I'm comfortable sharing something with to a degree that lets me have regular, personal conversations.<br />
<br />
As many of you have no doubt noticed - that makes for an addictive combination. </div>Reto Meierhttp://www.blogger.com/profile/04583545000534514486noreply@blogger.com5Mountain View, CA, USA37.420199098162286 -122.0837879629516537.363526098162282 -122.12038296295165 37.476872098162289 -122.04719296295164tag:blogger.com,1999:blog-10735231.post-60130246485220395352011-07-06T18:40:00.000+01:002011-07-06T18:40:33.732+01:00London 2005-2011 in Photographs<div dir="ltr" style="text-align: left;" trbidi="on">
I really like the photo sharing and viewing experience in <a href="http://www.google.com/+">Google+</a> so I decided to sort through my massive collection of "London" photographs and share some of my favorites.<br />
<br />
Selecting and preparing photos to share has a way of focussing your attention and allowing you to really look at them critically. As I sifted through the thousands of photographs I'd taken in London it quickly became obvious that I've got some work to do before I'm competing with <a href="http://www.flickr.com/photos/romainguy">Romain Guy</a>.<br />
<br />
It was also clear that I had a couple of preferred sources of inspiration.<br />
<br />
<b>The Seasons</b><br />
<br />
Grey skies and light rain don't make for great photos and an overcast Winter that starts in October and ends around April does little to provide inspiration.<br />
<br />
London is blessed with real seasons though, and Autumn and Spring (however brief) are an entirely different matter. They offer some of the most amazing light and color for taking photos. And when it snows? London transforms briefly into a winter wonderland.<br />
<br />
By 10am the skies cloud over and the snow turns to mush, so to take advantage you need to be out there at dawn. I worked in banking, so that was never a problem.<br />
<br />
Each of the following thumbnails links to a gallery of my pictures of London in <a href="https://plus.google.com/photos/111169963967137030210/albums/5626272406881217153">Winter</a>, <a href="https://plus.google.com/photos/111169963967137030210/albums/5626272572977256881">Spring</a>, and <a href="https://plus.google.com/photos/111169963967137030210/albums/5626272257935280001">Autumn</a> respectively.<br />
<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="https://plus.google.com/photos/111169963967137030210/albums/5626272406881217153"><span id="goog_573265253"></span><img border="0" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjLa71bO0GxNRREgeplsSV93Yx8apBFmdsPpfsbeqrns3ErZZtZN8U5yzNo4hqJZMaoebP9FlHGDWffGNwyJc6J6TyhOhryMH85ZQsdvord6e1jCh3JWOutx9wKYhBSYrZ2Hx8J_A/s200/DSC01120.JPG" width="190" /><span id="goog_573265254"></span></a><a href="https://plus.google.com/photos/111169963967137030210/albums/5626272572977256881"><img border="0" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiwYaolqdO4bw5cgGt-lP-V4npJNAc12VtTYDFf_oV0ZuapgzKH6MJd_97ZktDhlkeGXgCecvH30BAcIsS-QhbO4hvDIDCk-ZiqkiGKKJXoqLISY7l6gNGOcFWeo6r0REVoV_YPfA/s200/DSC03118.JPG" width="190" /></a><a href="https://plus.google.com/photos/111169963967137030210/albums/5626272257935280001"><img border="0" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgLwnDCe6P1s0JycEIHM8bF6othJX0qaI5LyL_a-72R3r8t4_1qmOJue3I8Dl-IfRhrkic-m2bkkYJ7ysbtyaPLUrgnzeHJjBM5wfudUG840T2bpqiPz2xT_h7IlxGoP3guo09bwg/s200/DSC02226.JPG" width="190" /></a></div>
<div class="separator" style="clear: both; text-align: center;">
<br /></div>
<div class="separator" style="clear: both; text-align: center;">
</div>
<div style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; text-align: left;">
<b>The Sights</b></div>
<div style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; text-align: left;">
<br /></div>
<div style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; text-align: left;">
London has some of the most easily recognized landmarks in the world. Because of the seemingly perpetually grey and overcast skies, lots of tourist snaps come out flat and dull. To get around that I've taken most of them at night or very early in the morning.</div>
<div style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;">
<br /></div>
<div class="separator" style="clear: both; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; text-align: center;">
<a href="https://plus.google.com/photos/111169963967137030210/album/5626269252050609249" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="212" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjv_IUMHEx0Aj6gdfFUsu5I3054Bq33fXyCRzMWtiL5BuKyM6fHImiJhVvLixC9wFTxH3XEYii6uNoJoCeej1jvjPgSVGEs3-DR-jxlFIAF73ZKeZWeINjFgPIvvEsYcQzj1QH7UA/s320/IMG_0085.JPG" style="cursor: move;" width="320" /></a></div>
</div>Reto Meierhttp://www.blogger.com/profile/04583545000534514486noreply@blogger.com2tag:blogger.com,1999:blog-10735231.post-65984907378529707832011-06-28T17:30:00.001+01:002011-06-28T17:31:16.929+01:00A Deep Dive Into Location Part 2: Being Psychic and Staying Smooth<div dir="ltr" style="text-align: left;" trbidi="on">
<blockquote>
<i>This is part two of <a href="http://android-developers.blogspot.com/2011/06/deep-dive-into-location.html">A Deep Dive into Location</a>. This post focuses on making your apps psychic and smooth using the Backup Manager, AsyncTask, Intent Services, the Cursor Loader, and Strict Mode.</i></blockquote>
<blockquote>
<i>The code snippets used are available as part of the <a href="http://code.google.com/p/android-protips-location/">Android Protips: A Deep Dive Into Location</a> open source project. More pro tips can be found in my <a href="http://www.google.com/events/io/2011/sessions/android-protips-advanced-topics-for-expert-android-app-developers.html">Android Pro Tips</a> presentation from </i><i>Google I/O. </i></blockquote>
<b>Being Psychic</b><br />
<br />
You've just had to factory reset your device - never a good day - but yay! You've opted in to "backup my settings" and Android is happily downloading all your previously installed apps. Good times! You open your favourite app and... all your settings are gone. <br />
<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="http://www.youtube.com/watch?v=twmuBbC_oB8#"><img border="0" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjm11bZqcQKmhyphenhyphenUiFxbJW6kY1251LIJI5Sa5ykYDD4CE0K7vqqZ3BDcoOy7bqCh9DIDoIJOGVNSqRLmFoPy3wV7lzkMryxhS_v5Nt7GG54bGLwq8qS8EXqbiAlvnWI8IRnBiwO3eA/s1600/small_psychic.png" /></a></div>
<br />
<b>Backup Shared Preferences to the Cloud using the Backup Manager</b><br />
<br />
If you're not using the <a href="http://developer.android.com/reference/android/app/backup/BackupManager.html">Backup Manager</a> to preserve user preference to the cloud I have a question for you: Why do you hate your users? The Backup Manager was added to Android in Froyo and it's about as trivial to implement as I can conceive.<br />
<br />
All you need to do is extend the <a href="http://developer.android.com/reference/android/app/backup/BackupAgentHelper.html">BackupAgentHelper</a> and create a new <a href="http://developer.android.com/reference/android/app/backup/SharedPreferencesBackupHelper.html">SharedPreferencesBackupHelper</a> within it's <span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;">onCreate</span> handler.<br />
<br />
As shown in the <a href="http://code.google.com/p/android-protips-location/source/browse/trunk/src/com/radioactiveyak/location_best_practices/PlacesBackupAgent.java">PlacesBackupAgent</a>, your Shared Preferences Backup Helper instance takes the name of your Shared Preference file, and you can specify the key for each of the preferences you want to backup. This should <b>only</b> be user specified preferences - it's poor practice to backup instance or state variables.<br />
<br />
<code>public class PlacesBackupAgent extends BackupAgentHelper {<br />
@Override<br />
public void onCreate() {<br />
SharedPreferencesBackupHelper helper = new <br />
SharedPreferencesBackupHelper(this, PlacesConstants.SHARED_PREFERENCE_FILE);<br />
addHelper(PlacesConstants.SP_KEY_FOLLOW_LOCATION_CHANGES, helper);<br />
}<br />
}</code><br />
<br />
To add your Backup Agent to your application you need to add an <span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;">android:backupAgent</span> attribute to the Application tag in your manifest.<br />
<br />
<code><application android:icon="@drawable/icon" android:label="@string/app_name"<br /> android:backupAgent="PlacesBackupAgent"></code><br />
<br />
You also need to specify an API key (which you can obtain from here: <a href="http://code.google.com/android/backup/signup.html">http://code.google.com/android/backup/signup.html</a>)<br />
<br />
<code><meta-data android:name="com.google.android.backup.api_key" <br />
android:value="Your Key Goes Here" /></code><br />
<br />
To trigger a backup you just tell the Backup Manager that the data being backed up has changed. I do this within the <a href="http://code.google.com/p/android-protips-location/source/browse/trunk/src/com/radioactiveyak/location_best_practices/utils/base/SharedPreferenceSaver.java">SharedPreferenceSaver</a> classes, starting with the <a href="http://code.google.com/p/android-protips-location/source/browse/trunk/src/com/radioactiveyak/location_best_practices/utils/FroyoSharedPreferenceSaver.java">FroyoSharedPreferenceSaver</a>.<br />
<br />
<code>public void savePreferences(Editor editor, boolean backup) {<br />
editor.commit();<br />
backupManager.dataChanged();<br />
}</code><br />
<br />
<b>Being Smooth: Make everything asynchronous. No exceptions.</b><br />
<br />
Android makes it easy for us to write apps that do nothing on the main thread but update the UI.<br />
<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="http://www.youtube.com/watch?v=twmuBbC_oB8#" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEj6UDiTAyPKPCu92ZxnjEbCbCZXq60nwR9oP7SwE8OMDg5k3Fr8RovgV6HnPhJXoG4SYfdv1vYe6VgZyiOuafQHlIw6JH04Oz_uzT5Yx6pwN2NId8ftww-V36JGZjoqp8d5YzLqFw/s1600/small_smooth.png" /></a></div>
<br />
<b>Using AsyncTask</b><br />
<br />
In this example, taken from <a href="http://code.google.com/p/android-protips-location/source/browse/trunk/src/com/radioactiveyak/location_best_practices/UI/PlaceActivity.java">PlaceActivity</a>, I'm creating and executing an <span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;">AsyncTask</span> class to lookup the best previous known location. This isn't an operation that should be particularly expensive - but I don't care. It isn't directly updating the UI, so it has no business on the main application thread.<br />
<br />
<code>AsyncTask<void, void, void> findLastLocationTask =
new AsyncTask<void, void, void>() {<br />
@Override<br />
protected Void doInBackground(Void... params) {<br />
Location lastKnownLocation = <br />
lastLocationFinder.getLastBestLocation(PlacesConstants.MAX_DISTANCE, <br />
System.currentTimeMillis()-PlacesConstants.MAX_TIME);<br />
<br />
updatePlaces(lastKnownLocation, PlacesConstants.DEFAULT_RADIUS, false);<br />
return null;<br />
}<br />
};<br />
findLastLocationTask.execute();</code><br />
<br />
You'll note that I'm not touching the UI during the operation or at its completion, so in this instance I could have used normal Thread operations to background it rather than use AsyncTask.<br />
<br />
<b>Using the IntentService</b><br />
<br />
Intent Services implement a queued asynchronous worker Service. Intent Services encapsulate all the best practices for writing services; they're short lived, perform a single task, default to Start Not Sticky (where supported), and run asynchronously. <br />
<br />
To add a new task to the queue you call <span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;">startService</span> passing in an Intent that contains the data to act on. The Service will then run, executing <span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;">onHandleIntent</span> on each Intent in series until the queue is empty, at which point the Service kills itself.<br />
<br />
I extended Intent Service for all my Service classes, <a href="http://code.google.com/p/android-protips-location/source/browse/trunk/src/com/radioactiveyak/location_best_practices/services/PlacesUpdateService.java">PlacesUpdateService</a>, <a href="http://code.google.com/p/android-protips-location/source/browse/trunk/src/com/radioactiveyak/location_best_practices/services/PlaceDetailsUpdateService.java">PlaceDetailsUpdateService</a>, <a href="http://code.google.com/p/android-protips-location/source/browse/trunk/src/com/radioactiveyak/location_best_practices/services/PlaceCheckinService.java">PlaceCheckinService</a>, and <a href="http://code.google.com/p/android-protips-location/source/browse/trunk/src/com/radioactiveyak/location_best_practices/services/CheckinNotificationService.java">CheckinNotificationService</a>.<br />
<br />
Each implementation follows the same pattern, as shown in the <a href="http://code.google.com/p/android-protips-location/source/browse/trunk/src/com/radioactiveyak/location_best_practices/services/PlacesUpdateService.java">PlacesUpdateService</a> extract below.<br />
<br />
<code>@Override<br />
protected void onHandleIntent(Intent intent) {<br />
String reference = intent.getStringExtra(PlacesConstants.EXTRA_KEY_REFERENCE);<br />
String id = intent.getStringExtra(PlacesConstants.EXTRA_KEY_ID);<br />
<br />
boolean forceCache =
intent.getBooleanExtra(PlacesConstants.EXTRA_KEY_FORCEREFRESH, false);<br />
boolean doUpdate = id == null || forceCache;<br />
<br />
if (!doUpdate) {<br />
Uri uri = Uri.withAppendedPath(PlaceDetailsContentProvider.CONTENT_URI, id);<br />
Cursor cursor = contentResolver.query(uri, projection, null, null, null);<br />
<br />
try { <br />
doUpdate = true;<br />
if (cursor.moveToFirst()) {<br />
if (cursor.getLong(
cursor.getColumnIndex(
PlaceDetailsContentProvider.KEY_LAST_UPDATE_TIME)) ><br />
System.currentTimeMillis()-PlacesConstants.MAX_DETAILS_UPDATE_LATENCY)<br />
doUpdate = false;<br />
}<br />
}<br />
finally {<br />
cursor.close();<br />
}<br />
}<br />
<br />
if (doUpdate)<br />
refreshPlaceDetails(reference, forceCache);<br />
}</code><br />
<br />
Note that the queue is processed on a background thread, so I can query the Content Provider without having to spawn another background thread.<br />
<br />
<b>CursorLoaders are awesome. Use them.</b><br />
<br />
Loaders are awesome; and thanks to the <a href="http://developer.android.com/sdk/compatibility-library.html">compatibility library</a>, they're supported on every platform back to Android 1.6 - that’s about 98% of the current Android device install base.<br />
<br />
Using <a href="http://developer.android.com/reference/android/content/CursorLoader.html">CursorLoaders</a> is a no-brainer. They take a difficult common task - obtaining a Cursor of results from a Content Provider - and implement, encapsulate, and hide all the bits that are easy to get wrong.<br />
<br />
I've already fragmented and encapsulated my UI elements by creating three Fragments -- <a href="http://code.google.com/p/android-protips-location/source/browse/trunk/src/com/radioactiveyak/location_best_practices/UI/fragments/PlaceListFragment.java">PlaceListFragment</a>, <a href="http://code.google.com/p/android-protips-location/source/browse/trunk/src/com/radioactiveyak/location_best_practices/UI/fragments/PlaceDetailFragment.java">PlaceDetailFragment</a>, and <a href="http://code.google.com/p/android-protips-location/source/browse/trunk/src/com/radioactiveyak/location_best_practices/UI/fragments/CheckinFragment.java">CheckinFragment</a>. Each of these Fragments access a Content Provider to obtain the data they display.<br />
<br />
The list of nearby places is handled within the <a href="http://code.google.com/p/android-protips-location/source/browse/trunk/src/com/radioactiveyak/location_best_practices/UI/fragments/PlaceListFragment.java">PlaceListFragment</a>, the relevant parts of which are shown below.<br />
<br />
Note that it's entirely self contained; because the Fragment extends ListFragment the UI is already defined. Within <span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;">onActivityCreated</span> I define a Simple Cursor Adapter that specifies which Content Provider columns I want to display in my list (place name and my distance from it), and assign that Adapter to the underlying List View.<br />
<br />
The final line initiates the Loader Manager.<br />
<br />
<code>public void onActivityCreated(Bundle savedInstanceState) {<br />
super.onActivityCreated(savedInstanceState);<br />
activity = (PlaceActivity)getActivity();<br />
<br />
adapter = new SimpleCursorAdapter(activity,<br />
android.R.layout.two_line_list_item,<br />
cursor,<br />
new String[] <br />
{PlacesContentProvider.KEY_NAME, PlacesContentProvider.KEY_DISTANCE}, <br />
new int[] {android.R.id.text1, android.R.id.text2}, 0);<br />
<br />
// Allocate the adapter to the List displayed within this fragment.<br />
setListAdapter(adapter);<br />
<br />
// Populate the adapter / list using a Cursor Loader. <br />
getLoaderManager().initLoader(0, null, this);<br />
}</code><br />
<br />
When the Loader is initiated we specify the parameters we would normally pass in to the Content Resolver when making a Content Provider query. Instead, we pass those parameters in to a new CursorLoader.<br />
<br />
<code>public Loader<cursor> onCreateLoader(int id, Bundle args) {<br />
String[] projection = new String[] <br />
{PlacesContentProvider.KEY_ID,<br />
PlacesContentProvider.KEY_NAME, <br />
PlacesContentProvider.KEY_DISTANCE, <br />
PlacesContentProvider.KEY_REFERENCE};<br />
<br />
return new CursorLoader(activity, PlacesContentProvider.CONTENT_URI, <br />
projection, null, null, null);<br />
}</code><br />
<br />
The following callbacks are triggered when the Loader Manager is initiated, completed, and reset respectively. When the Cursor has been returned, all we need to do is apply it to the Adapter we assigned to the List View and our UI will automatically update.<br />
<br />
The Cursor Loader will trigger <span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;">onLoadFinished</span> whenever the underlying Cursor changes, so there's no need to register a separate Cursor Observer or manage the Cursor lifecycle yourself.<br />
<br />
<code>public void onLoadFinished(Loader<cursor> loader, Cursor data) {<br />
adapter.swapCursor(data);<br />
}<br />
<br />
public void onLoaderReset(Loader<cursor> loader) {<br />
adapter.swapCursor(null);<br />
}</cursor></cursor></code><br />
<br />
The <a href="http://code.google.com/p/android-protips-location/source/browse/trunk/src/com/radioactiveyak/location_best_practices/UI/fragments/PlaceDetailFragment.java">PlaceDetailFragment</a> is a little different; in this case we don't have an Adapter backed ListView to handle our UI updates. We initiate the Loader and define the Cursor parameters as we did in the Place List Fragment, but when the Loader has finished we need to extract the data and update the UI accordingly.<br />
<br />
Note that <span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;">onLoadFinished</span> is <i>not</i> synchronized to the main application thread, so I'm extracting the Cursor values on the same thread as the Cursor was loaded, before posting a new Runnable to the UI thread that assigns those new values to the UI elements - in this case a series of Text Views.<br />
<br />
<code>public void onLoadFinished(Loader<cursor> loader, Cursor data) {<br />
if (data.moveToFirst()) {<br />
final String name = data.getString(<br />
data.getColumnIndex(PlaceDetailsContentProvider.KEY_NAME));<br />
final String phone = data.getString(<br />
data.getColumnIndex(PlaceDetailsContentProvider.KEY_PHONE));<br />
final String address = data.getString(<br />
data.getColumnIndex(PlaceDetailsContentProvider.KEY_ADDRESS));<br />
final String rating = data.getString(<br />
data.getColumnIndex(PlaceDetailsContentProvider.KEY_RATING));<br />
final String url = data.getString(<br />
data.getColumnIndex(PlaceDetailsContentProvider.KEY_URL));<br />
<br />
if (placeReference == null) {<br />
placeReference = data.getString(<br />
data.getColumnIndex(PlaceDetailsContentProvider.KEY_REFERENCE));<br />
updatePlace(placeReference, placeId, true);<br />
}<br />
<br />
handler.post(new Runnable () {<br />
public void run() {<br />
nameTextView.setText(name);<br />
phoneTextView.setText(phone);<br />
addressTextView.setText(address);<br />
ratingTextView.setText(rating);<br />
urlTextView.setText(url);<br />
} <br />
});<br />
}<br />
}</cursor></code><br />
<br />
<b>Using Strict Mode will prevent you from feeling stupid</b><br />
<br />
Strict Mode is how you know you've successfully moved everything off the main thread. Strict Mode was introduced in Gingerbread but some additional options were added in Honeycomb. I defined an <a href="http://code.google.com/p/android-protips-location/source/browse/trunk/src/com/radioactiveyak/location_best_practices/utils/base/IStrictMode.java">IStrictMode</a> Interface that includes an <span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;">enableStrictMode</span> method that lets me use whichever options are available for a given platform. <br />
<br />
Below is the <span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;">enableStrictMode</span> implementation within the <a href="http://code.google.com/p/android-protips-location/source/browse/trunk/src/com/radioactiveyak/location_best_practices/utils/LegacyStrictMode.java">LegacyStrictMode</a> class for Gingerbread devices.<br />
<br />
<code>public void enableStrictMode() {<br />
StrictMode.setThreadPolicy(new StrictMode.ThreadPolicy.Builder()<br />
.detectDiskReads()<br />
.detectDiskWrites()<br />
.detectNetwork()<br />
.penaltyDialog()<br />
.build());<br />
}</code><br />
<br />
The only thing I hate more than modal dialogs in apps is apps that freeze because a network read or disk write is blocking the UI thread. As a result I've enabled detection of network and disk read/writes and reports using a modal dialog.<br />
<br />
I've applied Strict Mode detection to the entire app by extending the Application class to instantiate the appropriate <span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;">IStrictMode</span> implementation and enable Strict Mode. Note that it is only turned on in developer mode. Be sure to flick that switch in the constants file when you launch.<br />
<br />
<code>public class PlacesApplication extends Application {<br />
@Override<br />
public final void onCreate() {<br />
super.onCreate();<br />
<br />
if (PlacesConstants.DEVELOPER_MODE) {<br />
if (PlacesConstants.SUPPORTS_HONEYCOMB)<br />
new HoneycombStrictMode().enableStrictMode();<br />
else if (PlacesConstants.SUPPORTS_GINGERBREAD)<br />
new LegacyStrictMode().enableStrictMode();<br />
} <br />
}<br />
}</code></div>Reto Meierhttp://www.blogger.com/profile/04583545000534514486noreply@blogger.com21Mountain View, CA, USA37.420233181540077 -122.0837772341155937.363560181540073 -122.12037223411559 37.47690618154008 -122.04718223411558tag:blogger.com,1999:blog-10735231.post-59217422594345941412011-06-23T22:23:00.000+01:002011-06-23T22:23:47.090+01:00How to Build Location-Based Apps That Don't Suck<div dir="ltr" style="text-align: left;" trbidi="on">
If I were forced to choose between a smartphone that could make / receive voice calls, and one with Google Maps - I would choose Maps without blinking. <br />
<br />
<strike>Here</strike> Back in London, getting a reliable 3G connection is a challenge at the best of times - getting one while sat in most venues is about as likely as a South West Trains running a good service. So it doesn't help when I go to view details for, checkin, or review a location and a lack of 3G signal thwarts my efforts.<br />
<br />
Whether it's opening a FourSquare app to checkin, or Qype / Zagat / Where to choose where to eat, or the London Cycle Hire Widget to find a Boris Bike - I always feel like a douche standing around with my phone in my hand for half a minute while my phone gets a GPS fix and downloads the nearest locations.<br />
<br />
<b>High latency and a lack of offline support in location-based mobile apps is a blight that must be cleansed</b><br />
<br />
Rather than (or indeed: after) shaking my fist at the sky in impudent rage, I wrote <a href="http://code.google.com/p/android-protips-location/">an open-source reference app</a> that incorporates all of the tips, tricks, and cheats I know to reduce the time between opening an app and seeing an up-to-date list of nearby venues - as well as providing a reasonable level of offline support.<br />
<br />
You can find out more in the associated <a href="http://android-developers.blogspot.com/2011/06/deep-dive-into-location.html">deep-dive into location</a> on the Android Developer Blog.<br />
<br />
<b>Android Protips: Location Best Pratices</b><br />
<br />
It should came as no surprise to learn that I've borrowed heavily from my <a href="http://www.google.com/events/io/2011/sessions/android-protips-advanced-topics-for-expert-android-app-developers.html">Android Protips presentation</a> from Google I/O. Including (but not limited to) using <a href="http://developer.android.com/reference/android/location/LocationManager.html#requestLocationUpdates(long, float, android.location.Criteria, android.app.PendingIntent)">Intents to receive location updates</a>, using the <a href="http://developer.android.com/reference/android/location/LocationManager.html#PASSIVE_PROVIDER">Passive Location Provider</a>, using Intents to passively receive location updates when your app isn't active, monitoring device state to vary refresh rate, <a href="http://developer.android.com/reference/android/content/pm/PackageManager.html#setComponentEnabledSetting(android.content.ComponentName, int, int)">toggling your manifest Receivers</a> at runtime, and using the <a href="http://developer.android.com/reference/android/content/CursorLoader.html">CursorLoader</a>.<br />
<br />
<b>But Wait There's More!</b><br />
<br />
The post on the <a href="http://android-developers.blogspot.com/2011/06/deep-dive-into-location.html">Android Developer Blog</a> focusses on freshness - I'll be posting another deep-dive into the code that examines how I've made the app psychic and smooth on this blog early next week. Stay tuned.</div>Reto Meierhttp://www.blogger.com/profile/04583545000534514486noreply@blogger.com14Mountain View, CA, USA37.420248419962654 -122.0838097341461437.36357541996265 -122.12040473414615 37.476921419962657 -122.04721473414614tag:blogger.com,1999:blog-10735231.post-46685412320146268202011-05-25T12:37:00.000+01:002011-05-25T12:37:24.287+01:00Answers to Unanswered Questions from the I/O Protips Q&A<div dir="ltr" style="text-align: left;" trbidi="on">There's never enough time for Q&A at the end of an I/O session - particularly when the session is immediately followed by lunch. In an effort to remedy this, here are the answers to most of the questions that were entered onto the Moderator page for my <a href="http://goo.gl/rbEch">Android Protips talk</a>.<br />
<ol><i>Eclipse is a wonderful development tool. However sometimes it is clunky. Generic error messages, mysteriously build problems solved by quitting & relaunching, etc. Do you ever get frustrated with Eclipse? Do you have any tips of working with Eclipse?</i></ol>I do! Almost as much as I was frustrated by Visual Studio in a previous life spent writing C# Winform GUIs. I don't have any specific tips beyond the things that work with mode IDEs. Frequently restart and make sure you're using the latest stable build along with the latest version of the ADT.<br />
<ol><i>Do you have any tips for working with SQLite databases through eclipse? At the minute I rely on external tools to view data that is in the database on the phone to debug problem. This means manually copying it off the device. Any tips?</i></ol>You can use the <a href="http://developer.android.com/guide/developing/tools/adb.html#sqlite">sqlite3</a> command line tool to examine SQLite databases on the phone. It's not built into Eclipse but might save you the extra work of pulling the database off the device first.<br />
<ol><i>Do the developers at Google use any hardware emulators to speed up development. If so, can you please recommend some. The soft emulator is too slow.</i></ol>Unfortunately not. Generally we'll be working towards the release of the new platform on a given piece of hardware, so the internal teams will use that rather than an emulator where appropriate / applicable.<br />
<ol><i>Will there be a faster Android device emulator anytime soon?</i></ol>Yes! Check out this session on <a href="http://www.google.com/events/io/2011/sessions/android-development-tools.html">Android Development Tools</a> for a preview.<br />
<ol><i>Is there a suite of AVDs for Eclipse that emulate actual devices?</i></ol>Some manufacturers make AVDs available for actual devices (I believe Samsung provide an <a href="http://www.google.com/url?sa=D&q=http://innovator.samsungmobile.com/galaxyTab.do">AVD</a> for the 7" Galaxy Tab). Generally speaking, no - there's no central repository or suite of all actual device AVDs.<br />
<ol><i>Will there soon be a legitimate way to replace the Android lockscreen (with a lockscreen application)?</i></ol>Due to the security implications, I'm not aware of any plans to make the lock screen (or in-call screen) replaceable. <br />
<ol><i>You mentioned better not to loose your signing key. But how to update your app, when your certificate expired?</i></ol>For now, certificates used to sign apps launched in the Android Market need to expire after 22 October 2033. We'll have a solution for replacing these certificates in place well before 2033 :)<br />
<ol><i>What's the recommended way to implement a horizontally scrolling, virtualized list?</i></ol>No simple answer here as it depends on the kind of data you're displaying, how long your list is, and what the best user experience would be. There are some good articles online (including <a href="http://stackoverflow.com/questions/1080811/android-endless-list">this answer on Stack Overflow</a>) that explain how to create a virtual list in a ListView, but you can use a similar technique within a Gallery or even a HorizontalScrollView to achieve a horizontal virtualized scrolling list.<br />
<ol><i>Are Shared Preferences the bast way to store small piece of data?</i></ol>It depends on what kind of small data you're storing. Shared Preferences are the best way to store user preferences and Activity / Application state information. <br />
<ol><i>A view from one app needs to be updated by another app. Can't use the widget paradigm, is there any other way?</i></ol>This depends on a number of factors. Are both apps written by you, or is one a third party? How dramatic are the changes? New layouts or changed text in a TextView?<br />
<br />
Generally speaking, the best approach is likely to be a <a href="http://developer.android.com/reference/android/content/Context.html#sendBroadcast(android.content.Intent)">Broadcast Intent</a>. You can package the data that will be used to update the View in the "other" app by including them as extras. The "other" app simply registers a <a href="http://developer.android.com/reference/android/content/BroadcastReceiver.html">Broadcast Receiver</a> that listens for the Intent, extracts the data, and updates its view accordingly.<br />
<ol><i>How would you test/optimize the apps that are not meant for the Android Market?</i></ol>The principle of using Analytics for tracking bugs and doing A/B testing works just as well internally as it would on apps that will launch in Market. The biggest difference is distribution. Given the ability to side-load apps onto most Android devices, I'd most likely setup an internal website that would host the APKs you want to distribute for the Beta test.<br />
<ol><i>How can we know if a certain service is already running?</i></ol>You can bind to a Service using <a href="http://developer.android.com/reference/android/content/Context.html#bindService(android.content.Intent, android.content.ServiceConnection, int)">bindService</a> without starting the Service. The <a href="http://developer.android.com/reference/android/content/ServiceConnection.html">Service Connection</a> you pass in to bindService will notify you using its onServiceConnected and onServiceDisconnected handlers when the Service starts and stops. You can use those callbacks to set a variable within your code to check if the Service is running at any given time.<br />
<ol><i>Is there any option to backup the default SharedPreferences via BackupManager? Do I have to use the packagename?</i></ol>The default SharedPreferences file getSharedPreferences uses the Activity's class name as the preferences name.<br />
<ol><i>Is there a way for accessories to "push" an embedded app or service package to the device so that specialized services for certain types of accessories will be able to automatically add functionality to the device when connected?</i></ol>As part of the process of <a href="http://developer.android.com/guide/topics/usb/adk.html#start">starting the device in accessory mode</a>, you send identifying string information to the device. This information allows the device to figure out an appropriate application for this accessory and also present the user with a URL if an appropriate application does not exist. It won't install the package for you, but it will prompt the user to download it.<br />
<ol><i>Just to make sure, now we can send requests to the devices in order to update the info, instead of having the refresh intervals?</i></ol>That's right, you can use <a href="http://code.google.com/android/c2dm/index.html">Cloud to Device Messaging</a> to ping a device when it needs to perform an update.<br />
<ol><i>When will we have a UI Builder that is par to what we get for iPhone?!</i></ol>Check out this session on <a href="http://www.google.com/events/io/2011/sessions/android-development-tools.html">Android Development Tools</a> for a preview of some of the cool stuff the tools team have been working on.<br />
<ol><i>Can you describe your video and control hookup for your android tablet?</i></ol>I wrote a blog post that <a href="http://blog.radioactiveyak.com/2011/05/android-protips-at-io-session-video-and.html">describes the video and control hookup</a> I used to do my presentation using a pair of Motorola Xooms.<br />
</div>Reto Meierhttp://www.blogger.com/profile/04583545000534514486noreply@blogger.com6tag:blogger.com,1999:blog-10735231.post-18850127004869905672011-05-23T16:21:00.001+01:002011-05-23T16:42:20.813+01:00My Attitude Towards Piracy of My Book<div dir="ltr" style="text-align: left;" trbidi="on">The short answer: <i>I am against it</i>.<br />
<br />
Lest I be accused of bias, that goes for every book - not just the ones that result in a couple of bucks landing in my pocket.<br />
<br />
<b>The long answer</b><br />
<br />
I was surprised recently when asked via email what my attitude was towards piracy of my book, and if an online donation might work as a "last resort" way for pirates to show their appreciation for my work.<br />
<br />
For the record, I am a big supporter of making my book available in as many formats as possible. That's why I'm impressed that Wrox books are now available on <a href="http://www.amazon.com/Professional-Android-Application-Development-ebook/dp/B004BA574Y/ref=tmm_kin_title_0?ie=UTF8&m=AG56TWVU5XWC2&qid=1306155732&sr=8-1">Kindle</a>, <a href="https://market.android.com/details?id=book-ewMdnKNYfOsC">Google Books</a>, <a href="http://my.safaribooksonline.com/9780470565520?cid=shareLink">Safari</a>, and <a href="http://www.wrox.com/WileyCDA/WroxTitle/Professional-Android-2-Application-Development.productCd-0470637455.html">PDF eBooks</a>. I get a royalty no-matter where you buy it from, so if you want a copy pick wherever offers the cheapest price for the format you prefer.<br />
<br />
I'm also <i>against</i> DRM - I believe that DRM does nothing to prevent piracy while annoying the folks who legitimately paid for the content - so I was also thrilled with Wrox's decision to <a href="http://p2p.wrox.com/content/blogs/jminatel/wrox-pdf-ebooks-drm-free">make their eBooks DRM free</a>. <br />
<br />
<b>Your book is expensive: Do you have a donate link anywhere to show my appreciation but save a few bucks?</b><br />
<br />
I can't speak for anyone else, but I don't write my books for the money. The advance and royalties go some way to compensating for the significant time and effort it takes to get the books written - but for me at least, it's not going to make me rich or let me give up my day job.<br />
<br />
More importantly I don't write in a vacuum. Books cost money to make. I'm not talking about the paper, printing, and transport costs, I'm talking about all the people who were involved in making my book the best it could be.<br />
<br />
There are 17 people on the <a href="http://books.google.com/books?id=ewMdnKNYfOsC&lpg=PP1&dq=reto%20meier&pg=PR9#v=onepage&q&f=false">"Credits" page</a> for Professional Android 2 Application Development. They are not vanity credits. As an example, the following folks are the ones on that list who I had direct, repeated email contact with over the course of writing the book. Apologies to those I left out - they are equally important to the process. <br />
<ul style="text-align: left;"><li>Scott Meyers (Acquisitions Editor) suggested I write a second edition and shepherded it through the process.</li>
<li>William Bridges (Project Editor) made sure I handed in chapters on something resembling a schedule (without him I'd still be working on the 1st edition), as well as dispensing invaluable advice on everything from book and chapter structure to clarity and semi-colon use.</li>
<li>Milan Shah (Technical Editor) reduced the number of bugs in my code.</li>
<li>Sadie Kleinman (Copy Editor) corrected my comma use, spelling errors, grammatical issues, and generally ensured I didn't embarrass myself.</li>
<li>Mary Beth Wakefield (Editorial Manager) kept it all together when things got chaotic.</li>
<li>Kyle Schlesinger (Proofreader) ensured nothing slipped past us during the many edits and revisions before it went to print.</li>
<li>Michael Trent (Cover Designer) gave us the awesome Terminator cover (image by Linda Bucklin).</li>
<li>Robert Swanson (Indexer) provided a way to find things without a photographic memory.</li>
<li>David Mayhew (Marketing) made sure it was available from wherever people wanted to buy it.</li>
</ul>These folks are an absolutely essential part of the writing process, and they don't work for free. Nor should they. There is a really simple way to show your appreciation for all the people involved in writing a book. Buy it.<br />
<br />
<b>Sure, but I need to know what the book teaches for my job / class, but I don't have the money to buy it.</b><br />
<br />
Good news! You don't have to! At the risk of hurting my own sales, you don't need to buy my book to learn how to develop Android apps. I mentioned this during my Android Protips talk: Google aren't trying to keep this information a secret. There's a huge amount of information available online including:<br />
<ul style="text-align: left;"><li>The <a href="http://developer.android.com">Android Developer Site</a> and <a href="http://android-developers.blogspot.com/">Developer Blog</a></li>
<li><a href="http://www.google.com/events/io/2011/sessions.html#android-track">Talks and slides</a> from Google I/O</li>
<li><a href="http://stackoverflow.com/questions/tagged/android">Android Questions</a> at StackOverflow</li>
<li>The <a href="http://developer.android.com/resources/community-groups.html">Android Developer Forums</a></li>
</ul>Many people find the structured, consistent, and guided form of a book to be a great way to learn new material. Others find books a more useful reference while working. If you're one of those people, and you want to be able to continue using books in such a way, buying them is the only way to help ensure that will happen.<br />
<br />
<b>What are your thoughts on 2nd hand books and libraries?</b><br />
<br />
Bring them on! I've probably bought 1,000 books in my life - of which more than half are 2nd hand, and I've probably borrowed a few hundred from libraries too.<br />
<br />
Electronic books introduce new challenges to the 2nd hand book market and libraries. I'm firmly on the side that says that the rights we have with paper books should be mirrored in the electronic publishing age. If you're done with a book you should be able to sell it, loan it, or give it away without restriction.<br />
<br />
<b>If everyone downloads pirated PDFs of books instead of buying them, publishers will stop publishing them.</b><br />
<br />
Without a publisher many books won't get written or released. I don't have the time, money, skills, or inclination necessary to produce a book of sufficient quality on my own. I need the 17 people on the credits page (and several more besides) to publish each new book or revision.<br />
<br />
Writing isn't my livelihood, so as an author the end of publishing would be a serious disappointment, but I'd just stop writing and get on with my day job. <br />
<br />
As a reader? I can barely imagine a future so grim.</div>Reto Meierhttp://www.blogger.com/profile/04583545000534514486noreply@blogger.com8tag:blogger.com,1999:blog-10735231.post-16390501585051080972011-05-16T13:53:00.000+01:002011-05-16T13:53:05.037+01:00Android Protips: Where to Download the Slides and Code Snippets<div dir="ltr" style="text-align: left;" trbidi="on">For those of you who want to take a closer look at my Android Protips session for Google I/O, you can now enjoy the video, slides, and code snippets in whichever format you prefer:<br />
<ul style="text-align: left;"><li>The slides are now <a href="https://docs.google.com/viewer?a=v&pid=explorer&chrome=true&srcid=0BwzqfgMC33l-ZWUzNTE5OTktYTY2Yy00Nzc1LTkzZjktZjg1MWU5MGZmYmVi&hl=en_GB">available for viewing and downloading</a> (as a PDF from Google Docs).</li>
<li>The slides are also available on <a href="http://www.slideshare.net/retomeier/android-protips-advanced-topics-for-expert-android-app-developers-7979013#">SlideShare</a> for viewing and embedding.</li>
<li>The code snippets are posted at <a href="https://docs.google.com/document/d/1xaz7J9wjVMIDsa8bSQNBmhpTWGBkvDax83sSLfNof5w/edit?hl=en_GB">Android Protips: The Code Snippets</a> for your copy/paste pleasure.</li>
<li>The <a href="http://www.youtube.com/watch?v=twmuBbC_oB8">session video</a> is on YouTube (the only way you get to watch the awesome cartoons!)</li>
<li>After a brief outage, details on <a href="http://blog.radioactiveyak.com/2011/05/android-protips-at-io-session-video-and.html">the software I wrote to do the presentation</a> are back up.</li>
</ul>One of the nice things about SlideShare is that it lets you embed slideshows into your blog post:<br />
<br />
<div id="__ss_7979013" style="width: 595px;"><object height="380" id="__sse7979013" width="600"> <param name="movie" value="http://static.slidesharecdn.com/swf/ssplayer2.swf?doc=androidprotipsadvancedtopicsforexpertandroidappdevelopers-110516052836-phpapp02&stripped_title=android-protips-advanced-topics-for-expert-android-app-developers-7979013&userName=retomeier" /><param name="allowFullScreen" value="true"/><param name="allowScriptAccess" value="always"/><embed name="__sse7979013" src="http://static.slidesharecdn.com/swf/ssplayer2.swf?doc=androidprotipsadvancedtopicsforexpertandroidappdevelopers-110516052836-phpapp02&stripped_title=android-protips-advanced-topics-for-expert-android-app-developers-7979013&userName=retomeier" type="application/x-shockwave-flash" allowscriptaccess="always" allowfullscreen="true" width="600" height="380"></embed> </object></div></div><br />
I plan to do a series of more blog posts that dig into some of the topics I cover in the presentation in more detail. Where do you guys think I should start?Reto Meierhttp://www.blogger.com/profile/04583545000534514486noreply@blogger.com10tag:blogger.com,1999:blog-10735231.post-56245547064603000032011-05-16T07:00:00.001+01:002012-06-27T03:27:09.619+01:00Android Protips at I/O: The Session Video (and How I Presented It)<div dir="ltr" style="text-align: left;" trbidi="on">
<b>[Update 16/May: Reposted after Blogger outage]<br />
[Update 2: Working links to the sessions slides are <a href="http://blog.radioactiveyak.com/2011/05/android-protips-where-to-download.html">available from here</a>]</b><br />
<div dir="ltr" style="text-align: left;" trbidi="on">
Another Google I/O, another jam-packed Android session room. This year they nearly doubled the room capacity for the main Android track making space for 1,000 seats. That still wasn't enough though - once again people were sitting on the floor and lining up to get in.<br />
<br />
<b>Android Protips: Advanced Topics for Expert Android Developers</b><br />
<br />
After delivering my Android Best Practices for Beginners for the better part of last year, I was really excited to take things up a notch and deliver some real advanced content. To push things one step further, I presented my session using a pair of Xoom tablets. More on that after the video.<br />
<br />
<object height="371" width="600"><param name="movie" value="http://www.youtube.com/v/twmuBbC_oB8?fs=1&hl=en_US&hd=1">
</param>
<param name="allowFullScreen" value="true">
</param>
<param name="allowscriptaccess" value="always">
</param>
<embed src="http://www.youtube.com/v/twmuBbC_oB8?fs=1&hl=en_US&hd=1" type="application/x-shockwave-flash" width="600" height="371" allowscriptaccess="always" allowfullscreen="true"></embed></object><br />
<br />
The awesome video content was created for me by an old friend of mine (he's still young, but we've been friends since high school) pandamusk - thanks panda!<br />
<br />
<b>How did you do that?</b><br />
<br />
There were a lot of questions on Twitter asking:<br />
<ol style="text-align: left;">
<li>What app did I use to do the presentation using an Android tablet</li>
<li>How did I live tweet my own presentation in real time?</li>
<li>How did I not re-tweet everything when the tablet rebooted?</li>
</ol>
I'm an engineer so (of course) I took this as an <strike>excuse</strike> opportunity to write an app that does the former and built in functionality to do the latter (and come on — you think I didn't consider the case of having to restart? Please.)<br />
<br />
<b>How does it work?</b><br />
<br />
One app, running on two tablets, both running Android 3.1 (with USB hostmode support) connected via Bluetooth.<br />
<br />
Tablet one was wired up with HDMI out and a USB-connected clicker let me transition between slides. I added a "finger paint" View with a transparent background on top of the ImageView that displayed each slide which let me do the real-time annotations.<br />
<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEji-sGShHJ5cLP7xyTdW8197Fv3pyzlZo2lHixJYwl5jjZU689sl8gDw72suXKevGv-t8BiPCNTG1WGaaT8mmgegOs6N3UYQV_atJ4hwbhJsO-WjqYKVpggV19cE1eSdhzFLIl3_Q/s1600/LiveView_With_Border.png" imageanchor="1" style="margin-left: 0em; margin-right: 0em;"><img border="0" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEji-sGShHJ5cLP7xyTdW8197Fv3pyzlZo2lHixJYwl5jjZU689sl8gDw72suXKevGv-t8BiPCNTG1WGaaT8mmgegOs6N3UYQV_atJ4hwbhJsO-WjqYKVpggV19cE1eSdhzFLIl3_Q/s1600/LiveView_With_Border.png" /></a></div>
<br />
A second device (out of sight on the lectern) showed me my "Speaker View": My speaker notes, the current / next slide preview, my pre-written live tweets, and a countdown timer. <br />
<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgkD754yaxmThAx5KXUHW7S_nj2ebHQ8w3KjfgHV70RY4vXnu6hH6Mdr_hP-t2w_87fo_OjCepMfpNK6I-w5NY2BfmmnP39bn7SU2LkQeL_J632coUMz_ngVD47kgEYob6TQFzxUA/s1600/SpeakerView_With_Border.png" imageanchor="1" style="margin-left: 0em; margin-right: 0em;"><img border="0" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgkD754yaxmThAx5KXUHW7S_nj2ebHQ8w3KjfgHV70RY4vXnu6hH6Mdr_hP-t2w_87fo_OjCepMfpNK6I-w5NY2BfmmnP39bn7SU2LkQeL_J632coUMz_ngVD47kgEYob6TQFzxUA/s1600/SpeakerView_With_Border.png" /></a></div>
<br />
The two devices were paired and connected over Bluetooth, with the speaker view tablet set up as a slave to the presentation device. Whenever the display tablet transitioned slides, it transmitted the current slide to the speaker view tablet. It works the other way around too, so I can transition slides on the speaker view and have the live view update accordingly.<br />
<br />
The tweeting happened on the speaker view tablet based on slide transitions (with a button for me to disable it if — for example — I had to restart half way through). I connected this one to a wired ethernet connection using a USB to ethernet dongle to avoid the notorious conference wifi syndrome.<br />
<br />
I've got a bunch of ideas I'd like to incorporate (particularly around remote viewing), but ran out of time before I/O to get them implemented. <br />
<br />
<b>Can I Get the App? Can I See the Source?</b><br />
<br />
Yes and yes. I need to make a few improvements before I release it on the Android Market and I need to refactor and tidy the code before I open source it. In the mean time I'll do a couple more posts the go into more detail on how each of the components work. Stay tuned.</div>
</div>Reto Meierhttp://www.blogger.com/profile/04583545000534514486noreply@blogger.com20tag:blogger.com,1999:blog-10735231.post-84248895245452419452011-05-10T04:34:00.000+01:002011-05-10T04:34:10.319+01:00How to Get Your Android ProtipsI/O is always a great couple of days, and after last year's jam-packed Android room they've doubled our capacity and given us space for 1,000 folks in the audience. As if that wasn't enough, we're also live streaming the Android (and Chrome) sessions for your viewing pleasure.<br />
<br />
<b>What Am I Presenting and How Can You Watch?</b><br />
<br />
I'm presenting <i>Android Protips: Advanced Topics for Expert Android Developers</i> at 11:30am PDT in room 11 up on the top floor (next to the keynote room) for those of you lucky enough to be at I/O in person.<br />
<br />
If you're not here, you can still watch my session live as it's going to be <a href="http://www.google.com/events/io/2011/index.html">live streamed across the intertubes</a> (Stay tuned: that page will update when I/O starts in a few short hours). <br />
<br />
If you are planning to tune in, that's 7:30pm BST and an ungodly 4:30am on the East coast of Australia.<br />
<br />
If you've got questions, and won't be in the audience, you can pose them (and vote for others) on <a href="http://goo.gl/mod/oLus">the session's moderator page</a>.<br />
<br />
I'm also going to try <a href="http://www.twitter.com/retomeier">live-tweeting</a> my own presentation using an Android app I've been working on for presentations (more on that later).<br />
<br />
Once I'm done, the recorded video and slides will be available on the <a href="http://goo.gl/rbEch">Android Protips session page</a>. I'll also post a link to the code snippets for your copy/paste pleasure.<br />
<br />
<b>If You Just Can't Get Enough (or You Want to Know How to Avoid Bumping in to Me)</b><br />
<br />
I'm also co-hosting "Web Apps versus Native" on Wednesday afternoon with Michael Mahemoff. Should be a good way to wind down after a long couple of days. When I'm not on stage I'll be hanging out at the Android office hours, so be sure to stop by and say hi!Reto Meierhttp://www.blogger.com/profile/04583545000534514486noreply@blogger.com3tag:blogger.com,1999:blog-10735231.post-44507971879765358772011-04-27T17:19:00.001+01:002011-04-27T17:21:01.601+01:00Using Twitter4J to Tweet in AndroidSo I'm working on a little project for Google I/O that requires, amongst other things, the ability to post status updates to Twitter from within an Android app. I asked about it on Twitter and a couple of people asked me to post the results (and associated code snippets) so here you go.<br />
<br />
I was hoping for a small code snippet that would let me do that without needing any third-party libraries, but the feedback from the lazy web suggested that jumping through the hoops of an OAuth implementation myself wasn't worth the effort.<br />
<br />
The wisdom of crowds suggested Twitter4J as a simple alternative - and as the following code snippet shows - the most simple case is pleasantly simple to implement.<br />
<br />
<code>Twitter twitter = new TwitterFactory().getInstance();<br />
AccessToken a = new AccessToken(oauth_token, oauth_token_secret);<br />
twitter.setOAuthConsumer(consumer_token, consumer_secret);<br />
twitter.setOAuthAccessToken(a); <br />
twitter.updateStatus("If you're reading this on Twitter, it worked!");</code><br />
<br />
In this instance I'm the only one who'll be using the app, so I'm dropping an <i>auth token</i> and <i>auth token secret</i> unique to my own Twitter login rather than going through the process required to obtain a user-specific auth token. If that matches your use-case you can grab those values by clicking "My Access Token" on the Twitter developer site after you've registered your app.<br />
<br />
You can download <a href="http://twitter4j.org/en/index.html">Twitter4J for Android here</a>. Then just add twitter4j-core-android-2.2.1.jar into your project as an external JAR.Reto Meierhttp://www.blogger.com/profile/04583545000534514486noreply@blogger.com16tag:blogger.com,1999:blog-10735231.post-80854580695349157102011-04-12T15:54:00.000+01:002011-04-12T15:54:37.413+01:00I'm Saying Goodbye to London<div dir="ltr" style="text-align: left;" trbidi="on"><b>Where to next?</b><br />
<br />
Mountain View in sunny California!<br />
<br />
Following this year's <a href="http://www.google.com/events/io/2011/index.html">Google I/O</a>, I'll be relocating to the home of the <a href="http://www.youtube.com/watch?v=Wa6oZtxQGBM&feature=player_embedded">giant dessert sculpture garden</a>, where I've been given the opportunity to take on the role of Tech Lead for the global <a href="http://code.google.com/team/index.html?product=android">Android Developer Relations team</a>.<br />
<br />
It's a chance for me to focus on some more strategic ideas and to work more closely with the core Android engineering team. It's a challenge I'm really looking forward to.<br />
<br />
I've spent the last 6 years in London - the last 2 working here at Google - and it's been an amazing experience. I'll be leaving the Android developers of EMEA in the very capable hands of <a href="http://www.twitter.com/crafty">Nick Butcher</a>, <a href="http://www.twitter.com/geekyouup">Richard Hyndman</a>, and <a href="https://twitter.com/#!/sparkyrhode">Robert Rhode</a> - and I'll still visit, I'm particularly looking forward to this year's round of Google Developer Days.<br />
<br />
I'm still working at Google, and I'm still part of the Android team, so being based in Mountain View I'll have the opportunity to meet and work with some of our North American Android devs - so be sure to say hi if you're coming to Google I/O this year.<br />
<br />
The move is still some months away, but in the mean time here are some of the things I will (and won't) miss about London, and what I'm looking forward to in California.<br />
<br />
<b>Things I'll Miss About London</b><br />
<ul style="text-align: left;"><li>World class theatre, restaurants, and concerts all at my door step.</li>
<li>Living in close proximity to the rest of Europe.</li>
<li><a href="http://en.wikipedia.org/wiki/Back_bacon">Proper bacon</a> and real cheddar cheese.</li>
<li>Seasons (particularly Spring and Autumn).</li>
<li>The awesome Android developers I've worked with over the last 2 years.</li>
<li><a href="http://www.google.com/search?q=Full+English+breakfasts&hl=en&prmd=ivnse&tbm=isch&tbo=u&source=univ&sa=X&ei=TiukTffCBsuFhQf1sJ3gCQ&ved=0CCwQsAQ&biw=1280&bih=659">Full English breakfasts</a>.</li>
</ul><b>Things I Won't Miss About London</b><br />
<ul style="text-align: left;"><li>Commuting for an hour every morning, and again every evening.</li>
<li>The Victoria line and South West Trains.</li>
<li>Hearing my neighbor snoring.</li>
<li>Driving in London.</li>
<li>Black pudding.</li>
</ul><b>Things I'm Looking Forward to in California</b><br />
<ul style="text-align: left;"><li>Fruit that tastes like fruit.</li>
<li>Living on the West coast (the best coast).</li>
<li>Living in close proximity to an ocean.</li>
<li>Living in close proximity to the rest of the US.</li>
<li>Wide roads and cheap(er) <strike>petrol</strike> gas. </li>
<li><a href="http://www.google.com/search?hl=en&biw=1280&bih=659&site=search&tbm=isch&sa=1&q=American+breakfast&aq=f&aqi=&aql=&oq=">American breakfasts</a>.</li>
</ul></div>Reto Meierhttp://www.blogger.com/profile/04583545000534514486noreply@blogger.com15tag:blogger.com,1999:blog-10735231.post-5290807885718208392011-03-30T16:18:00.000+01:002011-03-30T16:18:03.517+01:00My Failed Startup (or How I Nearly Become a 3D Animator)<div dir="ltr" style="text-align: left;" trbidi="on"><blockquote>Building awesome software and having the right business contacts is not sufficient to convince the latter to hand over money for the former.</blockquote>There was a time in 2004/05 when, for several minutes, I thought my future lay not in compilers and debuggers, but in modelers and animation. As <a href="https://picasaweb.google.com/reto.meier/3DComputerGeneratedImages?authkey=Gv1sRgCKeSlaH4wLW9wAE&feat=directlink">you can see</a>, it turns out I don't have the skill, patience, or eye for detail required to transition from "enthusiast" to "someone who gets paid".<br />
<br />
<div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEih5ZCZvEs_VCvi4yxedB-gVwLzdjx7ukrO0xCn-UU-hBnHGxPAspmAPdTxy9uF1KdQ4wwwIKTxCqbhFhrTnZNLNlJAsH0JOLcdbqMYlYcpvdnEK1A74C4p3Y__FXM5HbFVJid07g/s1600/UTA.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="150" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEih5ZCZvEs_VCvi4yxedB-gVwLzdjx7ukrO0xCn-UU-hBnHGxPAspmAPdTxy9uF1KdQ4wwwIKTxCqbhFhrTnZNLNlJAsH0JOLcdbqMYlYcpvdnEK1A74C4p3Y__FXM5HbFVJid07g/s200/UTA.jpg" width="200" /></a><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEj6L8jE_zkGmQQTOywFjicbl4dM9kEnVpsgSB9kE15dGYXXPlveMuKiJZbWwyGC8vRctL4LZbpdUd8U_F0UE1UWEAR5sW5rv4OERIkMgHh7XdhVbbilI_RGOBaIOtz7ORgUnZVG-w/s1600/Pyramid.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="150" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEj6L8jE_zkGmQQTOywFjicbl4dM9kEnVpsgSB9kE15dGYXXPlveMuKiJZbWwyGC8vRctL4LZbpdUd8U_F0UE1UWEAR5sW5rv4OERIkMgHh7XdhVbbilI_RGOBaIOtz7ORgUnZVG-w/s200/Pyramid.jpg" width="200" /></a><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjFVtDd-O0bEi8-FG1CmzBxvcQGYZDrx984j35AFwbTcqDYChdvGvdNFGObFB2-uXfiK-AOmErIA54hVRayzjqPuXCwFBvv-AoKG0im_F5WIn2k0wiiyJzOzsEYHgshK5DhJ1_r2w/s1600/Intervention.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="150" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjFVtDd-O0bEi8-FG1CmzBxvcQGYZDrx984j35AFwbTcqDYChdvGvdNFGObFB2-uXfiK-AOmErIA54hVRayzjqPuXCwFBvv-AoKG0im_F5WIn2k0wiiyJzOzsEYHgshK5DhJ1_r2w/s200/Intervention.jpg" width="200" /></a><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEh-csMfvGFgoGVXERw83vA_dV3rxmAi_mdQ_t5PFunpfQS6CULTF0PQZbYA0Ucz_lUu55hw5sr_4tUcaJDLtb6FCuO5COkEVxMtXvv0cbhiGNnn6Q_K-XkC6RgAm67qiRhP24KswQ/s1600/7FunctionShootOut.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="150" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEh-csMfvGFgoGVXERw83vA_dV3rxmAi_mdQ_t5PFunpfQS6CULTF0PQZbYA0Ucz_lUu55hw5sr_4tUcaJDLtb6FCuO5COkEVxMtXvv0cbhiGNnn6Q_K-XkC6RgAm67qiRhP24KswQ/s200/7FunctionShootOut.jpg" width="200" /></a></div><br />
The journey that led me to consider adding "animator" to my resume is more interesting than my non-existent animation career. After 6 years writing oil & gas inspection software, I teamed up with a good friend and very smart guy - Big Stu - in a quixotic attempt to extract some serious coin from the bottomless money-pit that is the Western Australian oil & gas industry.<br />
<br />
Step 1: Combine his electrical / mechanical engineering knowledge and business contacts with my ninja coding and amateur 3D animation skills to forge a killer app.<br />
Step 2: ???<br />
Step 3: Profit!<br />
<br />
Here's our Pièce de résistance:<br />
<br />
<div class="separator" style="clear: both; text-align: center;"><object width="600" height="480"><param name="movie" value="http://www.youtube.com/v/oX0KqjuCvo8?fs=1&hl=en_US"></param><param name="allowFullScreen" value="true"></param><param name="allowscriptaccess" value="always"></param><embed src="http://www.youtube.com/v/oX0KqjuCvo8?fs=1&hl=en_US" type="application/x-shockwave-flash" allowscriptaccess="always" allowfullscreen="true" width="600" height="480"></embed></object></div><br />
Our output wasn't Avatar, but the cinematic eye-candy was a side-effect of the tools we used rather than the goal. <br />
<br />
We built a system to visualize and simulate <i>anything</i> in a sub-sea installation. Each scene was fully interactive, and the models were based on engineering diagrams and were perfectly accurate. The field layouts were created from sub-sea survey data to perfectly depict every twist and turn of the flow-lines and anchor chains. I've still never heard of a system that provides that level of detail and accuracy for sub sea environments. <br />
<br />
<div class="separator" style="clear: both; text-align: center;"><object width="480" height="390"><param name="movie" value="http://www.youtube.com/v/CM1ECY0ezzc?fs=1&hl=en_US"></param><param name="allowFullScreen" value="true"></param><param name="allowscriptaccess" value="always"></param><embed src="http://www.youtube.com/v/CM1ECY0ezzc?fs=1&hl=en_US" type="application/x-shockwave-flash" allowscriptaccess="always" allowfullscreen="true" width="480" height="390"></embed></object></div><br />
Despite the power of the tool and the shiny eye-candy it produced, our venture never gained critical mass and eventually fizzled as Stu and I went our separate ways - Stu as the admiral of a <a href="http://www.intervention.com.au/">veritable navy of ROVs</a>, and me to London. <br />
<br />
What follows is a look back at why a great idea generated zero profit.<br />
<br />
<b>Some companies are born of technology, some achieve technological greatness and some have technology thrust upon them</b><br />
<br />
Technology is at the very heart of Google. Any chance to advance the technology of which it was born is seized upon as an opportunity for greater success. It's the philosophy behind our endeavor to "<a href="http://www.google.com/chrome/intl/en/why.html">drive the web forward</a>".<br />
<br />
Like Google, the oil & gas industry has an absolute dependence on technology. It simply could not exist without an army of technologists creating oil-field prediction engines and well flow models.<br />
<br />
<b>Like super-heroes, you can learn a lot about industries from their origin stories</b><br />
<br />
The Social Network and There Will Be Blood both include generous helpings of greed and betrayal, but while getting gypped out of half a billion dollars is a pretty bad day, it's still a significantly better outcome than <i>having your head caved in</i>.<br />
<br />
Don't get me wrong, in the 6 years I worked in oil & gas I never <i>once</i> saw anyone beaten to death, so things have progressed significantly in the past hundred years or so. But in it's soul oil & gas isn't about technology; it's a business of hard bastards drilling <a href="http://en.wikipedia.org/wiki/Deepwater_Horizon">absurdly deep</a> holes into the earth's crust, praying to f**k it doesn't <a href="http://www.google.com/images?q=oil+platform+disaster&um=1&ie=UTF-8&source=og&sa=N&hl=en&tab=wi&biw=1280&bih=659">explode</a>, all in the hope of wringing a few more drops out of the bottom of a <a href="http://en.wikipedia.org/wiki/Peak_oil">rapidly emptying cup</a>.<br />
<br />
<b>I drink your milkshake. I drink it up.</b><br />
<blockquote>(Value of a resource * quantity of resource extracted) - cost of extraction = profit</blockquote>Finding more of a scarce resource makes it, by definition, less valuable. It's nearly impossible to increase the quality of a natural resource, so the best way to increase profits is to decrease the costs of pulling it out of the ground.<br />
<br />
As resources become scarcer, the difficulty (and cost) of locating and extracting said resources increases. At this point your dependence on technology increases, and that technology costs money. <br />
<br />
At Google, technology is the product. Our success has come from search and advertising, but technologies like Android, Chrome, and cloud computing offer an opportunity for more success. <br />
<br />
In oil & gas, oil & gas is the product - and technology is simply a tool necessary to extract it. This is fundamental, and it affects the way technologists are regarded within each industry.<br />
<br />
<b>What they want is fancier tools - not a new cost center.</b><br />
<br />
Stu and I quickly discovered that while there <i>is</i> a bottomless pit of cash, it is allocated almost exclusively to parts of the business that generate revenue. <br />
<br />
They will happily pay stupid money for is a shiny box that helps you find oil reserves, or one that lets you extract said nectar from Mother Earth. What they do <i>not</i> want is to pay the salary of a dozen engineers (software or otherwise) that build shiny boxes.<br />
<br />
The significant supporting industries - everything from field inspections and environmental surveys to intervention engineering and remedial work - is all just costs. Most have been outsourced and the associated budgets minimized, allocated, and fixed. Entire companies are created through such outsourcing and their goals are to lower costs as far below the allocated budget as possible.<br />
<br />
<b>Our technology was about lowering costs - so we should have been golden, right?</b><br />
<br />
The best technology in the world isn't valuable without a customer to sell it to.<br />
<br />
The oil companies loved our technology. The shiny graphics are like catnip to executives, and our pitch was compelling:<br />
<blockquote>Using this software, we can increase efficiency by shortening each job by up to 20%. We only charge 5% for using the software, giving you a net saving of 15%.</blockquote>Big smiles and firm handshakes all 'round.<br />
<blockquote>You need to go speak to Our Contractor. They should definitely be using this!</blockquote>Next week we bring our roadshow to the Contractor. These guys wear coveralls for a living and recognize the smell of bullshit as it pulls up in the parking lot. They know the animated movies for the smoke and mirrors they are, but they're also engineers - so we switch our focus to the accuracy of our models. So far so good, until we get to the pitch:<br />
<blockquote>Using this software, we can increase efficiency by shortening each job by up to 20%. We only charge 5% for using the software, giving you a net saving of 15%."</blockquote>The smiles are gone and people are starting to fidget. <br />
<br />
Offshore jobs tend to operate on a "daily rate". So our pitch translated into something like this:<br />
<blockquote>Using this software we can shorten your billable days by up to 20% and increase your operational costs by 5%, giving you a net profit reduction of 25%."</blockquote>Oil Companies outsource technology for a reason, and they're not going to force their contractors to use one particular piece of new, untried technology. The aforementioned contractors have every incentive they need not to use it.<br />
<br />
<b>The week-to-week possibility of Croesus wealth punctuated by imminent doom were good practice for later years.</b><br />
<br />
That said, it was a great idea that would likely have succeeded given more time and effort. If I hadn't been in such a hurry to move to London, we could have worked the right deals to get the Oil Companies to convince their contractors to use our tools. It would have continued to be challenging, but it had a good chance. I believe it's inevitable that others will succeed where Stu and I left-off, but in startups - like much in life - timing is everything.<br />
<br />
The lessons I learned about business, entrepreneurship, and opportunity have proven invaluable. The pressure and excitement of seemingly imminent success parallel to equally imminent crushing failure was a brutal introduction into the Real World after years spent hiding in the dark corner of my own coding universe. It's strange, but seeing something you pour your heart and soul into fail, can be better incentive to strive than unmitigated success.<br />
<br />
I never did persue a career in animation. After taking half a year off to travel Europe I settled in London with my passion for coding reignited. Some four years later, I found a job that offers the perfect mix of business development, technology evangelism, and hardcore coding that plays to my strengths. Oh, and did I mention <a href="http://sites.google.com/site/googdevreljobs/">we're hiring</a>?</div>Reto Meierhttp://www.blogger.com/profile/04583545000534514486noreply@blogger.com5