# deviceAddTouchSensor

## Description

Adds touch sensor feature for the user's mobile device. To be able to use this function properly, the mobile device must have a touch sensor and the user must set up the fingerprint authentication in their device setting beforehand.

## Input / Parameter

| Name     | Description                                                             | Input Type  | Default | Options | Required |
| -------- | ----------------------------------------------------------------------- | ----------- | ------- | ------- | -------- |
| key      | The key in the device keychain.                                         | String/Text | -       | -       | Yes      |
| password | The password used to create the credential string for encrypted token.. | String/Text | -       | -       | Yes      |

## Output

N/A

## Callback

### callback

The function to be executed if touch sensor feature is added successfully.

## Video

Coming Soon.

## Example

The user wants to add touch sensor to their mobile device.

### Steps

| No. | Description                      |                                                                                                                                                                       |
| --- | -------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| 1.  | ![](/files/Lyew7yF45VEwm8sJwV8D) | Drag a button component to a page in the mobile designer. Select the event `click` and drag the `deviceAddTouchSensor` function to the event flow.                    |
| 2.  | ![](/files/e57SaKNicGpOllhoP4wY) | Fill in the parameters of the function.                                                                                                                               |
| 3.  | ![](/files/ggXYclQ2jj1ONHtnXmNj) | Drag the function that is executed when the touch sensor feature is added to the mobile device successfully. In this example, we are using the `infoDialog` function. |
| 4.  | ![](/files/PJzliBFpBcTVfXlIacNc) | Fill in the parameters of the function.                                                                                                                               |

### Result

When the button is pressed, the mobile device will ask for fingerprint authentication. Touch the touch sensor of the device for the fingerprint to be recognized. The dialog will show the input passed.

## 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/device/deviceaddtouchsensor.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.
