# btPrinterIsConnected

## Description

Checks whether a printer is connected to the device.

## Input / Parameter

N/A

## Output

N/A

## Callback

### yesCallback

The function to be executed if the printer is connected.

### noCallback

The function to be executed if the printer is not connected.

## Video

Coming Soon.

## Example

The user wants to check whether a printer is connected to their device.

### Steps

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

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

   ![](/files/gnjB9DPonyS8iBgUZw0b)

   ![](/files/RKzFtd4YwbYMPYdtnXCJ)

   ![](/files/N6vH0JeJPuN8aDwUHiMq)

### Result

1. Select the printer to check from the combobox.

   ![](/files/0Ti2rxSezzxeRL928OWg)
2. Press the Is Connected button. If the printer is connected to the device, the success infoDialog will appear. If the printer is not connected, the error dialog will appear.

   ![](/files/hV8YPDtNzU3GZeuuZ8EB)

## 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/btprinterisconnected.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.
