Different drivers may require different permissions. If you aren't sure
which permissions are required for a specific driver, locate the driver's
README file. See User-Space Drivers
for more information.

Initialize the driver class with the appropriate Peripheral I/O resources.

Bind to the framework

The driver library includes user drivers
for supported peripheral types. When these drivers are available, they allow
your app to interact with the standard Android framework APIs instead of the
Peripheral I/O APIs.

The following code registers a ButtonInputDriver peripheral as a key input with
the framework. The driver will generate key events using the provided key code
each time the button is pressed or released.