public interface

VDARSDKControllerEventReceiver

com.vidinoti.android.vdarsdk.VDARSDKControllerEventReceiver
Known Indirect Subclasses

Class Overview

Defines clients which receives events from the context system. Classes implementing this interface can intercepts events in order to know when a context has been detected/lost or a when a code (if setEnableCodesRecognition(boolean) has been called with true as parameter) is detected.

Warning: The methods are not called from the main UI thread. Therefore, if you want to update your UI within those methods, you should run it within a runOnUIThread method as follow (the this corresponds to your activity context):

 {@code
 	this.runOnUiThread(new Runnable() {

Summary

Public Methods
abstract void onAnnotationsHidden()
Called when all annotations (i.e.
abstract void onCodesRecognized(ArrayList<VDARCode> codes)
Call when the given codes are recognized.
abstract void onEnterContext(VDARContext context)
Advertise the listener that the user is in the specified context
abstract void onExitContext(VDARContext context)
Advertise the listener that the user is not anymore in the specified context
abstract void onFatalError(String errorDescription)
Called when a fatal error has occurred within VDARSDK.
abstract void onPresentAnnotations()
Called when some annotations (i.e.
abstract void onRequireSynchronization(ArrayList<VDARPrior> priors)
Called when some context or content requires the app to trigger a synchronization based on a given tag.
abstract void onTrackingStarted(int imageWidth, int imageHeight)
Advertise the listener that we have recognized an image and we are currently tracking it.

Public Methods

public abstract void onAnnotationsHidden ()

Called when all annotations (i.e. AR Content) are removed (hidden) from the screen.

Note that this can be called multiple times and even if a model is currently recognized.

This can be used to show overlays that used to be displayed over the AR view when onPresentAnnotations() was called.

public abstract void onCodesRecognized (ArrayList<VDARCode> codes)

Call when the given codes are recognized.

public abstract void onEnterContext (VDARContext context)

Advertise the listener that the user is in the specified context

Parameters
context The context the user is currently in

public abstract void onExitContext (VDARContext context)

Advertise the listener that the user is not anymore in the specified context

Parameters
context The context the user was before it was out of it.

public abstract void onFatalError (String errorDescription)

Called when a fatal error has occurred within VDARSDK.

It can be either a camera error or a certificate error preventing the application to use the SDK correctly.

Parameters
errorDescription The description of the error

public abstract void onPresentAnnotations ()

Called when some annotations (i.e. AR Content) is displayed on screen.

Note that this can be called multiple times and even if no model is yet recognized.

This can be used to hide any overlays displayed over the AR view.

public abstract void onRequireSynchronization (ArrayList<VDARPrior> priors)

Called when some context or content requires the app to trigger a synchronization based on a given tag. The app should start the synchronization with the given tag(s) right away or at the end of the currently running synchronization.

Parameters
priors a list of VDARPrior object to launch the synchronization for.

public abstract void onTrackingStarted (int imageWidth, int imageHeight)

Advertise the listener that we have recognized an image and we are currently tracking it.

Note this method is in practice not needed and you can provide an empty implementation in your application.

Parameters
imageWidth The width in pixel of the tracked image
imageHeight The height in pixel of the tracked image