Skip to content

Instantly share code, notes, and snippets.

@mfurtak
Created May 17, 2013 17:16
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 1 You must be signed in to fork a gist
  • Save mfurtak/5600546 to your computer and use it in GitHub Desktop.
Save mfurtak/5600546 to your computer and use it in GitHub Desktop.
Notes from the talk, "Android Protips 3" from Google I/O 2013

Android Protips 3

Android Beam

  • Receiver adds intent
  • Can send arbitrary byte data

Lockscreen Widget

  • Specify a different layout for the lockscreen

Context isn't important, it's critical

  • Our phones know a ton about us - we can leverage that for magical experiences
  • Location Based services - Fused Location Provider is much simpler to use
    • Geofencing - sends you a pending intent to monitor entry/exit
  • Activity Recognition - can vary your code (e.g., update rates) based on detecting user activity
    • Standing still vs. running vs. moving quickly (e.g. in a car)
  • Google+ - Can know about the current user (picture, name)
    • We can know about your friends, what they're reading, etc. for recommendations or pre-fetching things your user might want to see
  • Avoiding seeming stalkerish
    • Tell them what you're doing
    • Tell them why
    • Let them opt out
    • Don't transmit or store contact details or location
    • Supply a privacy policy on Play
    • Allow users to delete stored data (including on your servers!)

Crafting a wonderful experience

  • Introducing visceral elements lets people love the app
  • Focus sharply on sight, sound and touch to connect with people
  • Sound
    • Text to speech - might need to get installed, but is simple to call
    • Speech recognition - start an activity to do the listening, get the result back in onActivityResult()
      • Can iterate through likely results to use your context knowledge to pick the best one
  • Touch
    • Touch elements should be based on a 48dp rhythm, 8, 16dp
    • Elements should have have feedback states for all states
    • Accessibility support through contentDescription should be descriptive of the content, not the container (e.g. "Send", not "Button")
    • Use Touch Gestures, including multi-finger detection
  • Google Analytics for mobile - is an API for event tracking, integrates with Play

Don't reveal the magic

  • Eliminate the refresh button, make your data always timely and useful
  • Use Google Cloud Messaging to deliver data from your server to devices, or from device to device
  • Use SyncAdapter to push data from the device to your server
  • Batch your on-demand downloads into the sync process to be more efficient with the radio usage
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment