Upgrade to Pro — share decks privately, control downloads, hide ads and more …

Delight and Surprise - Making the most of user data on Android

Delight and Surprise - Making the most of user data on Android

Smartphones provide a massive amount of data for application developers. You can get the users contacts, location, photos of their friends and a whole range of other useful information.

This talk will look at how you can use the data to save the user work and sometimes surprise them!

It will dive fairly deeply into data usage on Android, including looking at content providers, the media framework and intents. There will be some code to explain how to use these features, however it should also be suitable for non-developers who want to know what's possible on the platform.

matto1990

June 04, 2012
Tweet

More Decks by matto1990

Other Decks in Technology

Transcript

  1. User data • Loads of data already on the phone

    to use • Its personal to the user • Contacts • Accounts • Relevant to now • Location • Calendar
  2. Why bother? • Customise your app to the user from

    first run • Save the user time by predicting actions • Surprise them with what you know • (be careful not to scare them!)
  3. Explicit Intents • Every app uses them • Explicitly says

    what activity you want to go to • Should only be used internally in an app • Don’t use between apps
  4. Generic Intent • Can request other applications open • Opens

    the most relevant application • User can choose which they want to open if they have more than one • App can also get a result back for the opened application • You don’t even need to know what the application you’re opening is
  5. Web URLs • Can open one of your activities by

    going to a url • Will open if the user clicks a link in their browser (or another app) • Useful if you have a web version of your app that people might link to that you want the native app to take over from
  6. Why? • A lot of apps ask for email as

    a login • Email addresses are long and sometimes complicated! • Most users will already have an account signed in on the phone • You can therefore ask for access to their email addresses, and save them the typing
  7. Shiny new way to do it • Available from 4.0

    and up (ICS) • Phone profile • Permission required • android.permission.READ_PROFILE • Users will have to have filled out their profile. Which Android tries to get them to do on first startup
  8. Pre-ICS Method • Available from 2.0 and up (Eclair) •

    As of 1st May 2012 that’s 99% of users • Account information is stored on the phone • Can read the name of the account, which is the email • Required permission • android.permission.GET_ACCOUNTS
  9. Never roll your own • Android has an amazing sharing

    framework • Apps state that they are able to share data of a certain type • Twitter sharing text and images • Dropbox can handle any file or text • Other apps say they have data to share • The user is presented with a list of all apps that can handle that data • The apps they have installed are likely the only ones they care about
  10. Media • Photos for example • Can call other apps

    when you want users to pick media • Can get other apps to open your app to choose data from your service • Could be used if you have photos/video which isn’t on the device but the user might want
  11. What? • They provide access to content (durrr) • They

    can be used across applications • One app can provide data to another • They are used for data that’s built into Android • Messages • Contacts • Calendar • Media (Music, photos etc.)
  12. Contacts • You should use this whenever the user is

    entering the name or email of a friend • Saves them typing • They’re more likely to type people in if it’s easy • Can enhance the view with the friends profile picture
  13. Calendar • You know what the user is up (or

    meant to be) right now • Can use the event location to tailor data • Would be great for weather apps • Can tell users what the weather is at each of their events
  14. Where art thou? • Can tailor search results based on

    the current location • Great for anything to do with local businesses or events • Really well used • Fairly tricky to do it right
  15. Do it! • Lots of ways to get data •

    Tailor you app based on the users data • Tailor your app to current condition • Location • Even a barometer (?!?!?)