Note that there are some explanatory texts on larger screens.

plurals
  1. POHow exactly Android links AIDL interface and Remote Service?
    primarykey
    data
    text
    <p>To avoid useless answer about how to implement AIDL in your own project - I understand how to use AIDL in your own project. </p> <p>What's unclear for me is how it is used in Android source code? </p> <p>For example, there is IAudioService AIDL interface in android.media package. And there is AudioService java file. And there are a lot of examples where interface is defined in IInterfaceServiceName.aidl and implementation is in InterfaceServiceName.java. So, I thought that internals of AIDL look for Service with the name without first capital I, and then use it. However, this theory was demolished by IWifiManager and WifiService. </p> <p>All of this AIDL implementations, however, share one thing - they all extend IInterfaceName.Stub class. So, that means AIDL internals look for classes extending IInterfaceName.Stub? But what if there are multiple classes extending it? And those classes aren't services at all...</p> <p>Or there is some Service Manager, which somehow creates Services with those AIDL implementations as Binders? If so, please direct me to this mysterious service manager.</p> <p>EDIT: I've found this service manager. It is ServiceManager in package android.os. Now it's understandable why those SomethingService aren't actually services but are actually IBinders - the service manager somehow creates services with given IBinder by method add service(String, IBinder). But now confusion only becomes even worse. The implementation of this service also lies in somewhat strange ServiceManagerNative, which involves remote transaction with unknown IBinder. Now I'm totally lost. How then does this ServiceManager starts itself up? How are the services added by it? </p>
    singulars
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload