Factory classes

Stay organized with collections Save and categorize content based on your preferences.

Use the Samsung and Google factory classes to create ResellerService objects. With ResellerService objects, a common set of methods is available to claim and enroll Samsung and other Android devices.

SamsungResellerServiceFactory

Before you can use the SamsungResellerServiceFactory class to generate a ResellerService object, you need to onboard with KDP. Below is the method signature for creating a ResellerService object using the SamsungResellerServiceFactory class:

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

Input parameters

Property name Value Required Description
resellerId string Yes Reseller's unique identifier, provided by the KDP system.
serviceAccountKeyFilePath string Yes File path to the service account key.
clientIdentifier string Yes Client identifier provided by the KDP system.

Error behavior

When an error occurs, the library throws a CommonException containing one of the following error codes:

Error code
INVALID_RESELLER_ID
AUTHORIZATION_FAIL

GoogleResellerServiceFactory

Before you can use the GoogleResellerServiceFactory class to generate a ResellerService object, you must onboard to zero-touch enrollment as a reseller.

Here's the method signature for creating a ResellerService object using the GoogleResellerServiceFactory class:

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

Input parameters

Property name Value Required Description
resellerId long Yes Reseller's unique identifier, provided by the zero-touch system.
serviceAccountKeyFilePath string Yes File path to the service account key.

Error behavior

When an error occurs, the library throws a CommonException containing one of the following error codes:

Error code
INVALID_PARAM_DEFAULT
INVALID_RESELLER_ID
INTERNAL_SERVER_ERROR