Android Account Manager

Android Account Manager

Table of Contents

  • the begging of an Internet mobile app
  • Account Management
  • Demos


1 the begging of an Internet mobile app

The first component that an Internet startup needs to build is its user system. How to expand his users in an easily, convenient and user-friendly way, and how to develop its account system in a scalable method?

The account system is the crucial and the most important part of a company, most of the content and service provider companies always develop its account systems followed the oAuth standard.

There are third party authentication plugins, like stormpath and Auth0 targeted into those account management field, you can build your web app above that service.

For an Android mobile developer, there are already a middle-ware in API level, AccountManager. Take a glance of Account preference in the Setting App, and experience how Gmail, Youtube, and G+ works with multi-shared google accounts and switch between them in a seamless and elegant way.

The OAuth technology and the cloud services, whether full-stack cloud like Parse and Firebase or authenticator targeted cloud like stormpath, Auth0 are out of the scope of my current knowledge, I focused on Android's Account Management on client's level in this article.

2 Account Management

So How Android's Account Management works? Take google's apps as an example, The first time you check into a google app, like Gmail, it will promote you to input a user account, after that, you need not check in again when you use g+ and youtube apps. That's how Android's Account Management works.

Basically, it contains two functions, Account Management, and Data backup.

For Account Management, there is a service which takes charge of authenticating, store the user name and password, and response the authentication token according to the token type request.

Again, take Gmail and youtube for example, when Gmail need network authority, it request auth token with type "Gmail", the google authenticate service then send the request to google's server with a google account, then parser the response and send the auth token back to Gmail, which attach the auth token for every network request. Youtube request the auth token with its type "youtube".

Comments

Popular posts from this blog

Bluedroid stack in android

How to setup a NAT server?

Network programming in elisp