GestureRegistrationParams

public class GestureRegistrationParams


Encapsulates configuration parameters passed to a GestureProducer when Google Play services registers a GestureEventListener to receive GestureEvent objects.

This class specifies the gesture actions that are currently required by Google Play services. You should only emit GestureEvent objects for the actions explicitly requested in these parameters to conserve system resources and battery life. If the set of requested actions is empty, it indicates that Google Play services is no longer requesting any gestures and you should effectively remove the listener and stop emitting events.

Summary

Public constructors

Constructs a new GestureRegistrationParams.

Public methods

@NonNull Set<Integer>

Returns the set of GestureEvent.GestureAction IDs, such as GestureEvent.ACTION_PRIMARY, that Google Play services is requesting from this producer.

Public constructors

GestureRegistrationParams

public GestureRegistrationParams(@NonNull Collection<Integer> requestedActions)

Constructs a new GestureRegistrationParams.

Parameters
@NonNull Collection<Integer> requestedActions

The set of GestureEvent.GestureAction IDs requested by Google Play services.

Public methods

getRequestedActions

public @NonNull Set<Integer> getRequestedActions()

Returns the set of GestureEvent.GestureAction IDs, such as GestureEvent.ACTION_PRIMARY, that Google Play services is requesting from this producer.

If this set is empty, you should treat it as if the listener has been removed and stop emitting gesture events.

Returns
@NonNull Set<Integer>

A non-null set of integer action IDs.