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

Differences of AccountManager from API 22 to 24

sho5nn
January 19, 2017

Differences of AccountManager from API 22 to 24

sho5nn

January 19, 2017

Transcript

31 slides
  1. AccountManager - Accessor https://developer.android.com/reference/android/accounts/AccountManager.html android.accounts.AccountManager public class AccountManager { public

    AccountManagerFuture<Bundle> addAccount(String accountType, ...) public AccountManagerFuture<Bundle> getAuthToken(Account account, ...)
  2. AccountManager - Mechanism for managing accounts authenticator com.sample app app

    1/3 Manage accounts at one app, Access accounts from one app.
  3. AccountManager - Mechanism for managing accounts authenticator com.sample app app

    getAuthToken (com.sample) token getAuthToken (com.sample) token 2/3 Manage accounts at one app, Access accounts from multiple app.
  4. AccountManager - Mechanism for managing accounts authenticator com.sample app com.sample

    app com.sample getAuthToken (com.sample) token getAuthToken (com.sample) token 3/3 Manage accounts at multiple app, Access accounts from multiple app. First installed app Second installed app Third installed app
  5. AccountManager - Mechanism for managing accounts authenticator com.sample app com.sample

    app com.sample getAuthToken (com.sample) token getAuthToken (com.sample) token Uninstall... Second installed app Third installed app 3/3 Manage accounts at multiple app, Access accounts from multiple app.
  6. AccountManager - Mechanism for managing accounts authenticator com.sample app com.sample

    getAuthToken (com.sample) token Second installed app Third installed app 3/3 Manage accounts at multiple app, Access accounts from multiple app.
  7. Diff API 22 to 23 - Permissions Removed. • android.Manifest.permission.AUTHENTICATE_ACCOUNTS

    • android.Manifest.permission.MANAGE_ACCOUNTS • android.Manifest.permission.USE_CREDENTIALS Not removed. • android.Manifest.permission.GET_ACCOUNTS
  8. Diff API 22 to 23 - Permissions authenticator com.sample app

    com.sample app com.sample First installed app Second installed app Third installed app Denied GET_ACCOUNTS Account[] accounts = accountManager.getAccountsByType(“com.sample”); // accounts.length == 3 Denied GET_ACCOUNTS
  9. Diff API 22 to 23 - Permissions authenticator com.sample app

    com.sample app com.sample First installed app Second installed app Third installed app Account[] accounts = accountManager.getAccountsByType(“com.sample”); // accounts.length == 0 Denied GET_ACCOUNTS Denied GET_ACCOUNTS
  10. Diff API 22 to 23 - Permissions authenticator com.sample app

    com.sample app com.sample First installed app Second installed app Third installed app Account[] accounts = accountManager.getAccountsByType(“com.sample”); // accounts.length == 3 Denied GET_ACCOUNTS Granted GET_ACCOUNTS
  11. Diff API 23 to 24 - Not inherit accounts On

    API 23 and before authenticator com.sample app com.sample app com.sample First installed app Second installed app Third installed app account 1 account 2
  12. app com.sample app com.sample Uninstall... Second installed app Third installed

    app account 1 account 2 authenticator com.sample Diff API 23 to 24 - Not inherit accounts On API 23 and before
  13. authenticator com.sample app com.sample Second installed app Third installed app

    account 1 account 2 Diff API 23 to 24 - Not inherit accounts On API 23 and before
  14. authenticator com.sample app com.sample Second installed app Third installed app

    account 1 account 2 Diff API 23 to 24 - Not inherit accounts On API 23 and before
  15. authenticator com.sample app com.sample app com.sample First installed app Second

    installed app Third installed app account 1 account 2 Diff API 23 to 24 - Not inherit accounts On API 24 and after
  16. On API 24 and after app com.sample app com.sample Uninstall...

    Second installed app Third installed app account 1 account 2 authenticator com.sample Diff API 23 to 24 - Not inherit accounts
  17. authenticator com.sample app com.sample Second installed app Third installed app

    Diff API 23 to 24 - Not inherit accounts On API 24 and after
  18. authenticator com.sample app com.sample Second installed app Third installed app

    On API 24 and after Diff API 23 to 24 - Not inherit accounts empty...

More Decks by sho5nn

Other Decks in Technology