영어에서 Aidl 을 사용하는 예와 한국어로 번역
{-}
-
Colloquial
-
Ecclesiastic
-
Ecclesiastic
-
Programming
-
Computer
The AIDL file.
Aidl file to your build.
Only methods are supported; you cannot expose static fields in AIDL.
Aidl file name, but with a.
Similar to a header file in the C language, this. aidl file isn't compiled.
Using AIDL to Support IPC for Services 356.
There are a few rules you should be aware of when implementing your AIDL interface.
By default, AIDL supports the following data types.
Regardless, be sure that you understand Bound Services before implementing an AIDL.
Include the. aidl file in the project src/ directory.
Usually the IBinder returned is for a complex interface that has been written in aidl.
Aidl file and save it in the project's gen/ directory.
In other words, an implementation of an AIDL interface must be completely thread-safe.
If this is your main UI thread, that thread continues to execute in the AIDL interface.
Aidl file must define a single interface and requires only the interface declaration and method signatures.
Here are the steps a calling class must take to call a remote interface defined with AIDL.
Java extension(for example,IRemoteService. aidl results in IRemoteService. java).
To use AIDL directly, you must create an. aidl file that defines the programming interface.
Implement the interface The Android SDK tools generate an interface in the Java programming language, based on your. aidl file.
Aidl file, so that your code can link against the generated class.
This interface has an inner abstract class named Stub that extends Binder and implements methods from your AIDL interface.
Finally, create an. aidl file that declares your parcelable class(as shown for the Rect. aidl file, below).
Here is an example implementation of an interface called IRemoteService(defined by the IRemoteService. aidl example, above) using an anonymous instance.
As such, AIDL is not suitable for most applications and this document does not discuss how to use it for your service.
The generated interface includes a subclass named Stub that is an abstract implementation ofits parent interface(for example, YourInterface. Stub) and declares all the methods from the. aidl file.
Before you begin designing your AIDL interface, be aware that calls to an AIDL interface are direct function calls.
Aidl file are included in the generated IBinder interface(except for comments before the import and package statements).
Aidl, extend the generated Binder interface(for example, YourInterface. Stub) and implement the methods inherited from the. aidl file.
Note: Using AIDL is necessary only if you allow clients from different applications to access your service for IPC and want to handle multithreading in your service.
Aidl file using the Java programming language syntax, then save it in the source code(in the src/ directory) of both the application hosting the service and any other application that binds to the service.