public class

UnityFaceCallback

extends Object
implements UnityCallback.UnityListener
java.lang.Object
   ↳ com.nuwarobotics.service.facecontrol.UnityFaceCallback

Class Overview

UnityFaceCallback Use to receive event callback
Related API :
registerCallback(UnityFaceCallback)
unregisterCallback(UnityFaceCallback)
To receive callback of Face Touch

    mController.registerCallback(new UnityFaceCallback());
    class UnityFaceCallback extends UnityFaceCallback {
         @Override
         public void on_touch_left_eye() {
             Log.d("FaceControl", "on_touch_left_eye()");
         }

         @Override
         public void on_touch_right_eye() {
             Log.d("FaceControl", "on_touch_right_eye()");
         }

         @Override
         public void on_touch_nose() {
             Log.d("FaceControl", "on_touch_nose()");
         }

         @Override
         public void on_touch_mouth() {
             Log.d("FaceControl", "on_touch_mouth()");
         }

         @Override
         public void on_touch_head() {
             Log.d("FaceControl", "on_touch_head()");
         }

         @Override
         public void on_touch_left_edge() {
             Log.d("FaceControl", "on_touch_left_edge()");
         }

         @Override
         public void on_touch_right_edge() {
            Log.d("FaceControl", "on_touch_right_edge()");
         }

         @Override
         public void on_touch_bottom() {
            Log.d("FaceControl", "on_touch_bottom()");
         }
     }

Summary

Public Constructors
UnityFaceCallback()
Public Methods
void onDecoration(String whichDecorationName, String statusMsg, int statusCode)
On Face equip Decoration
void onJointDecoration(String whichDecorationName, String statusMsg, int statusCode)
On Face equip Decoration
void onLoadCharacter(int status)
load Character status
void onLoadJsonDone(int statusCode)
Face load a JSON finish
void onLoadMotionConfig(String id, int status)
Load Motion result
void onLoadOfSound(String sound, int statusCode)
void onLoadSkinDone(String id)
Face SKIN load finish
void onLoadSkinFail(String id, int error)
Face SKIN load fail
void onLoadSoundDone(int status)
Face un-load Sound finish
void onMotionComplete(String id)
When Motion play complete
void onMotionError(String id)
Face play a Motion Error
void onMotionRepeat(String id)
Face play a Motion start repeat
void onMotionStart(String id)
When load Motion start
void onMotionStop(String id)
When load Motion stop
void onSceneStart(String scene)
When Unity Ready.
void onUnLoadAllSoundsDone(int statusCode)
Face un-load Sound finish
void onUserTouchScreen(String body, int type, int x, int y)
User Touch Screen
void on_touch_bottom()
When user touch bottom area
void on_touch_head()
When user touch head
void on_touch_left_edge()
When user touch left edge
void on_touch_left_eye()
When user touch left eye
void on_touch_mouth()
When user touch mouth
void on_touch_nose()
When user touch nose
void on_touch_right_edge()
When user touch right edge
void on_touch_right_eye()
When user touch right eye
[Expand]
Inherited Methods
From class java.lang.Object
From interface com.nuwarobotics.service.facecontrol.UnityCallback.UnityListener

Public Constructors

public UnityFaceCallback ()

Public Methods

public void onDecoration (String whichDecorationName, String statusMsg, int statusCode)

On Face equip Decoration

public void onJointDecoration (String whichDecorationName, String statusMsg, int statusCode)

On Face equip Decoration

public void onLoadCharacter (int status)

load Character status

Parameters
status 1 for success, -1 for load fail

public void onLoadJsonDone (int statusCode)

Face load a JSON finish

public void onLoadMotionConfig (String id, int status)

Load Motion result

public void onLoadOfSound (String sound, int statusCode)

public void onLoadSkinDone (String id)

Face SKIN load finish

public void onLoadSkinFail (String id, int error)

Face SKIN load fail

public void onLoadSoundDone (int status)

Face un-load Sound finish

public void onMotionComplete (String id)

When Motion play complete

Parameters
id motion name

public void onMotionError (String id)

Face play a Motion Error

Parameters
id motion name

public void onMotionRepeat (String id)

Face play a Motion start repeat

Parameters
id motion name

public void onMotionStart (String id)

When load Motion start

Parameters
id motion name

public void onMotionStop (String id)

When load Motion stop

Parameters
id motion name

public void onSceneStart (String scene)

When Unity Ready.

Parameters
scene Role Face Scene

public void onUnLoadAllSoundsDone (int statusCode)

Face un-load Sound finish

public void onUserTouchScreen (String body, int type, int x, int y)

User Touch Screen

Parameters
body touch area
type touch type
x touch coordinate x
y touch coordinate y

public void on_touch_bottom ()

When user touch bottom area

public void on_touch_head ()

When user touch head

public void on_touch_left_edge ()

When user touch left edge

public void on_touch_left_eye ()

When user touch left eye

public void on_touch_mouth ()

When user touch mouth

public void on_touch_nose ()

When user touch nose

public void on_touch_right_edge ()

When user touch right edge

public void on_touch_right_eye ()

When user touch right eye