You can understand it with one simple example of multiply two numbers , for this
I have made two projects name AIDLServiceProject and AIDLServiceClient.
In AIDLServiceProject, I have written core to multiply two numbers.
In AIDLServiceClient, I have passed two numbers to multiply.
IMultiplierService.aidl in projects will be common for both project for interaction and will be in same package name so that both AIDLServiceProject and AIDLServiceClient can interact each other.
For running the project , firstly run AIDLServiceProject so that service will start and after that run AIDLServiceClient.
Download the code