1.1. Feedback

If user intends to submit feedback, he has to select the type of feedback first and fill the feedback content. After submission, a feedback talk will be generated based on the selected type of feedback. User may continue to fill feedback in the session, and the feedback will be displayed in the feedback list of the session.

All functions related to the feedback will be realized by using the ITuyaFeedbackManager Or ITuyaFeedbackMsg class. Obtaining feedback talk list, feedback content list in the session and feedback type list and adding feedback are supported.

Class Name Description
ITuyaFeedbackManager Feedback management class
ITuyaFeedbackMsg A feedback management class for some conversation

1.2. Obtain Feedback Talk List

Obtain the feedback talk list submitted by user

Declaration

void getFeedbackList(final ITuyaDataCallback<List<FeedbackBean>> callback);

Parameters

Parameters Description
callback Callback, including obtain feedback list success or failure, cannot be null

FeedbackBean data model

field type description
dateTime String Date and time
content String Feedback content
hdId String Feedback id
hdType String Feedback Type
title String Title (if it is equipment failure feedback, that is, equipment name)

Example

TuyaHomeSdk.getTuyaFeekback().getFeedbackManager().getFeedbackList(new ITuyaDataCallback<List<FeedbackBean>>() {
     @Override
     public void onSuccess(List<FeedbackBean> feedbackTalkBeans) {
     }
     @Override
     public void onError(String errorCode, String errorMessage) {
     }
});

1.3. Obtain Feedback List

Obtain the feedback content list from the feedback talk.

Declaration

ITuyaFeedbackMag getFeedbackMsg(String hdId, int hdType);
void getMsgList(ITuyaDataCallback<List<FeedbackMsgBean>> callback);

Parameters

Parameters Description
hdId Feedback Id
hdType Feedback type
ITuyaDataCallback callback, including obtain feedback list success or failure, cannot be null

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) {}
});

1.4. Obtain Feedback Type List

The feedback type can be selected first when adding feedback.

Declaration

void getFeedbackType(final ITuyaDataCallback<List<FeedbackTypeRespBean>> callback);

Parameters

Parameters Description
callback callback, including obtain feedback list success or failure, cannot be null

FeedbackTypeRespBean data model

field type description
list List Feedback type list
type String List categories (currently only devices and others)

FeedbackTypeBean data model

field type description
hdId String Feedback id
hdType String feedback type
title String Title (if it is equipment failure feedback, that is, equipment name)

Example

TuyaHomeSdk.getTuyaFeekback().getFeedbackManager().getFeedbackType(new ITuyaDataCallback<List<FeedbackTypeRespBean>>() {
    @Override
    public void onSuccess(List<FeedbackTypeRespBean> feedbackTypeRespBeans) {}
    @Override
    public void onError(String errorCode, String errorMsg) {}
});

1.5. Add Feedback

Add and submit feedback.

Declaration

void addFeedback(final String message,String contact, String hdId, int hdType, final ITuyaDataCallback<FeedbackMsgBean> callback);

Parameters

Parameters Description
message Feedback content
contact Contact information (phone or email)
hdId Feedback Id
hdType Feedback type
callback Callback, including add success or failure, cannot be null

Example

TuyaHomeSdk.getTuyaFeekback().getFeedbackManager().addFeedback(Thedevice fails ", //feedback
     "abc@qq.com",
     feebackTypeBean.getHdId(), 
     feebackTypeBean.getHdType(), 
     new ITuyaDataCallback<FeedbackMsgBean>() {
         @Override
         public void onSuccess(FeedbackMsgBean feedbackMsgBean) {
         }
         @Override
         public void onError(String errorCode, String errorMsg) {
         }
});

results matching ""

    No results matching ""