Skip to main content

onBase

Description

info

The SDK will call back this interface. On success, it calls the onSuccess method and returns specific data; on failure, it calls onError and returns error info.

Function Prototype


public interface OnBase<T> {
/**
* Fail
*/
void onError(int code, String error);

/**
* Success
*/
void onSuccess(T data);
}

Return Results

NameDescription
onErrorError code and error info
onSuccessGeneric type (specified according to the calling function's signature)