This site has been permanently archived. The content on this site was last updated in 2019.
Controller.EventListener
Stay organized with collections
Save and categorize content based on your preferences.
Listens for various classes of events related to the Controller.
Public Methods
void
|
|
void
|
onUpdate()
Called when the Controller's physical state has changed due to motion or other user actions.
|
Inherited Methods
From class
java.lang.Object
boolean
|
|
final
Class<?>
|
getClass()
|
int
|
hashCode()
|
final
void
|
notify()
|
final
void
|
notifyAll()
|
String
|
toString()
|
final
void
|
wait(long arg0, int arg1)
|
final
void
|
wait(long arg0)
|
final
void
|
wait()
|
Public Constructors
public
Controller.EventListener
()
Public Methods
public
void
onConnectionStateChanged
(int state)
Called when the Controller's connection changes state. May be called on any thread.
public
void
onUpdate
()
Called when the Controller's physical state has changed due to motion or other user actions.
May be called on any thread.
All rights reserved. Java is a registered trademark of Oracle and/or its affiliates.
Last updated 2024-10-09 UTC.
[[["Easy to understand","easyToUnderstand","thumb-up"],["Solved my problem","solvedMyProblem","thumb-up"],["Other","otherUp","thumb-up"]],[["Missing the information I need","missingTheInformationINeed","thumb-down"],["Too complicated / too many steps","tooComplicatedTooManySteps","thumb-down"],["Out of date","outOfDate","thumb-down"],["Samples / code issue","samplesCodeIssue","thumb-down"],["Other","otherDown","thumb-down"]],["Last updated 2024-10-09 UTC."],[[["`Controller.EventListener` handles events related to the Google VR Controller."],["It provides callbacks for connection state changes and controller updates."],["`onConnectionStateChanged` is triggered when the controller's connection status changes."],["`onUpdate` is called when the controller's physical state is updated due to user interaction or motion."]]],["The `Controller.EventListener` class monitors changes in a Controller. It has a constructor and two main methods: `onConnectionStateChanged(int state)`, which is invoked when the Controller's connection status changes, providing a connection state as a parameter; and `onUpdate()`, which is triggered when the Controller's physical state changes because of user actions or motion. Both methods can be called on any thread. This class also inherits several methods from the Object class.\n"]]