73 Photos - Jun 24, 2012
Photo: "Making Good Apps Great" by Reto Meier (Google I/O 2012)Photo: A great app is one whose users aren't thinking about using an app, on a smartphone, connected to the Internet over 3G; they just perform an action or use a service.Photo: In Kenya, mobiles aren't "finding the best noodles in Nairobi" important -- they're "the only way I get online" important. They're "send a cute guy/girl at a bar phone credit rather than a drink" important.Photo: With smartphone penetration growing, strangely many people still don't self-identify as mobile Internet users. Why?Photo: When you mobile is how you get online and flirt, it changes your perceptions of the device, and the apps running on it. Some people would rather choose a plan with unlimited social networking updates than unlimited Internet access.Photo: How do you make an app more valuable than Internet access?Photo: Hide your implementation and data transport details.Photo: With Gmail, I don't need to know if I'm online or not. It just works.Photo: Photo: Create something original that's consistent with the Android aesthetic.Photo: Review the Android Design guidlines at http://developer.android.com/design, and learn to think like an Android designer.Photo: Keep it simple so your app becomes associated with being the best / easiest / fastest way to accomplish a particular action.Photo: Don't optimize your layout for different screens, figure out the best user experience for a user to accompish the action your app provides based on the hardware availale.Photo: Don't restrict your app based on hardware features (or lack there-of).Photo: Use the Package Manager to determine what hardware is available at runtime, and modify your UI accordingly.Photo: We're talking about efficiency in terms of power use -- particularly in relation to the cell radio.Photo: One of the biggest sources of battery drain is apps' inefficient use of the cell radio.Photo: Reducing the size and frequency of your transfers is critical, but can altering the timing of your transfers help?Photo: The Cookie Droid Conundrum: Eat "lots of little cookies" -- initiating lots of small transfers as required, or "one big cookie" -- scheduling few, large, and preemptive downloads?Photo: Unfortunately my metaphor doesn't exent to the Cookie Droid solution of eating ALL the cookies!Photo: The little cookie approach resembles my college experience -- doing things only when you know they're absolutely necessary.Photo: Cell radio efficiencies, like college grades, are better served by doing things you're likely to need ahead of time.Photo: The cell radio state machine is optimized to provide low latency browsing without draining the battery.Photo: The exact duration of each "tail-time" (the delay before the radio transisions to a lower battery consumption state) varies by carrier, based on their network location, the radio technology, and other factors.Photo: Fortunately you do NOT need an equation like this to determine the best timings for your transfers.Photo: When you finish transfering data (blue), the radio will stay in high power mode for some time (red) after which it will transfer to low power (yellow), where it will remain for up to a minute before returning to an idle state (green). Note that in this example, the radio is draining the battery whenever the app is running!Photo: Improve your battery life by defragmenting your network traffic using prefetching, bundling, and bundling.Photo: Note that by batching the periodic transfers and perfecting the intermittent requests, the cell radio idle time is dramatically increased.Photo: Defragmenting the traffic results in the battery being idle for 63% of the time versus 0%.Photo: There are a number of tools available to determine your app's cell radio use profile.Photo: Use the TrafficStats class to tag each socket for identification within the Network Statistics tab of DDMS.Photo: If you're using a HttpClient, tagging the thread will automatically tag the associated socket.Photo: Look for short spikes (both in height and duration). These represent "poor value" transfers of small amounts of data for relatively high battery cost.Photo: Periodic transfers ensure the radio is using battery at *at best* a fixed proportion of your app's running time.Photo: Nearby, but non-overlappying, transfers represent opportunities to optimize by having them coincide.Photo: Nearby, but non-overlappying, transfers represent opportunities to optimize by having them coincide.Photo: Carriers need to balance low latency with high battery life. Developers / users want maximum battery and no latency.Photo: Prefetching allows you to reduce latency to zero, while improving battery life.Photo: Use analytics to prefetch data that is most likely to be used.Photo: Transfer more data on 4G networks to account for higher transfer rates and battery cost. Conversly, transfer less data on 2G networks.Photo: For time insensitive transfers, batch and queue then so they can be bundled them prefetches.Photo: When you transfer your time insensitive downloads, execute any upcoming prefetches to eliminate the tail-time cost associated with each independent transfer.Photo: When you execute time sensitive transfers, use the opportunity to dispatch your batched queue and impending prefetch.Photo: Minimize the effect of regular updates by making them irregular and infrequent.Photo: Use inexact repeating alarms to let the framework phase-shift alarms so they are executed at the same time as other apps.Photo: Use an inactivity back-off to decrease the frequency of background updates based on the recency of app usage. If the app hasn't been used since your last update, wait longer until performing the next scheduled update.Photo: The data costs associated with failed transfers can be significant.Photo: Even if data isn't significant, the battery cost of the associated radio use can be.Photo: Increase the interval between retries using an exponential backoff.Photo: Eliminate polling altogether in favour of Google Cloud Messaging! Register your device with GCM and your server.Photo: Replace background polling with real-time updates transmitted to your device directly from your server when new data is available, via the Google Cloud Messaging servers.Photo: GCM is available for Andorid 2.2+ devices, has no quota limits, and a simplified authentication story compared to C2DM (which it replaces).Photo: Redundant Captions are RedundantPhoto: The internal application sandbox cache is system managed, meaning the framework will delete items from your cache for you when it is under resource pressure.Photo: Inspect HTTP Headers to detemine when data expires and when it was last updated.Photo: Use the HTTP Response Cache on Android 4.0+ devices to get a managed cache that does the hard work for you.Photo: More details at http://developer.android.com/training/efficient-downloadsPhoto: Unless your water stops flowing or your power is cut off, you take it for granted. A great app lets its users take it for granted.Photo: Strict Mode and Lint offer the feedback provided by a great peer reviewer, without the self-loathing and recriminations.Photo: When testing on real hardware pick devices across a range of screens and hardware types (keyboards, touchscreens, etc.)Photo: If your funds are limited, focus on the buckets that contain most users.Photo: Don't neglect the next "big buckets" based on the devices launched today that will represent the largest market segments in the future.Photo: Build great UIs for every bucket using the Supporting Multiple Screens guide at http://developer.android.com/guide/practices/screens_support.htmlPhoto: For user-testing, pick the friend whose device you keep switching back from Swahili to English. They will find *all* your edge cases.Photo: Android is now more than just a smartphone development platform.Photo: The huge install base of Android smartphones make them an incredible opportunity.Photo: The growing range of tablets represent an exciting opportunity for the future.Photo: Make your apps invisible, efficient, and stable...Photo: ...and your user won't use the Internet on their phones...Photo: ...they'll be using your app!Photo: The equipment I used to deliver my session this year was a Nexus 7 tablet connected to a Transformer Prime via Bluetooth.Photo: The Transformer Prime output the slides to the projector over HDMI, and I connected a USB clicker to transition between slides within a custom app. The app transmitted each transition to a Nexus 7 connected over Bluetooth which displayed a countdown timer and my speaker notes. The slides themselves were created in Powerpoint and exported as a sequence of .PNG files.Photo: