Android Interface Description Language

Source: Internet
Author: User

AIDL: Android Interface Definition Language, which is the description Language of the Android Interface.

The process in the Android system cannot share memory. Therefore, some mechanisms need to be provided for data communication between different processes.

To enable other applications to access the services provided by this application, Android uses Remote Procedure Call (RPC. Like many other RPC-based solutions, Android uses an Interface Definition Language (IDL) to publish service interfaces. We know that all three of the four Android Application Components (Activity, Broadcast, and Content Provider) can be accessed across processes. The other Android Application Component Service can also be used. Therefore, this kind of service that can be accessed across processes is called the AIDL (Android Interface Definition Language) service.
Edit this section
Procedure for creating an AIDL Service

Creating an AIDL service is more complex than creating a common service. The specific steps are as follows:
(1) Create an aidl file in the Java package directory of the Eclipse Android project. The syntax of this file is similar to Java code, but it will be slightly different. For details, see the instance content.
(2) If the content of the aidl file is correct, ADT will automatically generate a Java interface file (*. java ).
(3) create a Service class ).
(4) Implement the Java interface generated by the aidl file.
(5) In AndroidManifest. configure the AIDL service in the xml file. Note that the value of the android: name attribute in the <action> tag is the ID of the service to be referenced by the client, that is, the parameter value of the Intent class.

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.