Last Updated on : 2024-06-26 09:36:11download
This feedback method connect to the user feedback version 1.0, which will be discarded soon. We recommend that you integrate FAQ UI BizBundle which connect to the user feedback version 2.0. After the integration, feedback history can be checked on your app and at Tuya Developer Platform > Operation > User Feedback.
All feedback features of Tuya Smart Life App SDK are implemented by the classes ITuyaFeedbackManager
and ITuyaFeedbackMsg
. For example, query a list of feedback sessions, query a list of feedback content, query a list of feedback types, and add a feedback session.
Class name | Description |
---|---|
ITuyaFeedbackManager | Feedback management class |
ITuyaFeedbackMsg | Feedback management class for a specific session |
Users can give feedback on the app through the following process if needed:
Returns a list of sessions for the feedback submitted by users.
API description
void getFeedbackManager().getFeedbackList(final ITuyaDataCallback<List<FeedbackBean>> callback);
Parameters
Parameter | Description |
---|---|
callback | The success or failure callback. null cannot be returned. |
Data model of FeedbackBean
Field | Type | Description |
---|---|---|
dateTime | String | The date and time. |
content | String | The feedback content. |
hdId | String | The feedback category ID. |
hdType | String | The feedback type. |
title | String | The category title. It is a device name for the device failure feedback. |
Example
TuyaHomeSdk.getTuyaFeekback().getFeedbackManager().getFeedbackList(new ITuyaDataCallback<List<FeedbackBean>>() {
@Override
public void onSuccess(List<FeedbackBean> feedbackTalkBeans) {}
@Override
public void onError(String errorCode, String errorMessage) {}
});
Returns a list of feedback content submitted by users. You can call FeedbackBean
to get the hdId
and hdType
field values.
Declaration
void getFeedbackMsg(hdId, hdType).getFeedbackList(final ITuyaDataCallback<List<FeedbackMsgBean>> callback);
Parameters
Parameters | Description |
---|---|
hdId | The feedback ID. |
hdType | The feedback type. |
callback | The success or failure callback. null cannot be returned. |
FeedbackMsgBean data model
field | type | description |
---|---|---|
id | int | The feedback content ID. |
cTime | int | The feedback timestamp. Unit: seconds. |
content | String | The feedback content. |
hdId | String | The feedback ID. |
hdType | int | The feedback type. |
Example
TuyaHomeSdk.getTuyaFeekback().getFeedbackMsg(hdId, hdType).getMsgList(new ITuyaDataCallback<List<FeedbackMsgBean>>() {
@Override
public void onSuccess(List<FeedbackMsgBean> result) {}
@Override
public void onError(String errorCode, String errorMessage) {}
});
Returns a list of feedback types that can be selected when users give feedback.
API description
void getFeedbackType(final ITuyaDataCallback<List<FeedbackTypeRespBean>> callback);
Parameters
Parameter | Description |
---|---|
callback | The success or failure callback. null cannot be returned. |
Data model of FeedbackTypeRespBean
Field | Type | Description |
---|---|---|
list | List |
The list of feedback types. |
type | String | The type of list. Currently, only the device and other types are supported. |
Data model of FeedbackTypeBean
Field | Type | Description |
---|---|---|
hdId | String | The feedback category ID. |
hdType | String | The feedback type. |
title | String | The category title. It is a device name for the device failure feedback. |
Example
TuyaHomeSdk.getTuyaFeekback().getFeedbackManager().getFeedbackType(new ITuyaDataCallback<List<FeedbackTypeRespBean>>() {
@Override
public void onSuccess(List<FeedbackTypeRespBean> feedbackTypeRespBeans) {}
@Override
public void onError(String errorCode, String errorMsg) {}
});
Adds a feedback session and submits feedback contents entered by users.
API description
void addFeedback(final String message,String contact, String hdId, int hdType, final ITuyaDataCallback<FeedbackMsgBean> callback);
Parameters
Parameter | Description |
---|---|
message | The feedback content. |
contact | The mobile phone number or email address. |
hdId | The feedback category ID. |
hdType | The feedback type. |
callback | The success or failure callback. null cannot be returned. |
Example
TuyaHomeSdk.getTuyaFeekback().getFeedbackManager().addFeedback(
"The device has faults.",
"abc@qq.com",
feebackTypeBean.getHdId(),
feebackTypeBean.getHdType(),
new ITuyaDataCallback<FeedbackMsgBean>() {
@Override
public void onSuccess(FeedbackMsgBean feedbackMsgBean) {}
@Override
public void onError(String errorCode, String errorMsg) {}
});
Is this page helpful?
YesFeedbackIs this page helpful?
YesFeedback