# Add a new Trusted Device

## Steps

There are 2 steps that's needed to add a new Trusted Device:

1. [Show the QR Code](/sdk-reference/android/sign-in-with-device/add-a-new-trusted-device.md#step-1-show-the-qr-code-of-the-new-device) of the New Device
2. [Scan the New Device's QR Code](/sdk-reference/android/sign-in-with-device/add-a-new-trusted-device.md#step-2-scanning-the-qr-code-from-a-trusted-device) using the Trusted Device

![Scan the New Device's QR Code using the Trusted Device](/files/-M19NBju1jJXzPBx6G45)

## Step 1:  Show the QR Code of the New Device

To show the QR Code of the new device:

```java
TrustedDeviceHelper.startEnrollThisDeviceAsTrusted(this, this);
```

This will open an Activity with a QR Code that can be scanned from the Trusted Device.&#x20;

![Different Cases of Registering a New Device as a Trusted Device](/files/-M19Sg5WxruFr5hnqOuD)

#### Case 1: Successfully registered as a Trusted Device

Once it's scanned and registered successfully as, the Activity will show a success image, and close after 3 seconds.

#### Case 2: The new device is still not registered as a Trusted Device after 3 minutes

If after 3 minutes, the new device is still not registered as a Trusted Device, it will show an error message.

## Step 2: Scanning the QR Code from a Trusted Device

To scan the QR Code from a Trusted Device, call the function:

```java
TrustedDeviceHelper.startEnrollOtherDeviceAsTrusted(this, this);
```

This will open an Activity that opens the Camera. It will ask for permission to access the camera. When the QR Code is detected and scanned, it will automatically attempt to register the new device.

![Scanning the New Device's QR Code from the Trusted Device](/files/-M19f9CEfe8YGuFX2E14)

When the QR Code is detected and registered, the SDK will automatically show whether it was successful or if there's an error.

## :tada: You're done!

Now you can authenticate from the new device without requiring approval.&#x20;


---

# 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.cotter.app/sdk-reference/android/sign-in-with-device/add-a-new-trusted-device.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.
