Android SDK - Device Info Module

DOCS

Last updated: Aug 15th, 7:13am

The Device Info module of the SDK exposes the endpoints that allow the developer to capture and retrieve custom metadata properties relating to the mobile device on which the app is installed.

The services exposed in the device info module are located in the following package classes:

ServiceDescription
UI Servicecom.paydiant.android.ui.service.deviceinfo.DeviceInfoService
Core Servicecom.paydiant.android.core.facade.DeviceInfoManagerFacade

Set UI Package Device Info Service Listeners

To invoke the callback methods returned by the Paydiant service in response to the methods invoked by the Device Management module of the SDK, the developer must set an implementation of the listener interface in the UI Service class.

ServiceDescription
UI Servicecom.paydiant.android.ui.service.deviceinfo.IDeviceInfoServiceListener

or an overridden instance of:
com.paydiant.android.ui.service.deviceinfo.DeviceInfoServiceListenerAdapter
Set Listenervoid setDeviceInfoServiceListener(IDeviceInfoServiceListener listener);
Remove Listenervoid removeListener();
Call this method to remove the device info listener and set it to null.

Add Custom Device Properties

Invoke this method from the core or UI service package to pass custom metadata properties related to the device into the Paydiant service.

ItemDescription
UI Methodpublic void addAdditionalDeviceInfo (AdditionalInformationList additionalDeviceInfoList);

additionalInformationList
A container for one or more AdditionalInformation objects, each of which defines the key and value for a custom metadata property to be added to the device data.
Successvoid onAddAdditionalDeviceInfoSuccess();
Returns no parameters.
Failurevoid onDeviceInfoServiceError(PaydiantException exception)
Returns an instance of PaydiantException detailing the nature of the failure, including the event code for the calling method and the relevant errors.

Errors

When adding custom device properties, the following errors are applicable for the ADD_DEVICE_INFO_EVENT:

ErrorDescription
400Could not add properties due to invalid parameters in the request.
403Access to the server is prohibited because the user is not logged-in.
500An unknown error occurred internally in the server.

Retrieve Custom Device Property Values

Invoke this method from the core or UI service package to retrieve the list of current device metadata properties and values.

ItemDescription
UI Methodpublic void retrieveAdditionalDeviceInfo();
Successvoid onRetrieveAdditionalDeviceInfoSuccess (AdditionalInformationList additionalInformationList);
Returns the additionalInformationList which is a set of AdditionalInformation objects, each of which defines a metadata property persisted for the device.
Failurevoid onDeviceInfoServiceError(PaydiantException exception)
Returns an instance of PaydiantException detailing the nature of the failure, including the event code for the calling method and the relevant errors.

Errors

When retrieving device property values, the following errors are applicable for the RETRIEVE_DEVICE_INFO_EVENT:

ErrorDescription
403Access to the server is prohibited because the user is not logged-in.
500An unknown error occurred internally in the server.

Update Custom Device Properties

Invoke this method from the core or UI service package to update the values of the metadata properties specified in the parameter.

ItemDescription
UI Methodpublic void updateAdditionalDeviceInfo (AdditionalInformationList additionalInformationList);

additionalInformationList- A container for one or more AdditionalInformation objects, each of which specifies the key and updated value for an existing metadata property to be modified.
Successvoid onUpdateAdditionalDeviceInfoSuccess();
Returns no additional parameters.
Failurevoid onDeviceInfoServiceError(PaydiantException exception)
Returns an instance of PaydiantException detailing the nature of the failure, including the event code for the calling method and the relevant errors.
Core Methodpublic void updateAdditionalDeviceInfo (AdditionalInformationList additionalInformationList);

Errors

When updating device properties, the following errors are applicable for the UPDATE_DEVICE_INFO_EVENT:

ErrorDescription
400Could not update device properties due to invalid parameters in the request.
403Access to the server is prohibited because the user is not logged-in.
500An unknown error occurred internally in the server.

Delete Custom Device Properties

Invoke this method from the core or UI service package to delete the metadata properties specified in the parameter from the device info record.

ItemDescription
UI Methodpublic void deleteAdditionalDeviceInfo (String... deleteKeys);<br.
deleteKeys - A comma-separated list of one or more existing property keys to be deleted from the device record.
Successvoid onDeleteAdditionalDeviceInfoSuccess();
Returns no additional parameters.
Failurevoid onDeviceInfoServiceError(PaydiantException exception)
Returns an instance of PaydiantException detailing the nature of the failure, including the event code for the calling method and the relevant errors.
Core Methodpublic void deleteAdditionalDeviceInfo (String... deleteKeys);

deleteKeys - A comma-separated list of one or more existing property keys to be deleted from the device record.

Errors

When deleting device properties, the following errors are applicable for the DELETE_DEVICE_INFO_EVENT:

ErrorDescription
400Could not delete device properties due to invalid parameters in the request.
403Access to the server is prohibited because the user is not logged-in.
500An unknown error occurred internally in the server.