Bootstrap学习 - m1688/Hirebird GitHub Wiki
##Android bootstrap 学习心得
AccountManager provides access to a centralized registry of the user's online accounts
ApiKeyProvider.getAuthKey is used to verify if the user has authorization.
AbstractAccountAuthenticator is extended to add and confirm account and so on.
Abstract base class for creating AccountAuthenticators. In order to be an authenticator one must extend this class, provider implementations for the abstract methods and write a service that returns the result of getIBinder() in the service's onBind(android.content.Intent) when invoked with an intent with action ACTION_AUTHENTICATOR_INTENT. This service must specify the following intent filter and metadata tags in its AndroidManifest.xml file
Bundle : A mapping from String values to various Parcelable types.
An intent is an abstract description of an operation to be performed.
It can be used with startActivity to launch an Activity, broadcastIntent
to send it to any interested BroadcastReceiver components, and startService(Intent)
or bindService(Intent, ServiceConnection, int) to communicate with a background Service.
An Intent provides a facility for performing late runtime binding between the code in different applications. Its most significant use is in the launching of activities, where it can be thought of as the glue between activities. It is basically a passive data structure holding an abstract description of an action to be performed.
TextWatcher : watching the text view
SafeAsyncTask:
public abstract class SafeAsyncTask<ResultT> implements Callable<ResultT>
A Handler allows you to send and process Message and Runnable objects associated with a thread's MessageQueue. Each Handler instance is associated with a single thread and that thread's message queue. When you create a new Handler, it is bound to the thread / message queue of the thread that is creating it -- from that point on, it will deliver messages and runnables to that message queue and execute them as they come out of the message queue.
Notification:
AndroidModule: injected the following services which are able to inject into application
- provideAppContext
- provideDefaultSharedPreferences
- provideTelephonyManager
- provideInputMethodManager
- provideAccountManager
- provideNotificationManager
BootstrapModule: provider the following service
- provideOttoBus
- provideLogoutService
Event bus : it is better to spawn a thread to do labor work