Basic knowledge of Android aidl

Source: Internet
Author: User

Concepts of Android support services. The service runs components in the background without a user interface. You can think of these components as Windows or UNIX services. Similar to these services, Android services are always available, but you do not need to perform certain operations.

Android supports two types of services: local services and remote services. The local service cannot run other applications on the device.ProgramAccess. Generally, these service types only support applications that host the service. For remote services, in addition to accessing applications that carry services, you can also access them from other applications. The remote service uses aidl (Android Interface Definition Language) to define itself to the client.

There are two reasons for the concept of Android Support Service. First, simplify the implementation of background tasks. This kind of service is also a local service. Second, Process Communication is executed between applications running on the same device. This kind of service is also a remote service. Important differences between local services and remote services. Specifically, if the service is only used by components in the same process (to run background tasks), the client must call context. startservice () to start the service. This type of service is a local service because it is generally used to run the background tasks of the application that carries the service. If the Service supports the onbind () method, it is a remote service and can communicate between processes.
(Context. bindservice () process call. The remote service is also called the aidl support service because the client uses aidl to communicate with the service.

Local Service implementation: http://byandby.iteye.com/blog/1026110

Aidl service implementation: http://byandby.iteye.com/blog/1026193

Aidl callback method: http://linconz.net/archives/229.html

Related Article

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.