# btPrinterDisconnect

## Description

Disconnects a bluetooth printer from the device.

## Input / Parameter

| Name    | Description                                                         | Input Type  | Default | Options | Required |
| ------- | ------------------------------------------------------------------- | ----------- | ------- | ------- | -------- |
| timeout | The duration the printer can be idle for before it is disconnected. | String/Text | -       | -       | Yes      |

## Output

N/A

## Callback

### callback

The function to be executed if the printer is disconnected successfully.

### errCallback

The function to be executed if the printer is not disconnected successfully.

## Video

Coming Soon.

## Example

The user wants to disconnect a printer from their device.

### Steps

1. Call the function `btPrinterDisconnect` in a button component.

   ![](/files/SqdBjfnX9618z4uSQ5oS)
2. Call the function `infoDialog` in the callbacks of the `btPrinterDisconnect` function.

   ![](/files/XM9F2g1l4SDxe2SrQuNE)

   ![](/files/MsKe6naGAxvcvtjO8itv)

   ![](/files/hc4pO1urBOWA877AnaNd)

### Result

If the printer is idle longer than the timeout duration passed, the printer will be disconnected and the success infoDialog will appear. If the printer is not disconnected successfully, the error infoDialog will appear.

1. Select the printer to disconnect from the combobox.

   ![](https://github.com/OrangeKloud/emobiq-documentation/blob/master/document/client/006-actions-and-visual-logic/action-reference/cordova/Printer/btPrinterDisconnect/btPrinterDisconnect-result-1.jpg)
2. Press the Disconnect button. If the printer is disconnected successfully, the success infoDialog will appear. If the printer is not disconnected successfully, the error dialog will appear.

## Links


---

# Agent Instructions: 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:

```
GET https://docs.emobiq.com/emobiq-client/006-actions-and-visual-logic/action-reference/cordova/printer/btprinterdisconnect.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
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.
