C++ Java Unity
Java Reference
Device Class Reference

Detailed Description

Singleton representation of the device Vuforia is currently running on.

Vuforia supports many different hardware configurations. This class provides management and configuration functions for the specific configuration that Vuforia is currently running on.

Changes made here primarily affect how the RenderingPrimitives are created and structured.

Deprecated:
The Vuforia Engine Java bindings have been deprecated and will be removed in a future release.
Inheritance diagram for Device:
EyewearDevice

Public Member Functions

boolean equals (Object obj)
 
Type getType ()
 Get the Type of this instance (may be a subclass of Device). More...
 
boolean isOfType (Type type)
 Get whether this Device instance's type equals or has been derived from the given type. More...
 
void setConfigurationChanged ()
 Tell Vuforia that the configuration has changed, so new RenderingPrimitives need to be generated. More...
 
RenderingPrimitives getRenderingPrimitives ()
 Get a copy of the RenderingPrimitives for the current configuration. More...
 

Static Public Member Functions

static Device getInstance ()
 Get the singleton instance. More...
 
static Type getClassType ()
 Get the Type for class "Device". More...
 

Member Function Documentation

boolean equals ( Object  obj)
static Device getInstance ( )
static

Get the singleton instance.

This function can be used immediately after Vuforia::init() has succeeded. See the "Lifecycle of a Vuforia app" section on the main Vuforia reference page for more information. Lifecycle of a Vuforia app

static Type getClassType ( )
static

Get the Type for class "Device".

Type getType ( )

Get the Type of this instance (may be a subclass of Device).

boolean isOfType ( Type  type)

Get whether this Device instance's type equals or has been derived from the given type.

void setConfigurationChanged ( )

Tell Vuforia that the configuration has changed, so new RenderingPrimitives need to be generated.

RenderingPrimitives getRenderingPrimitives ( )

Get a copy of the RenderingPrimitives for the current configuration.

The RenderingPrimitives returned from this function are immutable, and tailored to the current device environment.

RenderingPrimitives can be retrieved at the earliest after the first call to Vuforia::onSurfaceChanged().

New RenderingPrimitives will be created whenever the device environment changes in one of the following ways:

If you have cached a copy of the RenderingPrimitives and you make any of the above changes, you will need use this method to get an updated copy of the RenderingPrimitives that reflects the new device environment.

Note: Platform-specific lifecycle transitions (e.g. Pause/Resume) may also cause the configuration to change, so it is advisable to retrieve new RenderingPrimitives after those transitions.

Note: RenderingPrimitives will not be valid until a CameraDevice has been initialised.

Note: This method returns a copy, which has an associated cost. Performant apps should avoid calling this method if the configuration has not changed.