Alipay+ DocsAlipay+ Docs

getAvailableCredentialsCounts

Call the getAvailableCredentialsCounts API to obtain the number of available credentials.

Method signature

copy
int getAvailableCredentialsCounts()

Request parameters

N/A

Response parameters

item

Type

Description

Required

/

int

The number of available credentials. If the SDK failed to connect successfully, this API returns a -2 and a TOKEN_NOT_CONNECTED error message is generated. A successful connection returns the number of available credentials.

Required

Sample

copy
manager = ACTapManager.getInstance(this.getApplication());

int availableCredentialsCounts = manager.getAvailableCredentialsCounts();
if(availableCredentialsCounts < X){
    manager.replenish()
}