0

My understanding of the difference between a messenger and an AIDL is that both are used for inter process communication but the former one is used when thread safety has to be ensured implicitly.Messenger creates a queue and each request is processed one by one while in case of the latter one the developer has to explicitly ensure thread safety.Can someone please explain me the scenarios/usecases depicting the difference between AIDL and a messenger?Please give me specific usecases.

JavaN00b
  • 69
  • 1
  • 8

1 Answers1

0

Read this answer it is quite clearly giving the details of AIDL.

I also searched alot on this when learning and found this useful for me back then so sharing with you.

This article helped me on getting the basics of AIDL, pretty well.

AIDL vs Messenger Queue : as far as i could understand it (my be i did get it wrong, so anyone who knows better can correct me) AIDL is for purpose when you've to go application level communication for data and control sharing, a scenario depicting it can be : An app requires list of all contacts from Contacts app (content part lies here) plus it also wants to show the call's duration and you can also disconnect it from that app (control part lies here).

In Messenger queues you're more IN the application and working on threads and processes to manage the queue having messages so no Outside services interference here.

enter image description here

Community
  • 1
  • 1
mfaisalhyder
  • 2,250
  • 3
  • 28
  • 38