SmartEyeglass SDK
public class

SmartEyeglassEventListener

extends java.lang.Object
  1. java.lang.Object
  2. com.sony.smarteyeglass.extension.util.SmartEyeglassEventListener

Class Overview

The event listener interface for SmartEyeglass events. Your implementation should override the methods to provide handler callbacks for specific events. Each event-handler function is executed in the context that created the associated instance of SmartEyeglassControlUtils.

Summary

Public Constructors
SmartEyeglassEventListener()
Public Methods
void onVoiceTextInput(int errorCode, java.lang.String text)

Called on completion of a voice-to-text operation.

void onDialogClosed(int code)

Called when a dialog is dismissed by user action or timeout.

void onCameraErrorReceived(int error)

Called when an error occurred while starting camera recording.

void onCameraReceived(CameraEvent event)

Called when a new image is received in these camera modes:

void onCameraReceivedFile(java.lang.String filePath)

Called when a new image is sent to a file, in these camera modes:

void onChangePowerMode(int powerMode)

Called when the power mode changes.

void onDisplayStatus(int mode)

Called when the display state changes.

boolean onConfirmationEnterStandby()

Called when the device has entered standby mode.

void onStandbyStatus(int status)

Called when the standby mode changed.

void onBatteryStatus(int value)

Called when the battery status is received.

void onTelephonyFunctionStatus(int status)

Called when the telephony function status is received.

void onARRegistrationResult(int result, int objectId)

Called when the registration operation for an AR rendering object has completed.

void onAREnableAnimationResponse(int result)

Called when the animation-enable operation for AR rendering has completed.

void onARDisableAnimationResponse(int result)

Called when the animation-disable operation for AR rendering has completed.

void onARObjectRequest(int objectId)

Called when the AR rendering engine requires display data for an AR object.

void onResultShowBitmap(int transactionNumber, int result)

Called when the draw operation for showBitmapWithCallback is completed.

void onResultShowImage(int transactionNumber, int result)

Called when the draw operation for showImageWithCallback is completed.

void onResultSendAnimationObject(int transactionNumber, int result)

Called when the draw operation for sendARAnimationObjectWithCallback is completed.

Public Constructors

public SmartEyeglassEventListener()

Public Methods

public void onVoiceTextInput(int errorCode, java.lang.String text)

Called on completion of a voice-to-text operation.

Parameters
errorCode The result of the operation, one of these constants:
text The text transcription of the voice input.

public void onDialogClosed(int code)

Called when a dialog is dismissed by user action or timeout.

Parameters
code For a dialog with developer-defined buttons, the 0-based index of the button used to close the dialog. For a simple dialog, 0 if the dialog was closed with the OK button, or -1 if the dialog timed out.

public void onCameraErrorReceived(int error)

Called when an error occurred while starting camera recording. Your handler must call stopCamera.

Parameters
error The reason for failure of the capture operation, one of these constants:

public void onCameraReceived(CameraEvent event)

Called when a new image is received in these camera modes:

Parameters
event The camera event object that contains the new image.

public void onCameraReceivedFile(java.lang.String filePath)

Called when a new image is sent to a file, in these camera modes:

Parameters
filePath The path and file name of the new JPEG file.

public void onChangePowerMode(int powerMode)

Called when the power mode changes.

Parameters
powerMode The new power mode value, one of

public void onDisplayStatus(int mode)

Called when the display state changes.

Parameters
mode The new display state value, one of

public boolean onConfirmationEnterStandby()

Called when the device has entered standby mode.

public void onStandbyStatus(int status)

Called when the standby mode changed.

Parameters
status The new standby mode, one of

public void onBatteryStatus(int value)

Called when the battery status is received.

Parameters
value The remaining power in the battery, a percentage value.

public void onTelephonyFunctionStatus(int status)

Called when the telephony function status is received.

Parameters
status The telephony function status, one of:

public void onARRegistrationResult(int result, int objectId)

Called when the registration operation for an AR rendering object has completed.

Parameters
result The result of the operation, 0 on success.
objectId The unique ID of the registered AR object.

public void onAREnableAnimationResponse(int result)

Called when the animation-enable operation for AR rendering has completed.

Parameters
result The result of the operation, 0 on success.

public void onARDisableAnimationResponse(int result)

Called when the animation-disable operation for AR rendering has completed.

Parameters
result The result of the operation, 0 on success.

public void onARObjectRequest(int objectId)

Called when the AR rendering engine requires display data for an AR object. You handler should send the requested image data using sendARObjectResponse or sendARAnimationObject.

Parameters
objectId The object ID whose data is requested.

public void onResultShowBitmap(int transactionNumber, int result)

Called when the draw operation for showBitmapWithCallback is completed.

Parameters
transactionNumber The transaction number that was passed to the showBitmapWithCallback call which has completed.
result The processing result.

public void onResultShowImage(int transactionNumber, int result)

Called when the draw operation for showImageWithCallback is completed.

Parameters
transactionNumber The transaction number that was passed to the showImageWithCallback call which has completed.
result The processing result.

public void onResultSendAnimationObject(int transactionNumber, int result)

Called when the draw operation for sendARAnimationObjectWithCallback is completed.

Parameters
transactionNumber The transaction number that was passed to the sendARAnimationObjectWithCallback call which has completed.
result The processing result.