> For the complete documentation index, see [llms.txt](https://docs.vida.id/identity-stack/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.vida.id/identity-stack/authentication/authentication-factors/cryptographic-token-pki/integration-methods/sdk/android-development-kit/signing-messages.md).

# Signing Messages

The mobile app can utilise the following methods in the CDK to sign messages with or without user presence

* `SignMessage(context: Context, message: Message)`
* `SignMessageWithUserPresence(context: Context, message: Message, password: String)`
* `SignMessageWithUserPresence(activity: androidx.fragment.app.FragmentActivity, message: Message, callback: SignCallback)`

Only way to access the message signature is from the callback of these functions (either return value or parameter value in callback).

### **Enabling Biometrics for User Presence**

This function allows the user to enable biometric authentication for signing messages with user presence.

To enable biometrics for user presence, use the function `EnableBiometrics(activity: androidx.fragment.app.FragmentActivity, password: String, callback: EnableBiometricsCallback)`.

If the device does not support biometrics, calling `EnableBiometrics()` will throw an `IllegalStateException`.

### **Disabling Biometrics**

This function disables biometric authentication for user presence

To disable biometrics, use the function `DisableBiometrics(context: Context, password: ByteArray, callback: DisableBiometricsCallback?)`.

### **Checking Biometric Availability**

This function returns a boolean value indicating whether the device supports biometric authentication.

To determine if biometrics are available on the device, use the function `IsBiometryAvailable() -> Bool`.

Note: Biometric availability may vary depending on the device and Android version. It's important to handle cases where biometrics are not available or supported.
