UserDriverManager

public class UserDriverManager
extends Object

java.lang.Object
   ↳ com.google.android.things.userdriver.UserDriverManager


Manager for all user drivers. This class is used to register/unregister user-defined drivers for sensors and input devices.

Summary

Public methods

static UserDriverManager getManager()

Get a UserDriverManager object.

void registerGpsDriver(GpsDriver driver)

Register a GPS driver with the user driver manager.

void registerInputDriver(InputDriver driver)

Register a input driver with the user driver manager.

void registerSensor(UserSensor sensor)

Register a user sensor with the user driver manager.

void unregisterGpsDriver()

Unregister the GPS driver.

void unregisterInputDriver(InputDriver driver)

Unregister an input driver.

void unregisterSensor(UserSensor sensor)

Unregister a sensor driver.

Inherited methods

From class java.lang.Object

Public methods

getManager

</div>

UserDriverManager getManager ()

Get a UserDriverManager object.

Returns
UserDriverManager An instance of a UserDriverManager. If one doesn't exist, it will be created.

registerGpsDriver

void registerGpsDriver (GpsDriver driver)

Register a GPS driver with the user driver manager. There can only be one GPS sensor per device. If the device has a built-in GPS sensor, this method will fail.

Parameters
driver GpsDriver: A GpsDriver driver.

registerInputDriver

void registerInputDriver (InputDriver driver)

Register a input driver with the user driver manager.

Parameters
driver InputDriver: An InputDriver driver.

registerSensor

void registerSensor (UserSensor sensor)

Register a user sensor with the user driver manager.

Parameters
sensor UserSensor: A UserSensor instance.

unregisterGpsDriver

void unregisterGpsDriver ()

Unregister the GPS driver. Only user-defined GPS drivers can be unregistered.

</div>

unregisterInputDriver

</div>

void unregisterInputDriver (InputDriver driver)

Unregister an input driver.

Parameters
driver InputDriver: An InputDriver driver.

</div>

unregisterSensor

</div>

void unregisterSensor (UserSensor sensor)

Unregister a sensor driver.

Parameters
sensor UserSensor: A UserSensor instance.

</div>

results matching ""

    No results matching ""