MaxstAR Native Android  5.0.2
List of all members | Static Public Member Functions
com.maxst.ar.MaxstAR Class Reference

Description

MaxstAR class handles the lifecycle of MAXST AR.

MaxstAR class handles the lifecycle of MAXST AR such as initilization, release, resume and pause.

Static Public Member Functions

static String getVersion ()
 Get the version of the MAXST AR engine. More...
 
static void init (Context context, String appKey)
 Initialize the MAXST AR engine. After initialization, other API can called. More...
 
static void deinit ()
 Release the MAXST AR engine. Called at the end of an Android app. More...
 
static Context getApplicationContext ()
 Get ApplicationContext which is registered by the init function. More...
 
static boolean isInitialized ()
 Check whether the MAXST AR engine has been initialized successfully. More...
 
static void onResume ()
 Handle onResume of an Android app. Perform internal settings and Enable rendering. More...
 
static void onPause ()
 Handle onPause of an Android app. Disable rendering after this function is called. More...
 
static void onSurfaceChanged (int viewWidth, int viewHeight)
 Handle onSurfaceChanged of an Android app. Called when the rendering surface's size changed (i.e. orientation change, resizing rendering surface) More...
 
static void setScreenOrientation (int orientation)
 Set the screen orientation. More...
 

Member Function Documentation

◆ deinit()

static void com.maxst.ar.MaxstAR.deinit ( )
static

Release the MAXST AR engine. Called at the end of an Android app.

◆ getApplicationContext()

static Context com.maxst.ar.MaxstAR.getApplicationContext ( )
static

Get ApplicationContext which is registered by the init function.

◆ getVersion()

static String com.maxst.ar.MaxstAR.getVersion ( )
static

Get the version of the MAXST AR engine.

Returns
Version string

◆ init()

static void com.maxst.ar.MaxstAR.init ( Context  context,
String  appKey 
)
static

Initialize the MAXST AR engine. After initialization, other API can called.

Parameters
contextapplication context
appKeythe license key of the current app (this key is generated from developer.maxst.com)

◆ isInitialized()

static boolean com.maxst.ar.MaxstAR.isInitialized ( )
static

Check whether the MAXST AR engine has been initialized successfully.

◆ onPause()

static void com.maxst.ar.MaxstAR.onPause ( )
static

Handle onPause of an Android app. Disable rendering after this function is called.

◆ onResume()

static void com.maxst.ar.MaxstAR.onResume ( )
static

Handle onResume of an Android app. Perform internal settings and Enable rendering.

◆ onSurfaceChanged()

static void com.maxst.ar.MaxstAR.onSurfaceChanged ( int  viewWidth,
int  viewHeight 
)
static

Handle onSurfaceChanged of an Android app. Called when the rendering surface's size changed (i.e. orientation change, resizing rendering surface)

Parameters
viewWidthsurface width size in pixel unit. The value should
viewHeightsurface height size in pixel unit.

◆ setScreenOrientation()

static void com.maxst.ar.MaxstAR.setScreenOrientation ( int  orientation)
static

Set the screen orientation.

Parameters
orientationScreen orientation. 1 is Configuration.ORIENTATION_PORTRAIT, 2 is Configuration.ORIENTATION_LANDSCAPE