Android inter-process communication and inter-thread communication listed

This article is cited inter-process communication between Android and Android thread common means of communication, but please forgive me, or to achieve specific principles can be found in other blog.

Android IPC

  1. Intent way communication Bundle
  2. Broadcast mode
  3. File sharing the way
  4. AIDL way (based on Binder)
  5. Messenger mode (AIDL + Handler Message way)
  6. ContentProvider way
  7. Socket (network)

Android Inter-thread communication

Room (1) refers to a narrow thread communication: a communication sub-thread of the main thread. There are four common ways are as follows:

  1. Handler way
  2. runOnUiThread way
  3. View.post (Runnable r) mode
  4. AsyncTask way

(2) between the broad-thread communication means: interactive, communications applications within the four components of each class. Including but not limited to, the following manner:

  1. Global variables (note concurrent processing - single embodiment, volatile)
  2. Callback Interface
  3. EventBus
  4. RxJava achieve similar functionality EventBus
Published 55 original articles · won praise 61 · views 20000 +

Guess you like

Origin blog.csdn.net/Agg_bin/article/details/103212525