| java.lang.Object | |
| ↳ | com.datalogic.device.configuration.PoseManager |
The PoseManager provides all classes and methods that allow to register different
device poses (characterized by a unique name and gravity vector) and associate to them actions
that will be executed when the device finds itself inside or outside any device pose.
It also provides APIs to:
retrieveGravityVector())
or asynchronously (retrieveGravityVector(GravityVectorRetrievalListener)).addPoseChangeEventListener(PoseChangeEventListener)) and
unregister (removePoseChangeEventListener(PoseChangeEventListener)) listeners
for pose change events.POSE_MANAGER_DEVICE_POSES) containing the pose
definitions and their associated settings.| Nested Classes | |||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|
| PoseManager.ActivationOption | Class representing an option of activation applied to a pose setting. | ||||||||||
| PoseManager.DevicePoses | Represents a collection of configured device poses. | ||||||||||
| PoseManager.ExecutionOption | Class representing an execution step applied to a pose setting. | ||||||||||
| PoseManager.GravityVector | Represents a 3D gravity vector with X, Y, and Z components. | ||||||||||
| PoseManager.GravityVectorRetrievalListener | Listener interface used to retrieve a gravity vector asynchronously from the Pose Manager. | ||||||||||
| PoseManager.Pose | Represents a single device pose, defined by a name, gravity vector and associated settings. | ||||||||||
| PoseManager.PoseChangeEventListener | Listener interface used to receive notifications when the device enters or exits a pose. | ||||||||||
| PoseManager.PoseSettings | Settings related to a specific pose, they are assigned to the pose itself with:
|
||||||||||
| Public Constructors | |||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|
Constructor for the Pose Manager object.
| |||||||||||
| Public Methods | |||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|
Register a listener to receive notifications when the device enters or exits a pose.
| |||||||||||
Unregister a listener to receive notifications when the device enters or exits a pose.
| |||||||||||
Retrieve the current gravity vector synchronously.
| |||||||||||
Retrieve the current gravity vector asynchronously.
| |||||||||||
|
[Expand]
Inherited Methods | |||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|
From class
java.lang.Object
| |||||||||||
Constructor for the Pose Manager object.
| DeviceException | In case the Pose Manager service cannot be found in this device. |
|---|---|
| Exception |
Register a listener to receive notifications when the device enters or exits a pose.
| listener | The listener to register. |
|---|
true if the listener was successfully registered, false otherwise.
Unregister a listener to receive notifications when the device enters or exits a pose.
| listener | The listener to unregister. |
|---|
true if the listener was successfully unregistered, false otherwise.
Retrieve the current gravity vector synchronously.
This method requires a calibration process that takes some time to execute (at most 10 seconds) and
requires the device to be stationary for an optimal result.
PoseManager.GravityVector, or INVALID in case of failure during
the procedure and the exceptions are not enabled through the ErrorManager.| DeviceException | In case of failures, if the exceptions are enabled through the ErrorManager.
|
|---|
Retrieve the current gravity vector asynchronously.
This method requires a calibration process that takes some time to execute (at most 10 seconds) and
requires the device to be stationary for an optimal result.
The provided listener will be notified once the gravity vector has been retrieved.
| listener | The listener to notify when the gravity vector is available. |
|---|
SUCCESS in case the call succeeded, otherwise it returns
an error code from the DeviceException error codes, if the exceptions are not enabled through
the ErrorManager.| DeviceException | In case of failures, if the exceptions are enabled through the ErrorManager.
|
|---|