{"title":"Query the PED object for device information","category":"default","creationDate":1776961627,"content":"<h2 id=\"method\">Method<\/h2>\n<table>\n<thead>\n<tr>\n<th>Name<\/th>\n<th>Description<\/th>\n<\/tr>\n<\/thead>\n<tbody>\n<tr>\n<td><code>refreshPedState<\/code><\/td>\n<td>Retrieves the state of the PED if connectivity with the PED was lost.<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<h2 id=\"parameters\">Parameters<\/h2>\n<table>\n<thead>\n<tr>\n<th>Name<\/th>\n<th>Description<\/th>\n<\/tr>\n<\/thead>\n<tbody>\n<tr>\n<td><code>retries<\/code><\/td>\n<td>Number of retries when attempting to refresh the PED state.<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<h2 id=\"callback\">Callback<\/h2>\n<table>\n<thead>\n<tr>\n<th>Name<\/th>\n<th>Description<\/th>\n<\/tr>\n<\/thead>\n<tbody>\n<tr>\n<td><code>pedStateChangeCallback<\/code><\/td>\n<td><code>refreshPedState<\/code> triggers this callback.It returns if the PED state has changed, for example, if the PED has come online.<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<h2 id=\"ped-states\">PED States<\/h2>\n<table style=\"width:100%;\"><colgroup><col style=\"width: 25%\"><col style=\"width: 74%\"><\/colgroup><thead><tr class=\"header\"><th>State<\/th><th>Description<\/th><\/tr><\/thead><tbody><tr><td><code>ped_state_undetected<\/code><\/td><td>Incorrect IP, cannot detect the PED. This is a final state.<\/td><\/tr><tr><td><code>ped_state_detected<\/code><\/td><td>PED detected, correct serial\/IP address.<\/td><\/tr><tr><td><code>ped_state_identified<\/code><\/td><td>Valid PED.<\/td><\/tr><tr><td><code>ped_state_registered<\/code><\/td><td>PED is registered, final result on RegisterPED.<\/td><\/tr><tr><td><code>ped_state_config_synced<\/code><\/td><td>PED is has synchronized its configuration.<\/td><\/tr><tr><td><code>ped_state_wait_reboot_ready<\/code><\/td><td>PED is rebooting.<\/td><\/tr><tr><td><code>ped_state_wait_ready_for_transaction<\/code><\/td><td>PED must complete another process before it is ready to create a transaction.<\/td><\/tr><tr><td><code>ped_state_not_ready<\/code><\/td><td>PED is busy. This is a final state.\u00a0<\/td><\/tr><tr><td><code>ped_state_ready_for_transaction<\/code><\/td><td>PED is ready for transaction.<\/td><\/tr><tr><td><code>ped_state_tender<\/code><\/td><td>PED is busy with a tender.<\/td><\/tr><\/tbody><\/table>\n<h2 id=\"result-codes\">Result codes<\/h2>\n<table>\n<thead>\n<tr>\n<th>Name<\/th>\n<th>Description<\/th>\n<\/tr>\n<\/thead>\n<tbody>\n<tr>\n<td><code>ADYEN_LIBRARY_OK<\/code><\/td>\n<td>Everything is ok, library will poll for updated terminal state.<\/td>\n<\/tr>\n<tr>\n<td><code>ADYEN_LIBRARY_CONFIRM_QUERY_PED_STATE_TERMINAL_ID_UNKNOWN<\/code><\/td>\n<td>Library is currently polling, call is rejected.<\/td>\n<\/tr>\n<tr>\n<td><code>ADYEN_LIBRARY_CONFIRM_QUERY_PED_STATE_INVALID_ARGUMENTS<\/code><\/td>\n<td>Invalid Arguments specified, use a positive number of <code>poll_retries<\/code>.<\/td>\n<\/tr>\n<tr>\n<td><code>ADYEN_LIBRARY_CONFIRM_QUERY_PED_STATE_INVALID_STATE<\/code><\/td>\n<td>Library is already in polling state, you will receive an <code>ped_state<\/code> callback when the library receives an valid state.<\/td>\n<\/tr>\n<tr>\n<td><code>ADYEN_FAIL_MALLOC<\/code><\/td>\n<td>Cannot allocate memory, system out of memory.<\/td>\n<\/tr>\n<tr>\n<td><code>ADYEN_INVALID_REF_OBJ<\/code><\/td>\n<td>Internal communication reference object is illegal.<\/td>\n<\/tr>\n<\/tbody>\n<\/table>","url":"https:\/\/docs.adyen.com\/pt\/point-of-sale\/classic-library-deprecation\/classic-library-integrations\/java-native-interface-integration\/key-steps-jni\/process-a-basic-transaction-jni\/query-the-ped-object-for-device-information-jni","articleFields":{"id":"24217583","type":"page","_expandable":{"operations":""},"status":"current","last_edit_on":"30-04-2019 11:32"},"algolia":{"url":"https:\/\/docs.adyen.com\/pt\/point-of-sale\/classic-library-deprecation\/classic-library-integrations\/java-native-interface-integration\/key-steps-jni\/process-a-basic-transaction-jni\/query-the-ped-object-for-device-information-jni","title":"Query the PED object for device information","content":"Method\n\n\n\nName\nDescription\n\n\n\n\nrefreshPedState\nRetrieves the state of the PED if connectivity with the PED was lost.\n\n\n\nParameters\n\n\n\nName\nDescription\n\n\n\n\nretries\nNumber of retries when attempting to refresh the PED state.\n\n\n\nCallback\n\n\n\nName\nDescription\n\n\n\n\npedStateChangeCallback\nrefreshPedState triggers this callback.It returns if the PED state has changed, for example, if the PED has come online.\n\n\n\nPED States\nStateDescriptionped_state_undetectedIncorrect IP, cannot detect the PED. This is a final state.ped_state_detectedPED detected, correct serial\/IP address.ped_state_identifiedValid PED.ped_state_registeredPED is registered, final result on RegisterPED.ped_state_config_syncedPED is has synchronized its configuration.ped_state_wait_reboot_readyPED is rebooting.ped_state_wait_ready_for_transactionPED must complete another process before it is ready to create a transaction.ped_state_not_readyPED is busy. This is a final state.\u00a0ped_state_ready_for_transactionPED is ready for transaction.ped_state_tenderPED is busy with a tender.\nResult codes\n\n\n\nName\nDescription\n\n\n\n\nADYEN_LIBRARY_OK\nEverything is ok, library will poll for updated terminal state.\n\n\nADYEN_LIBRARY_CONFIRM_QUERY_PED_STATE_TERMINAL_ID_UNKNOWN\nLibrary is currently polling, call is rejected.\n\n\nADYEN_LIBRARY_CONFIRM_QUERY_PED_STATE_INVALID_ARGUMENTS\nInvalid Arguments specified, use a positive number of poll_retries.\n\n\nADYEN_LIBRARY_CONFIRM_QUERY_PED_STATE_INVALID_STATE\nLibrary is already in polling state, you will receive an ped_state callback when the library receives an valid state.\n\n\nADYEN_FAIL_MALLOC\nCannot allocate memory, system out of memory.\n\n\nADYEN_INVALID_REF_OBJ\nInternal communication reference object is illegal.\n\n\n","type":"page","locale":"pt","boost":13,"hierarchy":{"lvl0":"Home","lvl1":"Terminais","lvl2":"Deprecation of classic libraries","lvl3":"Library integrations","lvl4":"Java Native Interface integration","lvl5":"Key steps","lvl6":"Process a basic transaction","lvl7":"Query the PED object for device information"},"hierarchy_url":{"lvl0":"https:\/\/docs.adyen.com\/pt","lvl1":"https:\/\/docs.adyen.com\/pt\/point-of-sale","lvl2":"https:\/\/docs.adyen.com\/pt\/point-of-sale\/classic-library-deprecation","lvl3":"https:\/\/docs.adyen.com\/pt\/point-of-sale\/classic-library-deprecation\/classic-library-integrations","lvl4":"https:\/\/docs.adyen.com\/pt\/point-of-sale\/classic-library-deprecation\/classic-library-integrations\/java-native-interface-integration","lvl5":"https:\/\/docs.adyen.com\/pt\/point-of-sale\/classic-library-deprecation\/classic-library-integrations\/java-native-interface-integration\/key-steps-jni","lvl6":"https:\/\/docs.adyen.com\/pt\/point-of-sale\/classic-library-deprecation\/classic-library-integrations\/java-native-interface-integration\/key-steps-jni\/process-a-basic-transaction-jni","lvl7":"\/pt\/point-of-sale\/classic-library-deprecation\/classic-library-integrations\/java-native-interface-integration\/key-steps-jni\/process-a-basic-transaction-jni\/query-the-ped-object-for-device-information-jni"},"levels":8,"category":"In-person payments","category_color":"green","tags":["Query","object","device","information"]}}
