> For the complete documentation index, see [llms.txt](https://notes.tejpratapsingh.com/android-tips/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://notes.tejpratapsingh.com/android-tips/aidl/simple-aidl-communication/creating-an-aidl-file.md).

# Creating an AIDL file

1. Enable build feature in your `build.gradle`.

   ```java
   buildFeatures {
    aidl = true
   }
   ```
2. Create a new AIDL file using `File` -> `New` -> `AIDL` -> `AIDL File`
3. Let's name it `ICalculator.aidl`
4. Declare aidl methods:

   ```kotlin
    interface IExampleAidlInterface {
        int add(int a, int b);
    }
   ```
