java.lang.Object | |
↳ | com.datalogic.softspot.SoftSpot |
API to configure SoftSpot. All X/Y coordinates are based at the top-left of the screen. The left of the screen is where X is 0, and the top of the screen is where Y is 0.
Nested Classes | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
SoftSpot.Point | X/Y screen coordinates. | ||||||||||
SoftSpot.WorkingArea | Constraints defining the frame to restrict SoftSpot's movement. |
Constants | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
long | TIMEOUT_MILLIS | API will return the last known value if SoftSpot does not respond before the timeout. |
Public Constructors | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
Create an object to communicate with SoftSpot.
|
Public Methods | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
Delete the custom image for the given ImageEnum.
| |||||||||||
Reset the working area to the whole screen.
| |||||||||||
Get the image in use for the given ActionType and ImageState values.
| |||||||||||
Get current lock state (can I move it around the screen on finger drag?)
| |||||||||||
Current X/Y position
| |||||||||||
Maximum X/Y position
Changing scale will change this value. | |||||||||||
Minimum X/Y position
Changing scale will change this value. | |||||||||||
Current scale multiplier
| |||||||||||
Maximum scale multiplier
| |||||||||||
Minimum scale multiplier
| |||||||||||
Is vibration enabled when using SoftSpot?
| |||||||||||
Get Area that SoftSpot can move within
| |||||||||||
Hide SoftSpot.
| |||||||||||
When SoftSpot is enabled then it will either be currently showing, or a
notification is available to show.
| |||||||||||
Set lock state of SoftSpot, it impacts SoftSpot motion ability on finger dragging events.
| |||||||||||
Copy the image in the byte array, then assigns the custom imageEnum to use that image.
| |||||||||||
Copy the image located at the given filepath, then assigns the custom imageEnum to use that image.
| |||||||||||
Set the duration for how long the decoded image should be displayed
on screen after a good read before switching back to the
NORMAL image. | |||||||||||
Set the current enabled state of SoftSpot.
| |||||||||||
Set the image to use when SoftSpot has the given ActionType and ImageState values.
| |||||||||||
Move SoftSpot
| |||||||||||
Set the scale multiplier used for SoftSpot size.
| |||||||||||
Toggle the vibrator on or off when SoftSpot is pressed or moved.
| |||||||||||
Restrict SoftSpot to a square region on the screen
| |||||||||||
Show SoftSpot.
|
[Expand]
Inherited Methods | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
From class
java.lang.Object
|
API will return the last known value if SoftSpot does not respond before the timeout.
Create an object to communicate with SoftSpot.
ctx | Required for broadcasting to SoftSpot. |
---|
Delete the custom image for the given ImageEnum.
It's icon will be changed back to the default number icons.
imageEnum | The slot for the custom image to be deleted. Must be a custom slot. |
---|
Get the image in use for the given ActionType and ImageState values.
actionType | The type of action to retreive an image for. |
---|---|
imageState | The state of the image to retrieve the image for. |
Get current lock state (can I move it around the screen on finger drag?)
Current X/Y position
Maximum X/Y position
Changing scale will change this value.
Minimum X/Y position
Changing scale will change this value.
Current scale multiplier
Maximum scale multiplier
Minimum scale multiplier
Is vibration enabled when using SoftSpot?
Get Area that SoftSpot can move within
Hide SoftSpot. A notification will be available to show again. If SoftSpot is not enabled, this will have no effect.
When SoftSpot is enabled then it will either be currently showing, or a notification is available to show.
Set lock state of SoftSpot, it impacts SoftSpot motion ability on finger dragging events.
lockVal | Pass in 'true' to keep SoftSpot locked to its current position. Pass in 'false' to allow SoftSpot to be moved around the screen. |
---|
Copy the image in the byte array, then assigns the custom imageEnum to use that image.< Image will be downsampled if too large.
imageEnum | The ImageEnum to set the new image to. Must be a custom slot. |
---|---|
data | Byte array containing the image to be copied. |
NullPointerException |
---|
Copy the image located at the given filepath, then assigns the custom imageEnum to use that image.< Image will be downsampled if too large.
imageEnum | The ImageEnum to set the new image to. Must be a custom slot. |
---|---|
imageFile | Image in external storage to be copied. |
FileNotFoundException |
---|
Set the duration for how long the decoded image should be displayed
on screen after a good read before switching back to the NORMAL
image.
decodedDuration | Enum value representing the number of seconds to display the 'decoded' image for. |
---|
Set the current enabled state of SoftSpot.
enable | True to enable SoftSpot, false to disable SoftSpot. |
---|
Set the image to use when SoftSpot has the given ActionType and ImageState values.
actionType | The type of action to set an image for. |
---|---|
imageState | The state of the image for which the image should be set. |
imageEnum | The image to set as active. |
Move SoftSpot
point | X and Y coordinates to set as the center of SoftSpot. |
---|
Set the scale multiplier used for SoftSpot size.
scalar | Scale multiplier to set SoftSpot size. A value that is not between the minimum and maximum will be ignored. |
---|
Toggle the vibrator on or off when SoftSpot is pressed or moved. Also, vibrate when SoftSpot is used to launch an application.
enable | set to true to enable vibrator. set to false to disable vibrator. |
---|
Restrict SoftSpot to a square region on the screen
area | WorkingArea describing how to restrict SoftSpot. |
---|
Show SoftSpot. If SoftSpot is not enabled, this will have no effect.