Android-AIDL篇
一、基础知识
目录-纲要
创建绑定服务Service编写。
绑定到服务
AIDL Android Interface Definition Language AIDL
创建.aidl文件 Create the .aidl file
实现接口 Implement the interface
向客户端公开接口 Expose the interface to clients
1、You must include an import statement for each additional type not listed above, even if they are defined in the same package as your interface.
2、ach .aidl file must define a single interface and requires only the interface declaration and method signatures.
A client binds to a service by calling bindService().
When it does, it must provide an implementation of ServiceConnection,
which monitors the connection with the service.
A client binds to a service by calling bindService(). When it does, it must provide an implementation of ServiceConnection, which monitors the connection with the service. The return value of bindService() indicates whether the requested service exists and whether the client is permitted access to it. When the Android system creates the connection between the client and service, it calls onServiceConnected() on the ServiceConnection.
The onServiceConnected() method includes an IBinder argument, which the client then uses to communicate with the bound service.
When the last client unbinds from the service,
the system destroys the service, unless the service was also started by startService().
二、实践
Service
Client
