工厂类

使用 Samsung 和 Google 工厂类创建 ResellerService 对象。 借助 ResellerService 对象,您可以使用一组常用的方法声明并注册三星和其他 Android 设备。

三星转销商服务工厂

您需要先使用 KDP 完成初始配置,然后才能使用 SamsungResellerServiceFactory 类生成 ResellerService 对象。以下是使用 SamsungResellerServiceFactory 类创建 ResellerService 对象的方法签名:

public static ResellerService createResellerService(String resellerId, String serviceAccountKeyFilePath, String clientIdentifier) throws CommonException;

输入参数

属性名称 价值 必需 说明
resellerId string 兼容 转销商的唯一标识符,由 KDP 系统提供。
serviceAccountKeyFilePath string 兼容 服务帐号密钥的文件路径。
clientIdentifier string 兼容 KDP 系统提供的客户端标识符。

错误行为

发生错误时,库会抛出 CommonException,其中包含以下错误代码之一:

错误代码
INVALID_RESELLER_ID
AUTHORIZATION_FAIL

GoogleResellerServiceFactory

您必须先以转销商的身份开始使用零触摸注册,然后才能使用 GoogleResellerServiceFactory 类生成 ResellerService 对象。

以下是使用 GoogleResellerServiceFactory 类创建 ResellerService 对象的方法签名:

public static ResellerService createResellerService(long resellerId, String serviceAccountKeyFilePath) throws CommonException, InterruptedException;

输入参数

属性名称 价值 必需 说明
resellerId long 兼容 转销商的唯一标识符(由零触摸系统提供)。
serviceAccountKeyFilePath string 兼容 服务帐号密钥的文件路径。

错误行为

发生错误时,库会抛出 CommonException,其中包含以下错误代码之一:

错误代码
INVALID_PARAM_DEFAULT
INVALID_RESELLER_ID
INTERNAL_SERVER_ERROR