> For the complete documentation index, see [llms.txt](https://docs.emobiq.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.emobiq.com/emobiq-client/006-actions-and-visual-logic/action-reference/cordova/printer/btprinterisconnected.md).

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

   ![](https://399701567-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FwmJ1RKjM2uNFaL6fO3Xu%2Fuploads%2Fgit-blob-561ed34f692ff423c0a51dc5e66cd7d0b3d6e8f6%2FbtPrinterIsConnected-step-1.png?alt=media)
2. Call the function `infoDialog` in the callbacks of the `btPrinterIsConnected` function.

   ![](https://399701567-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FwmJ1RKjM2uNFaL6fO3Xu%2Fuploads%2Fgit-blob-3b206cdaa06e79ac08d9acb808d757cc677dcc40%2FbtPrinterIsConnected-step-2.png?alt=media)

   ![](https://399701567-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FwmJ1RKjM2uNFaL6fO3Xu%2Fuploads%2Fgit-blob-3714e575099ef770388bb82e5ae326f200e0bd97%2FbtPrinterIsConnected-step-3.png?alt=media)

   ![](https://399701567-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FwmJ1RKjM2uNFaL6fO3Xu%2Fuploads%2Fgit-blob-4d99f8b394dc44bb86602bd9cacfad5ad69ba3d1%2FbtPrinterIsConnected-step-4.png?alt=media)

### Result

1. Select the printer to check from the combobox.

   ![](https://399701567-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FwmJ1RKjM2uNFaL6fO3Xu%2Fuploads%2Fgit-blob-1e76374054278d516128e7d4ec6f1cf9fb6bf092%2FbtPrinterIsConnected-result-1.jpg?alt=media)
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.

   ![](https://399701567-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FwmJ1RKjM2uNFaL6fO3Xu%2Fuploads%2Fgit-blob-4f16d747f9928bbcf5e4bbdceccdb818aea7a34d%2FbtPrinterIsConnected-result-2.jpg?alt=media)

## Links
