Amazon Developer

as

Settings
Sign out
Notifications
Alexa
Amazon Appstore
Ring
AWS
Documentation
Support
Contact Us
My Cases
Get Started
Design and Develop
Publish
Reference
Support
Native
Skip to main content

Interface ITouchPoint

interface ITouchPoint
Extends com.amazon.apmf.IStandard Interface which defines a touchpoint

Methods

id()

i32 id()

Returns

i32 the touchpoint ID. Please note, ID could be reused after a cancel or end event (i.e release event)

state()

TouchPointState state()

Returns

TouchPointState the touchpoint state e.g. PRESSED, RELEASED, UPDATED etc.

timestamp()

com.amazon.apmf.MonotonicInstant timestamp()

Returns

com.amazon.apmf.MonotonicInstant touch event’s most recent time stamp when either it was pressed or released or it’s position changed. This might be different than IInputEvent.timestamp().

currentPosInPixel()

PointF currentPosInPixel()

Returns

PointF current position of the touchpoint in surface local coordinate in logical pixel unit.

pressedPosInPixel()

PointF pressedPosInPixel()

Returns

PointF pressed position of the touchpoint in surface local coordinate in logical pixel unit.

majorAxisLengthInPixel()

double majorAxisLengthInPixel()

Returns

double shape of a touchpoint. A touchpoint shape is approximated by an ellipse through the major and minor axis length. The major axis length describes the longer diameter of the ellipse, while the minor axis length describes the shorter diameter. Major and minor are orthogonal and both are specified in surface-local coordinates. The center of the ellipse is always at the touchpoint location as reported by currentPosInPixel() function. Some hardware may not support it and in that case, zero is returned.

minorAxisLengthInPixel()

double minorAxisLengthInPixel()

Returns

double the minor axis length. Some hardware may not support it and in that case, zero is returned.

orientation()

double orientation()

Returns

double the orientation of the touchpoint. It describes the clockwise angle of a touchpoint’s major axis to the positive surface y-axis and is normalized to the -180 to +180 degree range i.e a value of -45 would mean major axis is on the left side of the positive surface y-axis at a 45 degree angle. The granularity of orientation depends on the touch device, some devices only support binary rotation values between 0 and 90 degrees. Some hardware may not support it and in that case, zero is returned.

pressure()

double pressure()

Returns

double the pressure of this point. The return value is in the range 0.0 to 1.0. Some hardware may not support it and in that case, zero is returned.
Last modified on October 29, 2026