This site has been archived and remains strictly as a historical reference for developers who actively maintain apps built using the legacy Google VR SDK, which was last updated in 2019 and is no longer receiving updates.
  • All developers actively developing experiences for Google Cardboard should use the new open source Cardboard SDKs for iOS, Android NDK, and Unity XR Plugin. These new SDKs offer streamlined APIs, improved device compatibility, and built-in viewer profile QR code scanning.
  • The Daydream View VR headset is no longer available for purchase as of October 15, 2019. Existing apps on supported devices are unaffected for users who previously installed those applications. It is no longer possible to opt-in to Daydream distribution via Google Play.
Stay organized with collections Save and categorize content based on your preferences.

GvrDaydreamApi

Main entry point Daydream specific APIs.

Summary

This class automatically instantiates an instance when this API is used for the first time. For explicit control over when the instance is created and the Java references are setup call the provided CreateAsync method, for example when no UI is being displayed to the user.

Inheritance

Inherits from: IDisposable

Properties

IsCreated
static bool
Gets a value indicating whether the GvrDaydreamApi has been created.

Public static functions

Create()
void
Deprecated. Create() without arguments is deprecated. Use CreateAsync(callback) instead.
Creates a generic asynchronous callback.
CreateAsync(Action< bool > callback)
void
Asynchronously instantiates a GvrDayreamApi.
LaunchVrHome()
void
Deprecated. Use LaunchVrHomeAsync(callback) instead.
Launches a generic asynchronous VR Home call.
LaunchVrHomeAsync(Action< bool > callback)
void
Asynchronously launches VR Home.

Properties

IsCreated

static bool IsCreated

Gets a value indicating whether the GvrDaydreamApi has been created.

Value true if the GvrDaydreamApi has been created, false otherwise.

Public static functions

Create

void Create()

Creates a generic asynchronous callback.

Deprecated. Create() without arguments is deprecated. Use CreateAsync(callback) instead.

CreateAsync

void CreateAsync(
  Action< bool > callback
)

Asynchronously instantiates a GvrDayreamApi.

The provided callback will be called with a bool argument indicating whether instance creation was successful.

Details
Parameters
callback
A callback to make after creating a GvrDaydreamApi.

LaunchVrHome

void LaunchVrHome()

Launches a generic asynchronous VR Home call.

Deprecated. Use LaunchVrHomeAsync(callback) instead.

LaunchVrHomeAsync

void LaunchVrHomeAsync(
  Action< bool > callback
)

Asynchronously launches VR Home.

Instantiates an instance of GvrDaydreamApi if necessary. If successful, launches VR Home.

The provided callback will be called with a bool argument indicating whether instance creation and launch of VR Home was successful.

Details
Parameters
callback
A callback to make after launching the VrHome screen.