Google Cardboard Sensor



A- MagnetSensor.OnCardboardTriggerListener -
public static interface MagnetSensor.OnCardboardTriggerListener- Known Indirect Subclasses CardboardActivity Interface for listeners of Cardboard trigger events.
Public Methods-
public abstract void onCardboardTrigger ()
SensorEventProvider public interface
B- SensorEventProvider - Known Indirect Subclasses DeviceSensorLooper Public interface to provide sensor events (e.g. from a device or from recorded data) to a set of listeners.
Public Methods-
public abstract void registerListener (SensorEventListener listener)- Registers a listener to the SensorEvent broadcasted for the given sensor.
Parameters-
listener- A SensorEventListener object that will listen to sensor updates. See Also unregisterListener(SensorEventListener)
public abstract void start ()- Start the sensor provider.
public abstract void stop ()- Stop the sensor provider.
public abstract void unregisterListener (SensorEventListener listener)- Unregisters a listener to the SensorEvent broadcasted for the given sensor.
Parameters-
listener SensorEventListener object to be unregistered. See Also registerListener(SensorEventListener)
C- DeviceSensorLooper public class DeviceSensorLooper - This class registers two sensor listeners for accelerometer and gyroscope to the device SensorManager and broadcast all received SensorEvent to registered listeners. This class spuns its on thread when start() is called.
Inherited Methods-
From class java.lang.Object
From interface com.google.vrtoolkit.cardboard.sensors.SensorEventProvider
Public Constructors-
public DeviceSensorLooper (SensorManager sensorManager)- Default constructor.
Parameter-
sensorManager -Android sensor manager that will be used to register and unregister the listeners.
Public Methods-
public void registerListener (SensorEventListener listener)- Registers a listener to the SensorEvent broadcasted for the given sensor.
Parameters-
listener- A SensorEventListener object that will listen to sensor updates.
public void start ()- This registers two SensorEventListener and start a Looper.
public void stop ()- Stops the looper and deregister the listener from the sensor manager.
public void unregisterListener (SensorEventListener listener)- Unregisters a listener to the SensorEvent broadcasted for the given sensor.
Parameters- 
listener- SensorEventListener object to be unregistered.
D- HeadTracker-  This is a public class. HeadTracker Provides head tracking information from the device IMU.
Inherited Methods- 
From class java.lang.Object
Public Constructors-
public HeadTracker (SensorEventProvider sensorEventProvider, Clock clock, Display display)-Default constructor.
Parameters-
sensorEventProvider- provides SensorEvents to the head tracker.
clock- globaly consistent clock that should be shared by all system that needs a synchronous time.
display- device display to get access to the static rotation of the screen.
Public Methods-
public static HeadTracker createFromContext (Context context) -Factory constructor that creates a SensorEventProvider from the device SensorManager. It uses the system clock as global clock.
Parameters-
context- global context
public void getLastHeadView (float[] headView, int offset)- Provides the most up-to-date transformation matrix.
Parameters- 
headView- An array representing a 4x4 transformation matrix in column major order.
offset- Offset in the array where data should be written. Throws IllegalArgumentException If there is not enough space to write the result.
public void startTracking ()- Starts reading sensor data for head tracking.
public void stopTracking ()- Stops reading sensor data for head tracking.
E- MagnetSensor -This is public class. MagnetSensor Magnetometer sensor detector for the cardboard trigger. Provides cardboard trigger events from the device magnetometer to listeners.
Nested Classes -
interface- MagnetSensor.OnCardboardTriggerListener- Interface for listeners of Cardboard trigger events.
Inherited Methods-
From class java.lang.Object
Public Constructors-
public MagnetSensor (Context context)- Creates a magnet sensor using the provided context.
Parameters-
context- Context to use.
Public Methods-
public void setOnCardboardTriggerListener(MagnetSensor.OnCardboardTriggerListener listener)- Sets a listener for Cardboard trigger events. Any events are posted to the listener in the same thread this method was called from.
Parameters-
listener-Listener for to set.
public void start ()- Starts reading sensor data and providing for trigger events.
public void stop ()- Stops reading sensor data and providing for trigger events.
F- SystemClock- This is a  public class .SystemClock Implementation of the public interface Clock using the system clock.
Inherited Methods-
From class java.lang.Object
From interface com.google.vrtoolkit.cardboard.sensors.Clock
Public Constructors- 
public SystemClock ()
Public Methods 
public long nanoTime ()- Return System time in NanoSeconds.

Delhi, INDIA

3 comments:

  1. can you please provide videos playing in android google cardboard ? i am struggling for this for last few days

    ReplyDelete
  2. Hi, Im working in a virtual Gyroscope and it works in the Cardboard apk 1.5 but no in the APK 1.8 and in any other app that works with the cardboard apk 1.8, what could it be? I haven't find documentation about what changed.

    ReplyDelete
  3. Slots machines at casino - JTHub
    JT-TJ-JTJ Gaming. 상주 출장안마 JT-J-TJ Gaming. 양주 출장안마 JT-J-TJ. Casino. 24 창원 출장안마 hours. JT-J-TJ. J.T-J. 24 hours. JT-J. Gaming. JT-J. 양주 출장샵 Gaming. 공주 출장안마 JT-J.

    ReplyDelete