-
Notifications
You must be signed in to change notification settings - Fork 87
temi Center
The features here need to be configured in the temi Center before they can be used.
Return | Method | Description |
---|---|---|
void | startFaceRecognition() | Start face recognition |
void | stopFaceRecognition() | Stop face recognition |
List<SequenceModel> | getAllSequences() | Get all sequences |
void | playSequence(String sequenceId) | Play specific sequence by sequenceId
|
InputStream | getInputStreamByMediaKey(ContentType contentType, String mediaKey) | Obtain the input stream of the file by contentType and mediaKey (currently only used to obtain the contact photo for face recognition) |
Interface | Description |
---|---|
OnSequencePlayStatusChangedListener | Sequence status changed listener |
OnFaceRecognizedListener | Face recognition listener |
Models | Description |
---|---|
ContactModel | Contact data |
SequenceModel | Seqeunce data |
ContentType | Content type |
Use this method to start temi's face recognition and send the face data back to the callback method of OnFaceRecognizedListener.
-
Prototype
void startFaceRecognition();
-
Required permissions
Selected Kiosk, Face Recognition
-
Support from
0.10.70
Use this method to stop the face recognition.
-
Prototype
void stopFaceRecognition();
-
Required permissions
Selected Kiosk, Face Recognition
-
Support from
0.10.70
Use this method to get all the sequences that configured on temi Center.
-
Return
Type Description List<SequenceModel> All seqeunces list -
Prototype
List<SequenceModel> getAllSequences();
-
Required permissions
Sequence
-
Support from
0.10.70
-
Note
This method is a time-consuming operation and is recommended to be used in a non-main thread.
Use this method to play a specific sequence.
-
Parameters
Parameter Type Description sequenceId String ID of the sequence -
Prototype
void playSequence(String sequenceId);
-
Required permissions
Sequence
-
Support from
0.10.70
Use this method to obtain the input stream of the file by mediaKey
, currently only used to obtain the contact photo for face recognition.
-
Parameters
Parameter Type Description contentType ContentType Content type mediaKey String Media key of the file -
Return
Type Description InputStream Input stream of the file -
Prototype
InputStream getInputStreamByMediaKey(ContentType contentType, String mediaKey);
-
Required permissions
None.
-
Support from
0.10.70
-
Note
This method is a time-consuming operation and is recommended to be used in a non-main thread.
Set your context to implement this listener and add the override method to get the contact information when someone is recognized. When the recognized face has been configured in the temi Center, other information of the corresponding contact will be returned; and if it has not been configured in the temi Center, an empty ContactModel object will be returned.
package com.robotemi.sdk.face;
interface OnFaceRecognizedListener {}
-
Parameters
Parameter Type Description contactModelList List<ContactModel> Contact set corresponding to the recognized face -
Prototype
void onFaceRecognized(List<ContactModel> contactModelList);
-
Parameters
Parameter Type Description listener ConversationViewAttachesListener An instance of a class that implements this interface -
Prototype
void addOnFaceRecognizedListener(OnFaceRecognizedListener listener);
-
Parameters
Parameter Type Description listener OnFaceRecognizedListener An instance of a class that implements this interface -
Prototype
void removeOnFaceRecognizedListener(OnFaceRecognizedListener listener);
-
Required permissions
Face Recognition
-
Support from
0.10.70
Set your context to implement this listener and add the override method to listen to the status of the sequence.
package com.robotemi.sdk.sequence;
interface OnSequencePlayStatusChangedListener {}
Constant | Type | Value | Description |
---|---|---|---|
IDLE | int | 0 | Finish playing |
PREPARING | int | 1 | Source preparing |
PLAYING | int | 2 | Playing |
ERROR | int | -1 | Errors occurred while playing |
-
Parameters
Parameter Type Description status int Sequence's status -
Prototype
void onSequencePlayStatusChanged(int status);
-
Parameters
Parameter Type Description listener OnSequencePlayStatusChangedListener An instance of a class that implements this interface -
Prototype
void addOnSequencePlayStatusChangedListener(OnSequencePlayStatusChangedListener listener);
-
Parameters
Parameter Type Description listener OnSequencePlayStatusChangedListener An instance of a class that implements this interface -
Prototype
void removeOnSequencePlayStatusChangedListener(OnSequencePlayStatusChangedListener listener);
-
Required permissions
None.
-
Support from
0.10.70
Used for holding the contact data.
package com.robotemi.sdk.face;
class ContactModel {}
Attribute | Type | Description |
---|---|---|
firstName | String | First name of contact |
lastName | String | Last name of contact |
gender | String | Gender |
imageKey | String | The media key for the contact photo, Obtain the corresponding file input stream through the getInputStreamByMediaKey(String mediaKey) method. |
description | String | Description information |
Please refer to the sample code for more details.
Used for holding the content type, Face recognition image and map data only for now.
package com.robotemi.sdk.constants;
enum class {
FACE_RECOGNITION_IMAGE,
MAP_DATA_IMAGE
}
Used for holding the sequence data.
package com.robotemi.sdk.sequence;
class SequenceModel {}
Attribute | Type | Description |
---|---|---|
id | String | ID of sequence |
name | String | Name of sequence |
description | String | Description of sequence |