Android Aidl RPC mechanism

Source: Internet
Author: User

Aidl is an interface profile used to implement RPC above the Android platform, which is automatically used by rules for IPC interfaces and objects at compile time, but as a user only needs to

Implement Interface 2 on the server side Bindservice onserviceconnected when the client gets the interface object, where the interface is the interface described in Aidl, the other details are aidl into the same name as the source file

There is an interface in which the method that is defined in the Aidl file is a stub that is the base class to be implemented on the service side, and a proxy for the relationship between them.




In essence, the AIDL function is to encapsulate the Binder's two methods: Binder.transact () and BINDER.ONTRANSCT () for use by the client side and server side, as it implements Transact () and The Ontransact () method is basically the same way, so you can use the template to generate the specific code, in theory, only need to generate transact () related code for the client side, generate Ontransact () code for the server is available,


There is something wrong with this article.


Android Aidl RPC mechanism

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.