> For the complete documentation index, see [llms.txt](https://docs.verifone.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.verifone.com/psdk-latest/psdk-user-guide-and-training/psdk-user-guide/device-management.md).

# Device Management

Some operations like Reboot, Reset, Shutdown, Test host connection, Changing and Resetting Manager passcodes and invoking terminal heartbeat are part of DeviceManagement. In PSDK [DeviceManagementAction](https://docs.verifone.com/psdk-api-latest/android-java/index/devicemanagementaction) class provides some of the useful Device Management operations.

[DeviceManagementAction](https://docs.verifone.com/psdk-api-latest/android-java/index/devicemanagementaction) performs an action on the payment terminal. some of the most frequently used diagnostic actions are such as reboot, shutdown, test host connection, check for terminal heartbeat, change password and reset password. Diagnostic actions to test host connection, check for terminal heartbeat, change password and reset password are applicable only for AGPA solutions

> * **DeviceManagementAction.REBOOT** - The diagnostic action Reboot up on calling reboots the payment terminal.
> * **DeviceManagementAction.SHUTDOWN** - The diagnostic action Shutdown up on calling shutdowns the payment terminal.
> * **DeviceManagementAction.TEST\_HOST\_CONNECTION** - The diagnostic action Host Connection Test is used to test whether the live host is reachable or not.
> * **DeviceManagementAction.TMS\_MANUAL\_HEARTBEAT** - Request payment application to trigger a manual VHQ heartbeat.
> * **DeviceManagementAction.VF\_CHANGE\_PASSWORD** - Request payment application to start change (manager) password flow.
> * **DeviceManagementAction.VF\_RESET\_PASSWORD** - Request payment application to start
> * reset (manager) password flow.

***

Accessibility-specific device management actions are discussed under separate section below. Below API shows how to perform device management actions.

Handle the result of the API call in the CommerceListenerAdapter callback method handleDeviceManagementEvent. The handle DeviceManagementEvent is received when a specific DeviceManagementAction has been processed on the payment terminal.

{% code overflow="wrap" lineNumbers="true" %}

```java
@Override
public void handleDeviceManagementEvent(DeviceManagementEvent deviceManagementEvent) {
  switch(event.getActionType())
  {
      case REBOOT:
          // reboot terminal
          break;

      case SHUTDOWN:
          // Shutdown the terminal
          break;

      // Do Validation of the host connection
      case TEST_HOST_CONNECTION:
          if(event.getStatus() == StatusCode.SUCCESS)
          {
              // Host connection success
          } else {
              // Host connection failed
          }
          break;

      // Check for manual heartbeat
      case TMS_MANUAL_HEARTBEAT:
          if(event.getStatus() == StatusCode.SUCCESS)
          {
              // TMS Heart beat request success ;
          } else {
              // TMS Heart beat request Error ;
          }
          break;

      // Do Validation for password change
      case VF_CHANGE_PASSWORD:
          if(event.getStatus() == StatusCode.SUCCESS) {
              //DeviceManagement, VF_CHANGE_PASSWORD success;
          } else {
              //DeviceManagement, VF_CHANGE_PASSWORD error;
          }
          break;

      // Do Validation for password reset
      case VF_RESET_PASSWORD:
          if(event.getStatus() == StatusCode.SUCCESS) {
              //DeviceManagement, VF_RESET_PASSWORD success;
          } else {
              //DeviceManagement, VF_RESET_PASSWORD Error;
          }
          break;
  } // End switch
}
```

{% endcode %}

Password change and reset password requires userInputRequest from terminal to be handled in POS application.Please refer [psdk-device-functions](/psdk-latest/reference-material/code-labs.md) code labs for handling password prompts in your pos application. Configuration parameters like TransactionManager.PASSWORD\_AT\_POS\_CAPABILITY and TransactionManager.INPUT\_CONFIRMATION\_CAPABILITY should be enabled to handle password inputs(required for change and reset password) at the POS side during login request.

### Configuring Accessiblity mode

AGPA allows to enable Navigator features to enhance accessiblity for visually impared or blind customers. These modes are enabled via TransactionManager.performDeviceManagementCommand method, see example below:

{% code overflow="wrap" lineNumbers="true" %}

```java
Map<String, String> assistant_params = new HashMap<>();
map.put(TranasctionManager.VF_ASSISTANT_FOREGROUND_COLOR, "FFFFFF");
map.put(TransactionManager.VF_ASSISTANT_BACKGROUND_COLOR, "000000");
DeviceManagementCommand accessisbility_enable = new DeviceManagementCommand(DeviceManagementAction.NAVIGATOR_ENABLE_ASSISTANT, assistnat_params);
Status status =  paymentSdk.getTransactionManager().performDeviceManagementCommand(accessisbility_enable);
```

{% endcode %}

**PSDK supports 3 navigator device management commands:**

* DeviceManagementAction.NAVIGATOR\_ENABLE\_ACCESSIBILITY // Designed for users who are blind or have severe visual impairments
* DeviceManagementAction.NAVIGATOR\_ENABLE\_ASSISTANT // Tailored for users with partial vision or color blindness.
* DeviceManagementAction.NAVIGATOR\_DISABLE // Disable special-needs mode

DeviceManagementAction.NAVIGATOR\_ENABLE\_ASSISTANT supports parameters to set background and foreground color passed in using HEX RGB notation (see example) All of these modes should be enabled via performDeviceManagementCommand API

Accessiblity mode can also be enabled by customer themselves on the termianl. When this happens PSDK will receive a notification event of type NAVIGATOR\_SETTINGS.

{% hint style="info" %}
**See also**

* [DeviceManagementAction](https://docs.verifone.com/psdk-api-latest/android-java/index/devicemanagementaction)
* [DeviceManagementEvent](https://docs.verifone.com/psdk-api-latest/android-java/index/devicemanagementevent)
  {% endhint %}


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter, and the optional `goal` query parameter:

```
GET https://docs.verifone.com/psdk-latest/psdk-user-guide-and-training/psdk-user-guide/device-management.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
