目录

CLASS info
public class ResolveTaskHelper

Auxiliary class for processing a task. The excuteTask method of this class processes the callback result and returns the callback result to onActivityResult(int, int, Intent) of the current activity. onActivityResult carries the pass creation result code, for example, Activity.RESULT_OK, indicating successful pass creation.
Currently, WalletPassConstant provide the following types of result codes:

ERROR_CODE_SERVICE_UNAVAILABLE

ERROR_CODE_UNSUPPORTED_API_REQUEST

ERROR_CODE_INTERNAL_ERROR

ERROR_CODE_OTHERS

ERROR_CODE_INVALID_PARAMETERS

ERROR_CODE_USER_ACCOUNT_ERROR

ERROR_CODE_DEVELOPER_ERROR

ERROR_CODE_MERCHANT_ACCOUNT_ERROR

Constant Summary

TypeNameDesc
intRESULT_FAILReturns a failure when an undefined error occurs.

Public Method Summary

Return typeMethod name
static <TResult extends IResolvableTaskResult> voidexcuteTask(@NonNull Task<TResult> task,

       @NonNull Activity activity, int requestCode)

Processes the activity callback for the pass creation task.

Public Method

Method

public static <TResult extends IResolvableTaskResult> void excuteTask(@NonNull Task<TResult> task, @NonNull Activity activity, int requestCode)

Requests HMS Core for adding a pass and implements a callback for the activity.

Return

Typedesc
Task<TResult>Task callback result.
ActivityActivity object.
intRequest code.