1

Talking in the context of the third snippet of code given on this page, there is a method of a Messenger named getBinder() which returns the IBinder the Messenger is using to communicate with the associated Handler.

Now why would we need an IBinder for the Messenger to communicate with the Handler, when a Messenger is a reference to the Handler, and both are created in the same class?

Onik
  • 19,396
  • 14
  • 68
  • 91
Solace
  • 8,612
  • 22
  • 95
  • 183

1 Answers1

1

Messenger does "message-based communication across processes". Binder is "lightweight remote procedure call mechanism". Almost everything in android that sends data between processes uses Binders.

Leonidos
  • 10,482
  • 2
  • 28
  • 37