Android SDK - Device Info Module

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:

Service Description
UI Service com.paydiant.android.ui.service.deviceinfo.DeviceInfoService
Core Service com.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.

Service Description
UI Service com.paydiant.android.ui.service.deviceinfo.IDeviceInfoServiceListener

or an overridden instance of:
com.paydiant.android.ui.service.deviceinfo.DeviceInfoServiceListenerAdapter
Set Listener void setDeviceInfoServiceListener(IDeviceInfoServiceListener listener);
Remove Listener void 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.

Item Description
UI Method public 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.
Success void onAddAdditionalDeviceInfoSuccess();
Returns no parameters.
Failure void 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:

Error Description
400 Could not add properties due to invalid parameters in the request.
403 Access to the server is prohibited because the user is not logged-in.
500 An 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.

Item Description
UI Method public void retrieveAdditionalDeviceInfo();
Success void onRetrieveAdditionalDeviceInfoSuccess (AdditionalInformationList additionalInformationList);
Returns the additionalInformationList which is a set of AdditionalInformation objects, each of which defines a metadata property persisted for the device.
Failure void 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:

Error Description
403 Access to the server is prohibited because the user is not logged-in.
500 An 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.

Item Description
UI Method public 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.
Success void onUpdateAdditionalDeviceInfoSuccess();
Returns no additional parameters.
Failure void 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 Method public void updateAdditionalDeviceInfo (AdditionalInformationList additionalInformationList);

Errors

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

Error Description
400 Could not update device properties due to invalid parameters in the request.
403 Access to the server is prohibited because the user is not logged-in.
500 An 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.

Item Description
UI Method public void deleteAdditionalDeviceInfo (String... deleteKeys);<br.
deleteKeys - A comma-separated list of one or more existing property keys to be deleted from the device record.
Success void onDeleteAdditionalDeviceInfoSuccess();
Returns no additional parameters.
Failure void 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 Method public 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:

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

Other Resources

javadocs

Feedback

Have feedback?

Let us know.