October 15, 2019 update:
  • The Daydream View VR headset is no longer available for purchase. However, developers can continue to use the existing Google VR SDK to update and distribute their apps to the Google Play Store, and make them available to users in the Daydream app.

Event

public final class Event

Container for various GVR-events to which the client can optionally respond.

Nested Classes

class Event.EventType Constants that represent the type of an Event. 
class Event.RecenterType Constants that represent the type of recentering. 

Public Constructors

Event()
Creates a new, unpopulated, event.

Public Methods

void
close()
Destroys the event.
long
getFlags()
Returns the event flags; always 0 for now.
long
getRecenterEventFlags()
Returns the event flags; always 0 for now.
void
getRecenterEventStartSpaceFromTrackingSpaceTransform(float[] outTransform)
Returns the transform to start space from tracking space.
int
getRecenterEventType()
Returns the type of recentering (a constant in Event.RecenterType).
long
getTimestamp()
Returns the event's timestamp, in nanos.
int
getType()
Returns the type of the event (one of the entries in Event.EventType).

Inherited Methods

Public Constructors

public Event ()

Creates a new, unpopulated, event. This event may be reused for multiple calls to pollEvent(Event). It's recommended to have one Event object for the lifetime of the app to reduce allocations.

Public Methods

public void close ()

Destroys the event. Must be called when done with the event.

public long getFlags ()

Returns the event flags; always 0 for now.

public long getRecenterEventFlags ()

Returns the event flags; always 0 for now. Only valid ifgetType() returns RECENTER.

Throws
IllegalStateException if this isn't a RECENTER event.

public void getRecenterEventStartSpaceFromTrackingSpaceTransform (float[] outTransform)

Returns the transform to start space from tracking space. Only valid if getType() returns RECENTER.

Parameters
outTransform
Throws
IllegalStateException if this isn't a RECENTER event.

public int getRecenterEventType ()

Returns the type of recentering (a constant in Event.RecenterType). Only valid if getType() returns RECENTER.

Throws
IllegalStateException if this isn't a RECENTER event.

public long getTimestamp ()

Returns the event's timestamp, in nanos.

public int getType ()

Returns the type of the event (one of the entries in Event.EventType).