tag:blogger.com,1999:blog-30561069772943303642024-03-13T18:58:05.779-04:00Android Mobile Application DevelopmentA comprehensive guide for designing, developing, debugging, and distributing Android applications.Anonymoushttp://www.blogger.com/profile/14247538790892494881noreply@blogger.comBlogger95125tag:blogger.com,1999:blog-3056106977294330364.post-59668224804439914622013-12-06T15:04:00.000-05:002014-02-27T15:15:36.843-05:00Introduction to Android Application Development: Android Essentials (4th Edition) now available<a href="http://www.amazon.com/gp/product/0321940261/ref=as_li_tf_il?ie=UTF8&camp=1789&creative=9325&creativeASIN=0321940261&linkCode=as2&tag=mamlambo-20"><img style="float:right;" border="0" src="http://ws-na.amazon-adsystem.com/widgets/q?_encoding=UTF8&ASIN=0321940261&Format=_SL160_&ID=AsinImage&MarketPlace=US&ServiceVersion=20070822&WS=1&tag=mamlambo-20" ></a><img src="http://ir-na.amazon-adsystem.com/e/ir?t=mamlambo-20&l=as2&o=1&a=0321940261" width="1" height="1" border="0" alt="" style="border:none !important; margin:0px !important;" />What Every Android™ App Developer Should Know Today: Android Tools, App/UI Design, Testing, Publishing, And More
<p>Note: This revamped, newly titled edition is a complete update of Android™ Wireless Application Development, Volume I: Android Essentials, Third Edition. We also welcome a new co-author to the mix, Joseph Annuzzi Jr.
<p>This fully reworked edition of a proven title is the most useful real-world guide to building robust, commercial-grade Android™ apps. The content is revised and updated for the latest Android 4.3 SDK and the newest development best practices. Introduction to Android™ Application Development: Android Essentials covers all you need to quickly start developing professional apps for today’s Android devices. Three expert developers guide you through setting up your development environment, designing user interfaces, developing for diverse devices, and optimizing your entire app-development process—from design through publication. Updated throughout, this title includes extensive coverage of the most useful new Android tools and utilities. It adds an all-new chapter on planning an amazing Android app user experience, plus extensive new coverage of unit testing, dialogs, preferences, and app publishing. Throughout, key concepts are taught through clear, up-to-date example code.
<p>This edition offers:
<ul>
<li>Fully updated introductions to the latest Android 4.3 APIs, tools, utilities, and best practices
<li>Up-to-date strategies for leveraging new Android capabilities while preserving compatibility
<li>Navigation patterns and code samples for delivering more intuitive user experiences
<li>Example-based explanations of ActionBars, DialogFragments, and other key concepts
<li>Expert automated testing techniques to quickly improve code quality
<li>New Google Play Developer Console app publishing techniques that also offer more control
</ul>
<p>For Android developers at all levels of experience, this reference is now more valuable than ever. Students, instructors, and self-learners will especially appreciate new chapter-ending questions and exercises, carefully designed to test knowledge and deepen mastery.
<a href="http://www.informit.com/register">Register your book at the InformIT.com website</a> to gain access to the Bonus KitKat chapter online as well as download the source code for this book.
Anonymoushttp://www.blogger.com/profile/17827559880668952148noreply@blogger.com2tag:blogger.com,1999:blog-3056106977294330364.post-12566701121029636202013-10-26T15:08:00.000-04:002014-02-27T15:14:48.869-05:00Sams Teach Yourself Android Application Development in 24 Hours (3rd Edition) now available<a href="http://www.amazon.com/gp/product/0672334445/ref=as_li_tf_il?ie=UTF8&camp=1789&creative=9325&creativeASIN=0672334445&linkCode=as2&tag=mamlambo-20"><img border="0" style="float:right;" src="http://ws-na.amazon-adsystem.com/widgets/q?_encoding=UTF8&ASIN=0672334445&Format=_SL160_&ID=AsinImage&MarketPlace=US&ServiceVersion=20070822&WS=1&tag=mamlambo-20" ></a><img src="http://ir-na.amazon-adsystem.com/e/ir?t=mamlambo-20&l=as2&o=1&a=0672334445" width="1" height="1" border="0" alt="" style="border:none !important; margin:0px !important;" />In just 24 sessions of one hour or less, learn how to build powerful apps for the world’s most popular mobile platform: Android 4.3. Using this book’s straightforward, step-by-step approach, you’ll build complete Android 4.3 apps from the ground up as you master the skills you need to design, develop, test, and publish powerful solutions. Extensively updated for Android’s newest features and tools, every lesson builds on what you’ve already learned, giving you a rock-solid foundation for real-world success!
Note: This revamped new edition is a complete update of Sams Teach Yourself Android Application Development in 24 Hours (2nd Edition). We also welcome a new co-author to the mix, Carmen Delessio.
<p>Highlights of this new Third Edition include:
<ul>
<li>Extensive new coverage: fragments, action bar, SQLite, content providers, Facebook SDK, and more
<li>Practical guidance on developing for multiple Android versions
<li>How to use open source projects to simplify Android development
<li>New topic-focused structure with at least one complete project in nearly every chapter
</ul>
<p>Learn how to…
<ul>
<li>Quickly set up your development environment and create Android projects
<li>Use Android layouts and fragments to create apps that look great on phones, tablets, and even TVs
<li>Develop intuitive user interfaces using Android controls
<li>Access the cloud and retrieve data using the Flickr API
<li>Create a full-blown app that parses JSON, stores metadata, and displays Flickr images
<li>Use a SQLite database and content providers to create responsive, data-driven apps
<li>Write social apps using the Facebook Android SDK
<li>Use contact and calendar data
<li>Build location-based apps using LocationManager APIs or the new Google Play Location Services
<li>Internationalize your apps
<li>Work with media and cameras
<li>Use open-source libraries to add “finishing touches”
<li>Package and publish apps to Google Play and other app stores
</ul>
<a href="http://www.informit.com/register">Register your book at the InformIT.com website</a> to gain access to the Bonus KitKat chapter online as well as download the source code for this book.
Anonymoushttp://www.blogger.com/profile/17827559880668952148noreply@blogger.com0tag:blogger.com,1999:blog-3056106977294330364.post-1652381543365519332012-08-03T14:50:00.000-04:002014-02-27T14:55:47.362-05:00Android Wireless Application Development Volume II: Advanced Topics (3rd Edition) now available<a href="http://www.amazon.com/gp/product/0321813847/ref=as_li_tf_il?ie=UTF8&camp=1789&creative=9325&creativeASIN=0321813847&linkCode=as2&tag=mamlambo-20"><img border="0" style="float:right;" src="http://ws-na.amazon-adsystem.com/widgets/q?_encoding=UTF8&ASIN=0321813847&Format=_SL160_&ID=AsinImage&MarketPlace=US&ServiceVersion=20070822&WS=1&tag=mamlambo-20" ></a><img src="http://ir-na.amazon-adsystem.com/e/ir?t=mamlambo-20&l=as2&o=1&a=0321813847" width="1" height="1" border="0" alt="" style="border:none !important; margin:0px !important;" />Android Wireless Application Development has earned a reputation as the most useful real-world guide to building robust, commercial-grade Android apps. Now, authors Lauren Darcey and Shane Conder have systematically revised and updated this guide for the latest Android SDK and tools updates. To accommodate their extensive new coverage, they’ve split the book into two leaner, cleaner volumes. This Volume II focuses on advanced techniques for the entire app development cycle, including design, coding, testing, debugging, and distribution. It covers hot topics ranging from tablet development to protecting against piracy and demonstrate advanced techniques for everything from data integration and UI development to in-app billing.
Every chapter has been thoroughly updated to reflect the latest SDKs, tools, and devices. The sample code has been completely overhauled and is available for download on a companion website. Drawing on decades of in-the-trenches experience as professional mobile developers, the authors also provide even more tips and best practices for highly efficient development.
This new edition covers:
<ul>
<li>Advanced app design with async processing, services, SQLite databases, content providers, intents, and notifications
<li>Sophisticated UI development, including input gathering via gestures and voice recognition
<li>Developing accessible and internationalized mobile apps
<li>Maximizing integrated search, cloud-based services, and other exclusive Android features
<li>Leveraging Android 4.0 APIs for networking, web, location services, the camera, telephony, and hardware sensors
<li>Building richer apps with 2D/3D graphics (OpenGL ES and RenderScript), animation, and the Android NDK
<li>Tracking app usage patterns with Google Analytics
<li>Streamlining testing with the Android Debug Bridge
</ul>Anonymoushttp://www.blogger.com/profile/17827559880668952148noreply@blogger.com0tag:blogger.com,1999:blog-3056106977294330364.post-31498998206677113682012-03-27T12:49:00.000-04:002014-02-27T14:46:20.330-05:00Code Downloads for "Android Wireless Application Development Volume I: Android Essentials" Available Here<a href="http://www.amazon.com/gp/product/0321813839/ref=as_li_tf_il?ie=UTF8&camp=1789&creative=9325&creativeASIN=0321813839&linkCode=as2&tag=mamlambo-20"><img style="float:right;" border="0" src="http://ws-na.amazon-adsystem.com/widgets/q?_encoding=UTF8&ASIN=0321813839&Format=_SL160_&ID=AsinImage&MarketPlace=US&ServiceVersion=20070822&WS=1&tag=mamlambo-20" ></a><img src="http://ir-na.amazon-adsystem.com/e/ir?t=mamlambo-20&l=as2&o=1&a=0321813839" width="1" height="1" border="0" alt="" style="border:none !important; margin:0px !important;" />
We've added the source code downloads for the book, <a href="http://www.amazon.com/gp/product/0321813839/ref=as_li_tf_tl?ie=UTF8&camp=1789&creative=9325&creativeASIN=0321813839&linkCode=as2&tag=mamlambo-20">Android Wireless Application Development Volume I: Android Essentials (3rd Edition) (Developer's Library)</a><img src="http://ir-na.amazon-adsystem.com/e/ir?t=mamlambo-20&l=as2&o=1&a=0321813839" width="1" height="1" border="0" alt="" style="border:none !important; margin:0px !important;" />
to the <a href="http://androidbook.blogspot.com/p/book-code-downloads.html">downloads page</a>. <br />
<br />
Download it now to use with your copy of the book or ebook!Anonymoushttp://www.blogger.com/profile/17827559880668952148noreply@blogger.com1tag:blogger.com,1999:blog-3056106977294330364.post-48588105345627894482012-03-04T14:58:00.000-05:002014-02-27T15:01:26.332-05:00Android Wireless Application Development Volume I: Android Essentials (3rd Edition) now available<a href="http://www.amazon.com/gp/product/0321813839/ref=as_li_tf_il?ie=UTF8&camp=1789&creative=9325&creativeASIN=0321813839&linkCode=as2&tag=mamlambo-20"><img style="float:right;" border="0" src="http://ws-na.amazon-adsystem.com/widgets/q?_encoding=UTF8&ASIN=0321813839&Format=_SL160_&ID=AsinImage&MarketPlace=US&ServiceVersion=20070822&WS=1&tag=mamlambo-20" ></a><img src="http://ir-na.amazon-adsystem.com/e/ir?t=mamlambo-20&l=as2&o=1&a=0321813839" width="1" height="1" border="0" alt="" style="border:none !important; margin:0px !important;" />Android Wireless Application Development has earned a reputation as the most useful real-world guide to building robust, commercial-grade Android apps. Now, we have systematically revised and updated this guide for the latest Android SDK 4.0. To accommodate their extensive new coverage, they’ve split the book into two volumes. Volume I focuses on Android essentials, including setting up your development environment, understanding the application lifecycle, designing effective user interfaces, developing for diverse devices, and optimizing your mobile app development process--from design through publishing. Every chapter has been thoroughly updated for the newest APIs, tools, utilities, and hardware. All sample code has been overhauled and tested on leading devices from multiple companies, and many new examples have been added. Drawing on decades of in-the-trenches experience as professional mobile developers, we provide valuable new best practices--including powerful techniques for constructing more portable apps. This new edition contains full chapters on Android manifest files, content providers, effective app design, and testing; an all-new chapter on tackling compatibility issues; coverage of today’s most valuable new Android tools and utilities; and even more exclusive tips and tricks. An indispensable resource for every Android development team member.
Anonymoushttp://www.blogger.com/profile/17827559880668952148noreply@blogger.com0tag:blogger.com,1999:blog-3056106977294330364.post-28174300976383827602011-12-05T21:32:00.001-05:002011-12-05T21:39:08.342-05:00Code Downloads for "Introducing Android Development with Ice Cream Sandwich" Available Here<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgaaLs1pdYoJ-W8sOn8JviINDeuNXrPQKOr4NSxM02k7izAlrTX_VDRq9QzpbXbrGc9Y0TUEUSHaodzH4ScyO4g8ozOo_TDawCW1Q-kH9cS8jAql0wFkfN5SB-_F9FXgfmLeiOuKPPjCL1Z/s1600/ICS-minibook-cover.png" imageanchor="1" style="clear: right; float: right; margin-bottom: 1em; margin-left: 1em;"><img border="0" height="200" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgaaLs1pdYoJ-W8sOn8JviINDeuNXrPQKOr4NSxM02k7izAlrTX_VDRq9QzpbXbrGc9Y0TUEUSHaodzH4ScyO4g8ozOo_TDawCW1Q-kH9cS8jAql0wFkfN5SB-_F9FXgfmLeiOuKPPjCL1Z/s200/ICS-minibook-cover.png" width="154" /></a></div>
We've added the source code downloads for the minibook, <a href="http://www.amazon.com/gp/product/B0060WNRZM/ref=as_li_ss_tl?ie=UTF8&tag=mamlambo-20&linkCode=as2&camp=1789&creative=390957&creativeASIN=B0060WNRZM">Introducing Android Development with Ice Cream Sandwich,</a> to the <a href="http://androidbook.blogspot.com/p/book-code-downloads.html">downloads page</a>. The code includes the fix for previously mentioned errata.<br />
<br />
Download it now to use with your copy of the ebook.Anonymoushttp://www.blogger.com/profile/14247538790892494881noreply@blogger.com1tag:blogger.com,1999:blog-3056106977294330364.post-64340478244856981472011-12-04T17:00:00.002-05:002011-12-04T17:00:00.888-05:00Errata for "Introducing Android Development with Ice Cream Sandwich"<div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgaaLs1pdYoJ-W8sOn8JviINDeuNXrPQKOr4NSxM02k7izAlrTX_VDRq9QzpbXbrGc9Y0TUEUSHaodzH4ScyO4g8ozOo_TDawCW1Q-kH9cS8jAql0wFkfN5SB-_F9FXgfmLeiOuKPPjCL1Z/s1600/ICS-minibook-cover.png" imageanchor="1" style="clear: right; float: right; margin-bottom: 1em; margin-left: 1em;"><img border="0" height="320" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgaaLs1pdYoJ-W8sOn8JviINDeuNXrPQKOr4NSxM02k7izAlrTX_VDRq9QzpbXbrGc9Y0TUEUSHaodzH4ScyO4g8ozOo_TDawCW1Q-kH9cS8jAql0wFkfN5SB-_F9FXgfmLeiOuKPPjCL1Z/s320/ICS-minibook-cover.png" width="247" /></a></div>We recently completed a very short, very small book project: "<a href="http://www.amazon.com/gp/product/B0060WNRZM/ref=as_li_ss_tl?ie=UTF8&tag=mamlambo-20&linkCode=as2&camp=1789&creative=390957&creativeASIN=B0060WNRZM">Introducing Android Development with Ice Cream Sandwich</a>." It's a minibook that was targeted to release with Ice Cream Sandwich. As such, the testing and development timeline was incredibly short and truncated, and devices are still not available to everyone who wants them worldwide.<br />
<br />
Right off, we've had a reader point out one issue:<br />
<br />
In Chapter 1, when adding the code to play an audio file from a remote URL, Android 4 (Ice Cream Sandwich) now requires and enforces the Internet permission. We've tested on previous SDK versions and, indeed, this permission was not enforced on any prior platform versions. In this case, we completely agree that it should have been -- the sample application has been using Internet data without needing to request a permission since Android 1.0-but now it needs this permission.<br />
<br />
Luckily, the LogCat output makes this crystal clear:<br />
<br />
<br />
<span style="font-family: 'Courier New', Courier, monospace; font-size: x-small;">12-04 15:08:15.674: D/MediaPlayer(605): Couldn't open file on client side, trying server side</span><br />
<span style="font-family: 'Courier New', Courier, monospace; font-size: x-small;">12-04 15:08:15.684: W/ServiceManager(36): Permission failure: android.permission.INTERNET from uid=10044 pid=605</span><br />
<span style="font-family: 'Courier New', Courier, monospace; font-size: x-small;">12-04 15:08:15.684: E/MediaPlayerService(36): Request requires android.permission.INTERNET</span><br />
<span style="font-family: 'Courier New', Courier, monospace; font-size: x-small;">12-04 15:08:15.684: E/MediaPlayer(605): Unable to to create media player</span><br />
<div><br />
</div><div>The Android documentation has been updated to state, at the class level, that MediaPlayer requires the INTERNET permission when used with network based content. As it should. What isn't stated is if older SDKs will eventually be updated to enforce this permission or not. Right now, we only see this permission being enforced when running the application on API Level 14, which, right now, is less than 1% of all devices in the field. </div><div><br />
</div><div>We apologize for any inconvenience or confusion this issue has caused. The update will also be applied to the full book, <a href="http://www.amazon.com/dp/0321813839/?tag=mamlambo-20">Android Wireless Application Development: Volume 1: Android Essentials: Third Edition</a> (or, as we like to call it, AWAD3EV1). We will also update the code available on this website to reflect the permission policy change. </div><div><br />
</div><div><br />
</div>Anonymoushttp://www.blogger.com/profile/14247538790892494881noreply@blogger.com1tag:blogger.com,1999:blog-3056106977294330364.post-7185460973110269992011-11-17T16:00:00.003-05:002011-11-17T16:00:03.904-05:00Kindle Fire: ADB Connections and USB Debugging<table cellpadding="0" cellspacing="0" class="tr-caption-container" style="clear: right; float: right; margin-bottom: 1em; margin-left: 1em; margin-right: auto; text-align: right;"><tbody>
<tr><td style="text-align: center;"><a href="http://www.blogger.com/goog_1362148005"><img border="0" height="200" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgxD0iIXXrbJ9Z3nDtzLCBejo-KyYQGUAKk8CQRcb5FrRJwjUVDN5kkgQX9VnhOQoMrOg6YL5TOtrE-_xVMgt6sDK2Tw5ntlaCXQ2iOQtUGT3ihm52-O0hSXbUyuKH64WkWUROTHOzO23Bf/s200/kindle-apps.jpg" width="141" /></a></td></tr>
<tr><td class="tr-caption" style="text-align: center;"><a href="http://www.amazon.com/dp/B0051VVOB2/?tag=mamlambo-20">Amazon Appstore on Kindle</a></td></tr>
</tbody></table><a href="http://www.amazon.com/dp/B0051VVOB2/?tag=mamlambo-20">Amazon's Kindle Fire</a> is looking to be one of the hottest non-Google Mobile Services Android devices to date. If you've got one, you may have quickly noted that you can't necessarily immediately connect it up via ADB. A quick search returns all kinds of various solutions.<br />
<div><br />
</div><div>Turns out, Amazon also documents the solution. In fact, they have entire section in their<a href="https://developer.amazon.com/help/faq.html#KindleFire"> developer FAQ on the Kindle Fire</a>. The linked PDF, <a href="http://g-ecx.images-amazon.com/images/G/01/sdk/Connecting_your_Kindle_Fire_to_ADB.pdf">Connecting Your Kindle Fire To ADB</a>, has all of the steps necessary and a <a href="http://g-ecx.images-amazon.com/images/G/01/sdk/kindle-fire-windows-7-driver.zip">linked driver</a> will help Windows 7 users.<br />
<br />
If you already had your application on Amazon's Appstore and it works on Kindle Fire, users are probably already downloading it. </div>Anonymoushttp://www.blogger.com/profile/14247538790892494881noreply@blogger.com2tag:blogger.com,1999:blog-3056106977294330364.post-50057214497066140132011-10-19T13:34:00.002-04:002011-10-19T13:34:49.419-04:00Late Night Dessert: Ice Cream Sandwich Arrives<table cellpadding="0" cellspacing="0" class="tr-caption-container" style="float: right; margin-left: 1em; text-align: right;"><tbody>
<tr><td style="text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgd70Am26hzu8P4wax9bVXk-FYDLZH2NXwJX_fvQ6IdX49pzHhJDUqL08rO1QiSm_alG-W0XeyJVAQPNVIvKGmFmPBnzKiyplxQwMuiVqiSbh4Lr9K2nvrOOmemDEAIRVq3LU1Vfg7pC-LX/s1600/ics-android.png" imageanchor="1" style="clear: right; margin-bottom: 1em; margin-left: auto; margin-right: auto;"><img border="0" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgd70Am26hzu8P4wax9bVXk-FYDLZH2NXwJX_fvQ6IdX49pzHhJDUqL08rO1QiSm_alG-W0XeyJVAQPNVIvKGmFmPBnzKiyplxQwMuiVqiSbh4Lr9K2nvrOOmemDEAIRVq3LU1Vfg7pC-LX/s1600/ics-android.png" /></a></td></tr>
<tr><td class="tr-caption" style="text-align: center;">Android 4.0, Ice Cream Sandwich Mascot</td></tr>
</tbody></table>
Android developers were treated to a late night dessert last night. At least those in North America. The Ice Cream Sandwich and Galaxy Nexus announcements were at 10pm in our local time zone.<br />
<br />
What was announced? There were actually several different areas of the announcement. First, there is a new device coming: the Galaxy Nexus. Second, the Android 4.0 SDK is out -- <a href="http://developer.android.com/sdk/android-4.0.html">download it now</a> if you haven't already. Third, several new user features for Android were announced and demonstrated in the context of the Galaxy Nexus.<br />
<br />
Beyond those basic announcements, though, came the release of Android SDK Tools R14, Eclipse plug-in R14, updated -- and renamed -- compatibility package. The compatibility package is now on release 4, and is called the support package. All come with updates. The SDK Tools may be the most interesting. The Android Open Source Tools blog has been highlighting recent changes, many of which look exciting.<br />
<br />
What wasn't announced? There was no word on Google TV -- is it still slated for Honeycomb, or will it jump to Ice Cream Sandwich and when -- we don't know. There was no word on when older devices -- tablets and phones -- will get Ice Cream Sandwich, Android 4.0, firmware. Or even if they will (we assume they will).<br />
<br />
Now that ICS is out and known, what are you expected from whatever J (probably not a trademark name, like we've seen rumored) dessert is chosen for the next major release?<br />
<br />Anonymoushttp://www.blogger.com/profile/14247538790892494881noreply@blogger.com0tag:blogger.com,1999:blog-3056106977294330364.post-87431448510658181132011-09-01T12:50:00.001-04:002011-09-01T12:51:12.917-04:00Win a Copy of the Second Edition of SAMS Teach Yourself Android Application Development in 24 Hours!<div style="clear: right; float: right; margin-bottom: 1em; margin-left: 1em;"><table align="center" cellpadding="0" cellspacing="0" class="tr-caption-container" style="float: right; margin-left: 1em; text-align: right;"><tbody>
<tr><td style="text-align: center;"><span style="margin-left: auto; margin-right: auto;"><a href="http://www.blogger.com/goog_764050599"><img border="0" height="200" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEixlNeEiCkfR6mdLx8FXu2Bg4eSXWpw4qOqlXiLpWVbA4SRK37j-_JZtgyE1mDnyzWXilQ0fvKbz4Q5xWnDD0oTv3h_FPWA7Pw07d5VWMxUsUh2OfX4przVw6bo289XueG2dEyukeIMjipP/s200/sams_2e_cover.jpg" width="153" /></a></span></td></tr>
<tr><td class="tr-caption" style="text-align: center;"><a href="http://www.amazon.com/Teach-Yourself-Android-Application-Development/dp/0672335697?ie=UTF8&tag=mamlambo-20&link_code=btl&camp=213689&creative=392969">STY:AAD:i24H:2E</a></td></tr>
</tbody></table><br />
</div>There's still time! You've got until September 8th to enter to win a copy of our beginner Android development book over at the <a href="http://www.androidpolice.com/2011/08/31/book-giveaway-8-be-one-of-five-lucky-readers-who-will-win-teach-yourself-android-development-in-24-hours/">Android Police</a> website! Just post a comment about an app idea you've got and you'll get a chance to win one of five copies of <a href="http://www.androidpolice.com/2011/08/31/book-giveaway-8-be-one-of-five-lucky-readers-who-will-win-teach-yourself-android-development-in-24-hours/" target="_blank">SAMS Teach Yourself Android Application Development in 24 Hours, Second Edition</a><img alt="" border="0" height="1" src="http://www.assoc-amazon.com/e/ir?t=mamlambo-20&l=btl&camp=213689&creative=392969&o=1&a=0672335697" style="border: none !important; margin: 0px !important; padding: 0px !important;" width="1" />! <br />
<br />
We look forward to reading your comments and good luck! <br />
<br />
(Note: This particular contest appears to available to anyone in the world!)<br />
<br />
This book is our most recent in the SAMS series and is for beginners compared to our more advanced title, <a href="http://www.amazon.com/Android-Wireless-Application-Development-Developers/dp/0321743016?ie=UTF8&tag=mamlambo-20&link_code=btl&camp=213689&creative=392969" target="_blank">Android Wireless Application Development (2nd Edition) (Developer's Library)</a>.Anonymoushttp://www.blogger.com/profile/17827559880668952148noreply@blogger.com8tag:blogger.com,1999:blog-3056106977294330364.post-10117237108357720182011-07-18T08:00:00.002-04:002011-07-18T08:00:01.227-04:00Several New Android Updates<table cellpadding="0" cellspacing="0" class="tr-caption-container" style="float: right; margin-left: 1em; text-align: right;"><tbody>
<tr><td style="text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgsNbtZcqMgreC6nZQNm_nWc1dOd2-zsr7PHWXtkvbjxZFd1qGD5-LAz856OHzSStUBGZCIqpIZKkQ8f23p8ppVC9T7gmuFsgqgsFpuEoMLealKHPlblGEc4SWYHqieF1n59rTthfwPm8Gd/s1600/honeycomb-android.png" imageanchor="1" style="clear: right; margin-bottom: 1em; margin-left: auto; margin-right: auto;"><img border="0" height="152" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgsNbtZcqMgreC6nZQNm_nWc1dOd2-zsr7PHWXtkvbjxZFd1qGD5-LAz856OHzSStUBGZCIqpIZKkQ8f23p8ppVC9T7gmuFsgqgsFpuEoMLealKHPlblGEc4SWYHqieF1n59rTthfwPm8Gd/s200/honeycomb-android.png" width="200" /></a></td></tr>
<tr><td class="tr-caption" style="text-align: center;">Android API Level 13 is<br />
Android 3.2 is<br />
Honeycomb</td></tr>
</tbody></table>The Android team has posted several new updates in the last few days. The most obvious, which was already rolling out to consumer devices, is the <a href="http://j.mp/r1HtsB">Android 3.2 SDK</a>. This is API Level 13 and is the most recent incremental update to Honeycomb. It's main new features revolve around expanded screen compatibility support. New resource qualifiers are available to developers and official support is in place for devices with screen resolutions of 1024x600 (most frequently found on 7" tablets).<br />
<br />
The <a href="http://j.mp/a4yQ74">Android NDK</a> was updated to release 6. This adds support for the x86 Application Binary Interface (ABI). Although it doesn't say as much, we're assuming this is in advance of broad availability of Android applications for Google TV devices, many of which are on Intel x86 platforms (such as the Logitech Revue, which is built around an Intel Atom processor).<br />
<br />
The <a href="http://j.mp/mVqsvz">Compatibility Package</a> has been updated to Release 3. This release marks a change from previous releases in that it now has both API Level 4 compatibility classes, several classes that are no longer exclusively for compatibility, but rather add new, useful features for developers. This includes versions of these classes for API Level 13, such that those classes behave more appropriately on the new Honeycomb release (we assume). <br />
<br />
This has left us wondering about the future of the Compatibility Package. We've found it incredibly useful and one of the best ideas out of the Android team for adding higher level features that could be implemented on old platforms. What we're wondering is if this will become a pattern? Instead of adding a new, higher level, feature to the base API and then adding compatibility classes, will they start adding such classes directly to the Compatibility Package and now to the the base API? This would ultimately result in more efficient APIs on all SDK levels.<br />
<br />
Either way, the Compatibility Package continues to be a very important piece of the Android picture.<br />
<br />
Which of these updates is most interesting to you? What new opportunities do they allow for you as application developers. We love to know what you're working on!Anonymoushttp://www.blogger.com/profile/14247538790892494881noreply@blogger.com4tag:blogger.com,1999:blog-3056106977294330364.post-36634244976218024102011-07-13T15:00:00.000-04:002011-07-13T20:42:27.797-04:00Important Android Update Coming: Developers Must Take ActionThe <a href="http://goo.gl/uNZ52">Google Android Developer's blog</a> recently posted about a change to Honeycomb. This change is the ability for <i>users</i> to be able to choose to<b> </b>stretch your app or scale your app. This option will be enabled unless you, the developer, specifically sets support for xlarge screens:<br />
<br />
<span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;"><supports-screens android:xlargeScreens="true" /></span><br />
<br />
<span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;"><span class="Apple-style-span" style="font-family: Times;">Or you set the minSdkVersion or targetSdkVersion to API Level 11 or higher. </span></span><br />
<span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;"><span class="Apple-style-span" style="font-family: Times;"><br />
</span></span><br />
<span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;"><span class="Apple-style-span" style="font-family: Times;">If neither of these is true, the user will be give the option to scale your app in a way that may make it look much worse. If you are already doing the <i>right thing</i> with respect to supporting various screen sizes, the scaling mode will make your app look worse. This is because the scaling mode emulates an MDPI normal sized screen. That is, your app will become a pixelated version of what it looks like on the venerable G1. </span></span><br />
<span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;"><span class="Apple-style-span" style="font-family: Times;"><br />
</span></span><br />
<span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;"><span class="Apple-style-span" style="font-family: Times;">Is this what you want? Probably not. You must update your application to avoid this situation, but only if you do not already have xlarge screen support or API Level 11 or higher listed as a target or minimum SDK version.</span></span><br />
<span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;"><span class="Apple-style-span" style="font-family: Times;"><br />
</span></span><br />
<span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;"><span class="Apple-style-span" style="font-family: Times;">The update to enable this on some devices rolled out <i>yesterday.</i> Get to it!</span></span><br />
<span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;"><span class="Apple-style-span" style="font-family: Times;"><br />
</span></span><br />
<span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;"><span class="Apple-style-span" style="font-family: Times;">Need more resources on how to handle multiple device resolutions?</span></span><br />
<ul><li><a href="http://www.amazon.com/Android-Wireless-Application-Development-Developers/dp/0321743016?ie=UTF8&tag=mamlambo-20&link_code=btl&camp=213689&creative=392969" target="_blank">Android Wireless Application Development, Second Edition</a><img alt="" border="0" height="1" src="http://www.assoc-amazon.com/e/ir?t=mamlambo-20&l=btl&camp=213689&creative=392969&o=1&a=0321743016" style="border: currentColor !important; margin: 0px !important; padding: 0px !important;" width="1" />, Chapter 25</li>
<li><a href="http://www.amazon.com/Teach-Yourself-Android-Application-Development/dp/0672335697?ie=UTF8&tag=mamlambo-20&link_code=btl&camp=213689&creative=392969" target="_blank">Sam's Teach Yourself Android Application Development in 24 Hours</a><img alt="" border="0" height="1" src="http://www.assoc-amazon.com/e/ir?t=mamlambo-20&l=btl&camp=213689&creative=392969&o=1&a=0672335697" style="border: currentColor !important; margin: 0px !important; padding: 0px !important;" width="1" />, Second Edition, Hour 20</li>
<li><a href="http://goo.gl/YvU7u">Create Flexible Android UIs with Fragments</a></li>
<li><a href="http://goo.gl/tHfPf">Android Tablet Development Tips and Tricks</a></li>
<li>Android Compatibility: Diversity: Supporting Diverse Devices, <a href="http://www.smart-developer.com/Magazine/Archives/2011/03">Smart Developer, Issue #3</a></li>
</ul><div><br />
</div><br />
<span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;"><span class="Apple-style-span" style="font-family: Times;"><br />
</span></span><br />
<span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;"><span class="Apple-style-span" style="font-family: Times;"><br />
</span></span>Anonymoushttp://www.blogger.com/profile/14247538790892494881noreply@blogger.com0tag:blogger.com,1999:blog-3056106977294330364.post-49916442476899284592011-07-08T09:00:00.004-04:002011-07-08T09:00:20.318-04:00Motorola Atrix 4G: Connecting to a Mac<table cellpadding="0" cellspacing="0" class="tr-caption-container" style="float: right; margin-left: 1em; text-align: right;"><tbody>
<tr><td style="text-align: center;"><a href="http://www.amazon.com/Motorola-Atrix-4G-Android-Phone/dp/B004KZP4BQ?ie=UTF8&tag=mamlambo-20&link_code=btl&camp=213689&creative=392969" imageanchor="1" style="clear: right; margin-bottom: 1em; margin-left: auto; margin-right: auto;"><img border="0" height="200" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgRb8-b8TCmhKYOeZf-FpcH5qlx8zZRD-giJup09ef2sc7hXMFeW7sp8H7kOAYhk_Halcs_AWooEOultKb6HDsSbk-4p4IY5NF1BALKfFxcHxwJuR5Y_QWzFOlns7Tk9YqNkcm-rKtS-bBc/s200/atrix_4g.jpg" width="200" /></a></td></tr>
<tr><td class="tr-caption" style="text-align: center;"><a href="http://www.amazon.com/Motorola-Atrix-4G-Android-Phone/dp/B004KZP4BQ?ie=UTF8&tag=mamlambo-20&link_code=btl&camp=213689&creative=392969" target="_blank">Motorola Atrix 4G</a><img alt="" border="0" height="1" src="http://www.assoc-amazon.com/e/ir?t=mamlambo-20&l=btl&camp=213689&creative=392969&o=1&a=B004KZP4BQ" style="border: none !important; margin: 0px !important; padding: 0px !important;" width="1" /></td></tr>
</tbody></table>
When we first got our <a href="http://www.amazon.com/Motorola-Atrix-4G-Android-Phone/dp/B004KZP4BQ?ie=UTF8&tag=mamlambo-20&link_code=btl&camp=213689&creative=392969" target="_blank">Atrix 4G</a><img alt="" border="0" height="1" src="http://www.assoc-amazon.com/e/ir?t=mamlambo-20&l=btl&camp=213689&creative=392969&o=1&a=B004KZP4BQ" style="border: none !important; margin: 0px !important; padding: 0px !important;" width="1" /> test device, we were momentarily dismayed when it didn't just show up in ADB for testing. We had set the USB to debugging mode, all of our other devices connect and work without any trouble. Was this some at&t thing we'd missed?<br />
<br />
Luckily, it wasn't. Our Mac is running 10.6.6, which apparently introduced an incompatibility with ADB 1.0.26. Supposedly other configurations just work. We have this configuration, and so can't comment on the others.<br />
<br />
Luckily, there's a very simple solution:<br />
<br />
<table cellpadding="0" cellspacing="0" class="tr-caption-container" style="float: left; margin-right: 1em; text-align: left;"><tbody>
<tr><td style="text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiHi6Yv8mt1zmAJOaUoAeoqJTefvzHmyPpSjUD_JZ_Jd7nvVSv4EKiJkFX4aLkCox7V4W9mHLELG_JZCc4OuUUpuKks3U3HSqVkTOR43D7JL0G9FXwx8bS0J6UTCWp8yf4RKznFEQ7xEGdq/s1600/atrix_4g_usb.png" imageanchor="1" style="clear: left; margin-bottom: 1em; margin-left: auto; margin-right: auto;"><img border="0" height="200" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiHi6Yv8mt1zmAJOaUoAeoqJTefvzHmyPpSjUD_JZ_Jd7nvVSv4EKiJkFX4aLkCox7V4W9mHLELG_JZCc4OuUUpuKks3U3HSqVkTOR43D7JL0G9FXwx8bS0J6UTCWp8yf4RKznFEQ7xEGdq/s200/atrix_4g_usb.png" width="112" /></a></td></tr>
<tr><td class="tr-caption" style="text-align: center;">None or USB Mass Storage</td></tr>
</tbody></table>
When the device is connected, choose the "USB connection" item from the notifications, then pick either "USB Mass Storage" or "None." Voila! The phone appears in ADB! Motorola Phone Portal and Windows Media Sync apparently don't work so well with whatever the combination of Mac OS 10.6.6 and ADB 1.0.26 do.<br />
<br />
<br />Anonymoushttp://www.blogger.com/profile/14247538790892494881noreply@blogger.com0tag:blogger.com,1999:blog-3056106977294330364.post-66471723901004321462011-07-05T13:00:00.011-04:002011-07-05T13:00:01.469-04:00Reader Feedback: Using Your Personal Device for DevelopmentWe had an interesting comment come in from a reader recently. In our books, work, and discussions with developers and clients, we always strongly recommend testing applications on real hardware -- as much real hardware as you can feasibly get your hands on.<br />
<br />
Why? Won't the Android code just run everywhere?<br />
<br />
Sure, the code will run everywhere. The results, however, will not be consistent. It doesn't mean that your app will run properly or as you expect it to. This can be due to different device SDK versions, bugs in your own code, unexpected device differences (such as strange screen resolutions or manufacturer features that modify behavior slightly), and simply device firmware bugs.<br />
<br />
Back to the reader comment:<br />
<br />
<blockquote>"... because there was no mention if it would have any impact on the device. What I mean is, will it reload all the device programs and possibly mess up my phone?"</blockquote><br />
This is a great question. Having done mobile development -- and used personal devices for testing, in addition to piles of test-only devices -- for over a decade, we often forget about such basic things. Once upon a time we worried about such issues - typically we worried most about "bricking" our phones, or causing them to become unusable.<br />
<br />
The simple answer with Android is no, writing and deploying apps won't mess up your personal device. Well, no more so than you could mess up your device by installing someone else's poorly written app. The more complex answer is that it could, but it depends on what you're doing. If you're just loading your own applications and running them, even on the debugger, that alone won't cause problems. If you're doing something tricky with your code, going beyond the bounds of the SDK, or other lower level items, you could cause resets, instability, and even data loss -- but simply due to bugs in your code.<br />
<br />
One caveat here is that at no time in our books or articles do we recommend rooting your device, which opens it up to higher chances of causing damage. Rooting your device gives you access to underlying systems and services that are made unavailable to developers for good reason. Yes, there can be reasons to root your device, but those who pursue this do so at their own risk. Our general feeling is that testing with rooted devices is not useful, because the majority of users in the world don't root their devices, and that's the environment our apps will run on and therefore the environment our apps should be tested on.<br />
<br />
We do recommend backing up your data. For instance, if you're writing an app that reads and writes to the device images and you have a bunch of family photos on the device that you haven't backed up, do so. Same goes for working with contacts, etc. Maybe one of your apps accidentally deletes everything during testing. That wouldn't be any fun, would it? Therefore, your biggest vulnerability when using a personal device is the data, not the device itself.<br />
<br />
Further, you can still use your device for purchasing items off the app stores: Android Market, Amazon appstore, and any others you'd like. Again, using a device for development does not require rooting that device, so you can still purchase books and movies that are sometimes blocked on rooted devices.<br />
<br />
Finally, even the carriers/operators won't know or care. It's not really any different than loading apps from alternate markets. If you're developing an application that uses a ton of data over cellular connections, you might need to make sure you have a data plan that includes a lot of bandwidth, or unlimited usage, to avoid hefty fees.<br />
<br />
Ultimately, our own personal devices are the ones we test or demo apps on the most because they are always with us and are the most convenient. We don't have to sift through boxes of cables and devices if we're using our personal devices.Anonymoushttp://www.blogger.com/profile/14247538790892494881noreply@blogger.com1tag:blogger.com,1999:blog-3056106977294330364.post-64883863325369968732011-07-04T17:56:00.013-04:002011-07-05T10:30:02.692-04:00Win a Copy of Our Advanced Android Book!<br />
<div style="clear: right; float: right; margin-bottom: 1em; margin-left: 1em;">
<img border="0" height="200" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhn1d1fjEF8j-36G5Om_z4n5gViUQ5X2wLfGlEyzaFcRMtxZN73h_W-RypjjDk76ANz4-_kGxLUr3GwDd6EONP6TSwmiawEJLso3XMKFh1P7ihWOAzo5fFR8KoFReLy60aG1_RAoVn5ItGL/s200/awad_2e_cover.jpg" width="155" /></div>
There's still time! You've got until July 8th to enter to win a copy of our advanced Android development book over at the <a href="http://j.mp/ljyeft">Android Police</a> website! Just post a comment about an app idea you've got and you'll get a chance to win one of five copies of Android Wireless Application Development, Second Edition!
<br />
<br />
We look forward to reading your comments and good luck! <br />
<br />
(Note: This particular contest appears to available to anyone in the world!)<br />
<br />
This book is our most recent in the Developer's Library series and is more advanced than our upcoming title, <a href="http://www.amazon.com/dp/0672335697/?tag=mamlambo-20">Sam's Teach Yourself Android Application Development in 24 Hours, Second Edition</a>.Anonymoushttp://www.blogger.com/profile/17827559880668952148noreply@blogger.com6tag:blogger.com,1999:blog-3056106977294330364.post-83479878821744157212011-06-02T12:00:00.000-04:002011-06-02T12:06:53.067-04:00Pre-Order Second Edition of Sam's Teach Yourself Android Application Development in 24 Hours Now!<div class="separator" style="clear: both; text-align: center;">
<a href="http://www.amazon.com/dp/0672335697/?tag=mamlambo-20" imageanchor="1" style="clear: right; float: right; margin-bottom: 1em; margin-left: 1em;"><img border="0" height="200" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjhteDywYjqxzZeZmqwUe-Qur1_nBWfjvx6pygwUVVcl5F8CXiWw8VgBidwM4mHYODldgsYLhjDnFu8-zNQUX0NS_lyiOK2RVb7U5-IxDkSzc0rOsdvZraouE6KNzBEtTDMqCMp4p35gPt7/s200/sams_2e.png" width="154" /></a></div>
Our next book,<a href="http://www.amazon.com/dp/0672335697/?tag=mamlambo-20"> Sam's Teach Yourself Android Application Development in 24 Hours, Second Edition, is available for pre-order from Amazon</a>. Buy it now and be amongst the first to receive it.<br />
<br />
We've made extensive changes throughout the entire book, updating it based on feedback from readers -- including many who have commented on this blog -- as well as incorporating updates and changes to the Android SDK and tools. We appreciate all feedback; keep it coming!<br />
<br />
We expect this book to hit shelves sometime mid- to late-August. Amazon is showing a date of August 25, while <a href="http://www.informit.com/store/product.aspx?isbn=0672335697">InformIT</a> is showing a date of August 15.<br />
<br />
We hope you enjoy it and learn from it.Anonymoushttp://www.blogger.com/profile/14247538790892494881noreply@blogger.com2tag:blogger.com,1999:blog-3056106977294330364.post-5897015136543647212011-05-31T13:12:00.003-04:002011-07-04T18:06:10.055-04:00Win a Copy of Android Wireless Application Development, Second Edition<a href="http://www.amazon.com/Android-Wireless-Application-Development-Developers/dp/0321743016?ie=UTF8&tag=mamlambo-20&link_code=bil&camp=213689&creative=392969" imageanchor="1" style="clear: right; float: right; margin-bottom: 1em; margin-left: 1em;" target="_blank"><img alt="Android Wireless Application Development (2nd Edition) (Developer's Library)" src="http://ws.amazon.com/widgets/q?MarketPlace=US&ServiceVersion=20070822&ID=AsinImage&WS=1&Format=_SL160_&ASIN=0321743016&tag=mamlambo-20" /></a>Mobiletuts+ is giving away five free autographed copies of <a href="http://www.amazon.com/Android-Wireless-Application-Development-Developers/dp/0321743016?ie=UTF8&tag=mamlambo-20&link_code=btl&camp=213689&creative=392969" target="_blank">Android Wireless Application Development, Second Edition</a><img alt="" border="0" height="1" src="http://www.assoc-amazon.com/e/ir?t=mamlambo-20&l=btl&camp=213689&creative=392969&o=1&a=0321743016" style="border: currentColor !important; margin: 0px !important; padding: 0px !important;" width="1" />. Find out how to enter to win one of them <a href="http://j.mp/iCHHDD">over on Mobiletuts<img alt="" border="0" height="1" src="http://www.assoc-amazon.com/e/ir?t=mamlambo-20&l=bil&camp=213689&creative=392969&o=1&a=0321743016" style="border: currentColor !important; margin: 0px !important; padding: 0px !important;" width="1" />+</a>.<br />
<br />
This book is our most recent in the Developer's Library series and is more advanced than our upcoming title, <a href="http://www.amazon.com/dp/0672335697/?tag=mamlambo-20">Sam's Teach Yourself Android Application Development in 24 Hours, Second Edition</a>.<br />
<br />
(Note: This is only available to US residents, where allowed by law.)Anonymoushttp://www.blogger.com/profile/14247538790892494881noreply@blogger.com5tag:blogger.com,1999:blog-3056106977294330364.post-79398360102612162062011-05-10T00:00:00.000-04:002011-05-25T21:54:38.028-04:00Placeholder: Details ForthcomingThis is a placeholder post.<br />
<br />
When the reason for this post goes live, this post will be updated with all that you need to know. There is probably a better way to do this. At that time, comments will be turned on, too. ;)<br />
<br />
<br />Anonymoushttp://www.blogger.com/profile/14247538790892494881noreply@blogger.com1tag:blogger.com,1999:blog-3056106977294330364.post-69978619515647202562011-03-04T08:00:00.047-05:002011-03-04T08:00:09.767-05:00Reader Feedback: Analysis of an ExerciseAt the end of each "Hour" in the <a href="http://www.amazon.com/Yourself-Android-Application-Development-ebook/dp/B003MZ0XN4?ie=UTF8&tag=mamlambo-20&link_code=btl&camp=213689&creative=392969" target="_blank">Sam's Teach Yourself Android Application Development in 24 Hours</a><img alt="" border="0" height="1" src="http://www.assoc-amazon.com/e/ir?t=mamlambo-20&l=btl&camp=213689&creative=392969&o=1&a=B003MZ0XN4" style="border: none !important; margin: 0px !important; padding: 0px !important;" width="1" /> book, there are exercises. We originally designed these exercises to be items people could try to extend their knowledge above and beyond what was learned verbatim in the chapter, given some hints and practice using the the Android documentation that is critical to become familiar with.<br />
<br />
Here we present one such exercise that occurs in one of the first real coding hours and present our thought process for determining the solution. Hopefully this will help readers who may be struggling with the difficulty of the exercises. That said, we have also determined, based upon reader feedback, that a handful of exercises in the book are perhaps unfairly difficult. For the next edition of the book, many of these will be replaced or labelled as challenge exercises.<br />
<br />
<span class="Apple-style-span" style="font-size: large;">Walk-Through of an Exercise</span><br />
<br />
This is from Hour 7 on page 125, if you'd like to follow along. As it's the end of the chapter, you already would have downloaded the code to work along with in the chapter. If not, it's available <a href="http://androidbook.blogspot.com/p/book-code-downloads.html">right here</a>.<br />
<blockquote>
"Exercise #1: <i>Modify the LayoutAnimationController in the QuizSplashActivity class to apply animations of each child view within a TableRow control in random order by using the setOrder() method with a value of 2 (random).</i>"</blockquote>
<b>Key Phrase #1</b>: "<i>Modify the LayoutAnimationController in the QuizSplashActivity</i>"<br />
<br />
<b>Thought Process, Step 1</b>: This tells me we're dealing with something to do with the LayoutAnimationController. Luckily, we just covered that on page 122, where we gave this following code:<br />
<br />
<pre style="border: 1px dashed #CCCCCC; font-family: arial; font-size: 12px; height: auto; line-height: 20px; overflow: auto; padding: 0px; text-align: left; width: 99%;"><code style="word-wrap: normal;">Animation spinin = AnimationUtils.loadAnimation(this, R.anim.custom_anim);
LayoutAnimationController controller = new LayoutAnimationController(spinin);
TableLayout table = (TableLayout) findViewById(R.id.TableLayout01);
for (int i = 0; i < table.getChildCount(); i++) {
TableRow row = (TableRow) table.getChildAt(i);
row.setLayoutAnimation(controller);
}
</code></pre>
<br />
<b>Thought Process, Step 2</b>: The code goes in QuizSplashActivity. Since I'm in Hour 7, I've been implementing this activity for the Splash Screen for most of the chapter.<br />
<br />
<b>Key Phrase #2</b>: "<i>to apply animations of each child view within a TableRow control</i>"<br />
<br />
<b>Thought Process, Step 3</b>: So far so good. The code is already doing that. We found the code in the section labelled, "Animating All Views in a Layout."<br />
<br />
<b>Key Phrase #3</b>: "<i>in random order</i>"<br />
<br />
<b>Thought Process, Step 4</b>: Hmm, I don't know how to do that. Let me read on, finishing the sentence...<br />
<br />
<b>Key Phrase #4</b>: "<i>using the setOrder() method with a value of 2 (random).</i>"<br />
<br />
<b>Thought Process, Step 5</b>: Oh, that's how! OK, hold on. I have two options: I could look up this method in the Android SDK docs, or just write it based on what was said in the exercise and see what happens. (Note: We prefer you look it up, like a good student, but experimentation doesn't hurt anything, either.) But perhaps we're lazy so... Let me just add that one line of code to the end of the initial listing, which will now look like:<br />
<pre style="border: 1px dashed #CCCCCC; font-family: arial; font-size: 12px; height: auto; line-height: 20px; overflow: auto; padding: 0px; text-align: left; width: 99%;"><code style="word-wrap: normal;">Animation spinin = AnimationUtils.loadAnimation(this, R.anim.custom_anim);
LayoutAnimationController controller = new LayoutAnimationController(spinin);
TableLayout table = (TableLayout) findViewById(R.id.TableLayout01);
for (int i = 0; i < table.getChildCount(); i++) {
TableRow row = (TableRow) table.getChildAt(i);
row.setLayoutAnimation(controller);
}
controller.setOrder(2); // THIS IS THE ONE NEW LINE OF CODE, THE SOLUTION TO EXERCISE #1
</code></pre>
<br />
<b>Run the app and see what happens....</b> Hey! That's pretty neat. Each time I run it, the animations happen in a different order and sometimes some of them happen at the same time.Anonymoushttp://www.blogger.com/profile/14247538790892494881noreply@blogger.com5tag:blogger.com,1999:blog-3056106977294330364.post-44355437639882862992011-03-02T08:00:00.018-05:002011-03-02T10:11:03.632-05:00Tip: Speeding Up Your Android Emulator LaunchThe latest version of the Android emulator comes with a feature called "snapshots." It needs to be enabled as a feature of each AVD. Luckily, this version also includes the ability to edit existing AVDs.<br />
<br />
First, enable the feature:<br />
<br />
<table align="center" cellpadding="0" cellspacing="0" class="tr-caption-container" style="margin-left: auto; margin-right: auto; text-align: center;"><tbody>
<tr><td style="text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhwQN5HMtUtpzn7wpwoROFZkf2MfQc-AqAm3hfnwdyIB46B__HbeVjWD8KNPYJUjw1viDnYCI4E6W-Spik6leAIljJPCFeMMRrf2PLL92GPoI8Q9ymIDgaoBEUo9Y1QFgN_p3QaDBcksTS1/s1600/snapshot-fig-1.png" imageanchor="1" style="margin-left: auto; margin-right: auto;"><img border="0" height="320" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhwQN5HMtUtpzn7wpwoROFZkf2MfQc-AqAm3hfnwdyIB46B__HbeVjWD8KNPYJUjw1viDnYCI4E6W-Spik6leAIljJPCFeMMRrf2PLL92GPoI8Q9ymIDgaoBEUo9Y1QFgN_p3QaDBcksTS1/s320/snapshot-fig-1.png" width="242" /></a></td></tr>
<tr><td class="tr-caption" style="text-align: center;">Enabling Snapshots</td></tr>
</tbody></table>
<br />
Second, when launching the AVD, choose to load from the snapshot and save the snapshot. When a snapshot isn't found, the AVD boots up from scratch. As we all know, this takes quite a long time even on very fast machines.<br />
<br />
<table align="center" cellpadding="0" cellspacing="0" class="tr-caption-container" style="margin-left: auto; margin-right: auto; text-align: center;"><tbody>
<tr><td style="text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhIwq-og3EinBBWS48CGFEmPOAm7AYwk8H_OA0NSiDFI9jPhOhuSVYx8IXECuUGmNkp7mAEZcHecKGi9ayq7_RmCRu44JoPDyVJn2FcAzhZd3MBoV9UBJ4Q7XiPi-2cfOOmDOI4gQWt9yL1/s1600/snapshots-fig-2.png" imageanchor="1" style="margin-left: auto; margin-right: auto;"><img border="0" height="320" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhIwq-og3EinBBWS48CGFEmPOAm7AYwk8H_OA0NSiDFI9jPhOhuSVYx8IXECuUGmNkp7mAEZcHecKGi9ayq7_RmCRu44JoPDyVJn2FcAzhZd3MBoV9UBJ4Q7XiPi-2cfOOmDOI4gQWt9yL1/s320/snapshots-fig-2.png" width="223" /></a></td></tr>
<tr><td class="tr-caption" style="text-align: center;">Enable Snapshot options</td></tr>
</tbody></table>
<br />
Now, when you exit, the system will store off a snapshot of the state of the AVD. This takes a little while, depending on how much RAM is assigned to the AVD. After saving the state once, the AVD will now launch very quickly - usually in just a couple of seconds.<br />
<br />
However, the exit is no longer super speedy and often triggers "Not Responding" type messages. If you always want to return to exactly where you left off, this is how it will work. Overall, the behavior is much faster. However, if you want it to come up clean each time, just make sure the first time you boot it's clean, then exit to save the snapshot. Now, when you launch the AVD, only check load from snapshot, but make sure save to snapshot is unchecked.<br />
<br />
<table align="center" cellpadding="0" cellspacing="0" class="tr-caption-container" style="margin-left: auto; margin-right: auto; text-align: center;"><tbody>
<tr><td style="text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjIrvBHBWVY0U-R81O8Pbfc3WQyCvlcwv1U1kF-mhwPabRN6jJs7Y-Faq5yQR5mb5jPcTaq69Xk_wjHQQfUY0KlPKJ9oGWC2-Im0uxbNVLngIAVhXwIEpIOi2sOwSFxA33C7aU04IrnIkj2/s1600/snapshots-fig-3.png" imageanchor="1" style="margin-left: auto; margin-right: auto;"><img border="0" height="320" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjIrvBHBWVY0U-R81O8Pbfc3WQyCvlcwv1U1kF-mhwPabRN6jJs7Y-Faq5yQR5mb5jPcTaq69Xk_wjHQQfUY0KlPKJ9oGWC2-Im0uxbNVLngIAVhXwIEpIOi2sOwSFxA33C7aU04IrnIkj2/s320/snapshots-fig-3.png" width="222" /></a></td></tr>
<tr><td class="tr-caption" style="text-align: center;">Don't save over old snapshot</td></tr>
</tbody></table>
<br />
Now, the system will just load the AVD from the one snapshot you created and not save the state each time you exit. This means super speedy launches into a cleanly booted emulator as well as super speedy exits since the snapshot doesn't have to be saved each time.<br />
<br />
You'll start to feel like you don't need to keep the emulators running all the time. You also won't necessarily go looking for a phone each time just to save the emulator boot-up time. (You'll still go after the phone or tablet when debugging for performance or with code bases that are otherwise slow on the emulator or other such reasons.)<br />
<br />
How much difference does it actually make? Here are some test results running on a 6 core 3 GHz desktop with 8GB of RAM and a relatively speedy SSD:<br />
<br />
<ul>
<li>Cold launch of Android 3.0 emulator to a usable state: 4 minutes 35 seconds</li>
<li>Snapshop launch of same Android 3.0 AVD: 8 seconds</li>
</ul>
<br />
That cuts the emulator launch time by 97%. Put another way, the cold launch takes 34 times longer. Taking these steps is well worth the minimal additional effort.<br />
<br />
<br />
Happy Android Coding!Anonymoushttp://www.blogger.com/profile/14247538790892494881noreply@blogger.com26tag:blogger.com,1999:blog-3056106977294330364.post-3750781336036231432011-02-28T08:00:00.032-05:002011-02-28T08:00:04.752-05:00Tip: Installed Application Not Installed ErrorHave you ever loaded up an application, ready to debug, but then seen a message along the lines of, "Application Not Installed" display? This usually has an accompanying LogCat error:<br />
<pre>ActivityManager: java.lang.SecurityException: Permission Denial: starting Intent</pre>
The cause and solution are very simple:<br />
<ul>
<li>This error is most likely caused by a duplicate Activity class entry in the manifest file. </li>
</ul>
<pre style="border: 1px dashed #CCCCCC; font-family: arial; font-size: 12px; height: auto; line-height: 20px; overflow: auto; padding: 0px; text-align: left; width: 99%;"><code style="word-wrap: normal;"> <activity
android:name=".MainActivity"
android:label="@string/app_name">
<intent-filter>
<action
android:name="android.intent.action.MAIN" />
<category
android:name="android.intent.category.LAUNCHER" />
</intent-filter>
</activity>
<!-- lots of stuff -->
<activity
android:name="MainActivity"></activity>
</code></pre>
The solution should be clear by now:<br />
<ul>
<li>Remove the duplicate <activity> tag from the AndroidManifest.xml file </activity></li>
<li>Build the application again</li>
<li>Reload the application</li>
</ul>
<div>
This is quite the opposite of forgetting to add an Activity class to the manifest file. And, yet, it leads to a failure just the same. Proper maintenance of the manifest file is important. It's not a file to mess around with.</div>
<div>
<br /></div>
<div>
Happy Android Coding!</div>Anonymoushttp://www.blogger.com/profile/14247538790892494881noreply@blogger.com7tag:blogger.com,1999:blog-3056106977294330364.post-45902768573688832462011-02-11T08:00:00.003-05:002011-02-11T08:00:03.188-05:00Contacts Contract: Intro and Getting StartedIf you've been using Android awhile, and have used the Contacts feature at all, you may have noticed that when you push your SDK forward a few versions, many of the calls are now listed as deprecated.<br />
<br />
This is because the Android project revamped how the contacts system works in Android 2.0 (API Level 5). The updated system is much more flexible, while also taking a bit more code to use properly. Over at Mobiletuts+, we wrote an article quite a while back that has a quick overview of using the new APIs in context of using the contact picker. <a href="http://goo.gl/PGTzf">Android Essentials: Using the Contact Picker</a> demonstrates how the queries are now often broken up due to increase in the number of internal tables used (or, that's mostly likely the cause).<br />
<br />
You can also directly view the <a href="http://j.mp/blor6N">open source code for this tutorial</a>.Anonymoushttp://www.blogger.com/profile/14247538790892494881noreply@blogger.com1tag:blogger.com,1999:blog-3056106977294330364.post-34435439602260012492011-02-03T08:00:00.019-05:002011-02-03T08:00:26.604-05:00Tip: New Layout Editor Exceptions<div class="separator" style="clear: both; text-align: center;">
</div>
Does your Android Eclipse layout editor look like Figure 1? Does it show "Missing theme." or perhaps an error in the logs (perhaps something to do with "com.android.ide.eclipse.editors.layout.LayoutEditor")? These are frequent occurrences on the very latest Android SDK Tools.<br />
<table align="center" cellpadding="0" cellspacing="0" class="tr-caption-container" style="margin-left: auto; margin-right: auto; text-align: center;"><tbody>
<tr><td style="text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEh-QbIWb7jn-kCsL-zJNU9MLwJdsqlMJ_95iTQea5MkV2v39UlHBFi_uAiCjw8Xj12xGf2vw0aiqZFeV-Wf7M5DCFN6cN2gUgyIIlouBTVQeydjc3_FsBeZKEbewY8rSwb1LTO3ye4MGe11/s1600/layout_editor_1.png" imageanchor="1" style="margin-left: auto; margin-right: auto;"><img border="0" height="259" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEh-QbIWb7jn-kCsL-zJNU9MLwJdsqlMJ_95iTQea5MkV2v39UlHBFi_uAiCjw8Xj12xGf2vw0aiqZFeV-Wf7M5DCFN6cN2gUgyIIlouBTVQeydjc3_FsBeZKEbewY8rSwb1LTO3ye4MGe11/s320/layout_editor_1.png" width="320" /></a></td></tr>
<tr><td class="tr-caption" style="text-align: center;">Figure 1<br />
Layout Editor errors<br />
(Click for large view)</td></tr>
</tbody></table>
If you're having these types of issues, the solution may be simple. See that empty dropdown on the far right? Perhaps it's not empty, but shows the Android version? Yeah, the one highlighted in Figure 2 shown below... Click on this dropdown and pick one of the options.<br />
<table align="center" cellpadding="0" cellspacing="0" class="tr-caption-container" style="margin-left: auto; margin-right: auto; text-align: center;"><tbody>
<tr><td style="text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhoMl3gK73CEpsqcX0gahjdfRw09pHAoNeoZ6Oe7y0erARpNdKplMWgmn5Ldhvm39NBKBcGicsBKYM7j5ulWoP_NnwAuhsqJHPWVxClB8_jJn2xcxtItfwBWOZIrjL6TflkBan7PpDuo8SF/s1600/layout_editor_2.png" imageanchor="1" style="margin-left: auto; margin-right: auto;"><img border="0" height="259" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhoMl3gK73CEpsqcX0gahjdfRw09pHAoNeoZ6Oe7y0erARpNdKplMWgmn5Ldhvm39NBKBcGicsBKYM7j5ulWoP_NnwAuhsqJHPWVxClB8_jJn2xcxtItfwBWOZIrjL6TflkBan7PpDuo8SF/s320/layout_editor_2.png" width="320" /></a></td></tr>
<tr><td class="tr-caption" style="text-align: center;">Figure 2<br />
Layout Editor Drop Down<br />
(Click for large view)</td></tr>
</tbody></table>
Does your layout editor now look like Figure 3? If so, you're all set. If not, you'll need more than just this tip.<br />
<table align="center" cellpadding="0" cellspacing="0" class="tr-caption-container" style="margin-left: auto; margin-right: auto; text-align: center;"><tbody>
<tr><td style="text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEh3L2vGjtgzSR-tApCv6RA21uKdnYhSSa2hB7Fpgw8WjLGl3FdjnaUnLxBnKYCbMDlmBoYieLJgf-wxfYyvYgLbmxwhzb6X9XFt1EnRM2Gpin8XXFwF24L2oGy6D1hQBASVszn1SZ9gpaoK/s1600/layout_editor_3.png" imageanchor="1" style="margin-left: auto; margin-right: auto;"><img border="0" height="259" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEh3L2vGjtgzSR-tApCv6RA21uKdnYhSSa2hB7Fpgw8WjLGl3FdjnaUnLxBnKYCbMDlmBoYieLJgf-wxfYyvYgLbmxwhzb6X9XFt1EnRM2Gpin8XXFwF24L2oGy6D1hQBASVszn1SZ9gpaoK/s320/layout_editor_3.png" width="320" /></a></td></tr>
<tr><td class="tr-caption" style="text-align: center;">Figure 3<br />
Layout Editor, no errors<br />
(Click for large view)</td></tr>
</tbody></table>
Why the new dropdown? We believe that it will show what a layout should look like on various versions of Android platform. So, presumably, you'll want to pick your Target SDK most of the time and if, during testing, you find a problem outside the target SDK, this drop down may help speed up layout debugging.<br />
<br />
Happy Android Coding!Anonymoushttp://www.blogger.com/profile/14247538790892494881noreply@blogger.com5tag:blogger.com,1999:blog-3056106977294330364.post-20904665848790204352011-02-01T08:00:00.001-05:002011-02-01T08:00:01.741-05:00New Feature: Book Code DownloadsMany readers have found it difficult to access the book code downloads from the official publisher site. After some discussion with our editor, we are pleased to inform you that we now have them hosted separately and available for easy, direct download. (No login should be needed and certainly no verification that you own the book. But you already <a href="http://goo.gl/ImAgI">bought it</a>, right? :) )<br />
<br />
In addition to providing a new source for downloading the files, we have also provided a single download for all of the code for each book.<br />
<br />
The download link is convenient found right next to the Home link above, under "<a href="http://goo.gl/QtR3M">Book Code Downloads</a>."<br />
<br />
Happy Android Coding!Anonymoushttp://www.blogger.com/profile/14247538790892494881noreply@blogger.com0tag:blogger.com,1999:blog-3056106977294330364.post-81236672787032419482011-01-28T12:00:00.001-05:002011-01-28T12:00:11.749-05:00Discounted Android Books for Purchase<a href="http://www.amazon.com/Android-Wireless-Application-Development-Developers/dp/0321743016?ie=UTF8&tag=mamlambo-20&link_code=bil&camp=213689&creative=392969" imageanchor="1" style="clear: right; float: right; margin-bottom: 1em; margin-left: 1em;" target="_blank"><img alt="Android Wireless Application Development (2nd Edition) (Developer's Library)" src="http://ws.amazon.com/widgets/q?MarketPlace=US&ServiceVersion=20070822&ID=AsinImage&WS=1&Format=_SL160_&ASIN=0321743016&tag=mamlambo-20" /></a><img alt="" border="0" height="1" src="http://www.assoc-amazon.com/e/ir?t=mamlambo-20&l=bil&camp=213689&creative=392969&o=1&a=0321743016" style="border: none !important; margin: 0px !important; padding: 0px !important;" width="1" />Don't think you'll <a href="http://draft.blogger.com/"><span id="goog_129877394"></span>win a free (signed) copy of Sam's Teach Yourself Android Application Development in 24 Hours from Mobiletuts+<span id="goog_129877395"></span></a>? Already have the Sam's book or the first edition of Android Wireless Application Development, but haven't gotten around to <a href="http://www.amazon.com/Android-Wireless-Application-Development-Developers/dp/0321743016?ie=UTF8&tag=mamlambo-20&link_code=btl&camp=213689&creative=392969" target="_blank">buying the second edition</a><img alt="" border="0" height="1" src="http://www.assoc-amazon.com/e/ir?t=mamlambo-20&l=btl&camp=213689&creative=392969&o=1&a=0321743016" style="border: none !important; margin: 0px !important; padding: 0px !important;" width="1" />?<br />
<br />
Well, InformIT is offering up a discount for the second edition of <a href="http://goo.gl/jt9C9">Android Wireless Application Development</a> -- 40% off with the coupon code ANDROID until March 15, 2011. That's a little better than the regular <a href="http://www.amazon.com/Android-Wireless-Application-Development-Developers/dp/0321743016?ie=UTF8&tag=mamlambo-20&link_code=btl&camp=213689&creative=392969" target="_blank">Amazon</a><img alt="" border="0" height="1" src="http://www.assoc-amazon.com/e/ir?t=mamlambo-20&l=btl&camp=213689&creative=392969&o=1&a=0321743016" style="border: none !important; margin: 0px !important; padding: 0px !important;" width="1" /> price. :)Anonymoushttp://www.blogger.com/profile/14247538790892494881noreply@blogger.com0