5. ?AIDL?
• Android Interface Definition Language
• Main approach is IPC (Inter-Process
Communication)
• Support types:
All primitive types, CharSequence & String, List
& Map, Parcelable class
7. How AIDL solve IPC
issue
Memories of
Process A
Process B of
Process B
Linux Kernel & Binder Driver
Access Access
8. Write Your AIDL File
• Write *.aidl for your AIDL interface
• You can turn your Parcelable Class into AIDL
• Include if you use Other AIDL class/interface
• Note:
List will become ArrayList in another side
Map will become HashMap in another side
(WHY?)
17. • IInterface: Basic interface can be used for IPC
• android.os.IBinder: Core class of IPC
• Use YourInterface.asInterface(IBinder) to case IBinder
to YourInterface.
• Use IBinder.queryLocalInterface() to know if this
IBinder is in local or remote.
• If IBinder is in local, call function directly.
• If IBinder is a remote object, use transact and parcel to
call function.
Let’s see the source code…