- Download the library, acoclient-1.0.jar.
- Put the acoclient-1.0.jar to android project library directory.
- Use the library as demo below:
AcoResultCallback - To process the response message or errors.
AcoClient - Send message to the API and get response.public void sendMsg(String msg) {
AcoResultCallback acoResultCallback = new AcoResultCallback() {
@Override
public void onResponse(String response) {
// customer code to process the response message
processResponseMessage(response);
}@Override
public void onError(String s) {
Log.i("ERROR", s);
}
};
AcoClient.init(MY_BRAIN_ID, MY_BRAIN_KEY).sendMsg(uid, msg, acoResultCallback);
}