To use this method, you need to first finish authentication process.
Once authenticated, you can obtain the active user's case list by calling getUserCaseList.
YourActivity.java
import io.taptalk.taptalklive.TapTalkLive;
import io.taptalk.taptalklive.Listener.TTLGetCaseListListener;
...
TapTalkLive.getUserCaseList(new TTLGetCaseListListener() {
@Override
public void onSuccess(List<TTLCaseModel> cases) {
// Successfully fetched user cases
}
@Override
public void onError(String errorCode, String errorMessage) {
}
});
YourActivity.kt
import io.taptalk.taptalklive.TapTalkLive
import io.taptalk.taptalklive.Listener.TTLGetCaseListListener
...
TapTalkLive.getUserCaseList(object : TTLGetCaseListListener() {
override fun onSuccess(cases: MutableList<TTLCaseModel>?) {
// Successfully fetched user cases
}
override fun onError(errorCode: String?, errorMessage: String?) {
}
})
Create a New Case
To use this method, you need to first finish authentication process.
Once authenticated, you can create a new case for the user by calling createNewCase, providing the topic ID and first message.
YourActivity.java
import io.taptalk.taptalklive.TapTalkLive;
import io.taptalk.taptalklive.Listener.TTLCreateCaseListener;
...
TapTalkLive.createNewCase(TOPIC_ID, FIRST_MESSAGE, new TTLCreateCaseListener() {
@Override
public void onSuccess(TTLCaseModel caseModel) {
// Successfully created a new case
}
@Override
public void onError(String errorCode, String errorMessage) {
}
});
YourActivity.kt
import io.taptalk.taptalklive.TapTalkLive
import io.taptalk.taptalklive.Listener.TTLCreateCaseListener
...
TapTalkLive.createNewCase(TOPIC_ID, FIRST_MESSAGE, object : TTLCreateCaseListener() {
override fun onSuccess(caseModel: TTLCaseModel?) {
// Successfully created a new case
}
override fun onError(errorCode: String?, errorMessage: String?) {
}
})
ParametersTOPIC_ID: (int) ID of the selected topic, can be obtained from getTopicListFIRST_MESSAGE: (String) message to be sent by the user to start a case