Aidl (Android Interface Definition Language)
Description
Allows cross-process access between Android applications. Using aidl technology means that other applications of the system can access the service components of their own applications. Android supports cross-process access in two ways: aidl and messenger. The difference between the two is that the former can process multiple threads, and the latter can only process single threads. Therefore, thread security must be ensured when aidl is used.
Define remote service interfaces
1.Create the. aidl File(Create an aidl file)
Create an aidl file in the src directory of the project and define the interface in the file.
2.Implement the interface(Implementation Interface)
Implement the aidl interface in the service class
3.Expose the interface to clients(Expose the interface to the client)
Method for binding a remote interface object
1. Copy the aidl interface file
2. Bind a remote service
3. Obtain the remote service interface object instance
4. Call the process Service Interface Method
Instance project download link http://download.csdn.net/detail/u010739551/7705575
For more information, see the aidl (2) blog.