# ACResultCallback

> Callback interface for asynchronous operation results.

The **ACResultCallback** API is the general callback API.

## Method signature

```java
public interface ACResultCallback<T> {
    void onResult(T result, String errorCode, String errorMsg);
}
```

## Request parameters

N/A

## Response parameters

| **Method** | **Item** | **Type** | **Description** | **Required** |
| --- | --- | --- | --- | --- |
| onResult | result | Integer/Boolean | The processing result. The type of this parameter and the possible results depend on the API that uses the callback. The generic type T must be a reference type. For example, use _ACResultCallback<Boolean>_ instead of _ACResultCallback<boolean>_. | Yes |
| onResult | errorCode | String | The error code returned when the operation fails. The value matches `NFCErrorCode.getCode()`. For more information, see [Result codes](nfc-result-codes). | Yes |
| onResult | errorMsg | String | The error message returned when the operation fails. For more information, see [Result codes](nfc-result-codes). | Yes |

## Sample

```java
ACTapManager manager = ACTapManager.getInstance(getApplication());

manager.activatePayment(params, new ACResultCallback<Integer>() {
    @Override
    public void onResult(Integer result, String errorCode, String errorMsg) {
        log("result: " + result + " errorCode: " + errorCode + " errorMsg: " + errorMsg);
    }
});
```