Remote Methods and AIDL

This section describes how one program can provide other programs with access to its methods. A number of important Android APIs use this feature. For instance, the TelephonyManager introduced in Chapter 15 uses a remote object interface in order to manage and share the phone hardware in an Android device.

There are three steps to creating and using remote methods in Android:

1. Define the interface in the AIDL.

2. Implement the interface. That is, write methods that match the signatures in the interface and that perform the operations you want in the program that provides the desired services.

3. Invoke the methods where you want to use them.

0 0

Post a comment