> For the complete documentation index, see [llms.txt](https://docs.payments.thalescloud.io/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.payments.thalescloud.io/nfc-wallet-sdk-android/additional-features/handle-visa-multiple-aids.md).

# Handle Visa multiple AIDs

## Overview

Use the NFC Wallet SDK to manage multiple Visa AIDs on a digital card.

You can:

* Detect whether a digital card exposes multiple AIDs.
* Read the AID list (sorted by priority).
* Update AID priority.
* Lock or unlock an AID.

## SDK integration

### Detect multiple AIDs

Use `DigitalizedCard.isMultiAids()`.

### Read AIDs

Use `DigitalizedCard.getAllAids()` to return a list of `Aid` objects.

The list is sorted by priority (highest priority first).

Each `Aid` includes:

* `Aid.getAid()`: Returns the AID as a `String`.
* `Aid.getLabel()`: Returns the label as a `String`.
* `Aid.getLockStatus()`: Returns `true` when the AID is locked.
* `Aid.setLockStatus(boolean locked)`: Locks or unlocks the AID.

{% hint style="info" %}
A terminal returns status word `6A81` when it sends **SELECT** to a locked AID.
{% endhint %}

### Update priority and lock status

To update priority (and optionally lock status), rebuild a list containing **all AIDs** in the desired priority order. Then call `DigitalizedCard.updateAidList(...)`.

```java
// Get a reference to a digital card using its tokenId.
DigitalizedCard digitalizedCard = DigitalizedCardManager.getDigitalizedCard(tokenId);

// Check whether this digital card exposes multiple AIDs.
if (digitalizedCard.isMultiAids()) {

    // Read all AIDs. The list is sorted by priority (highest first).
    List<Aid> aids = digitalizedCard.getAllAids();

    // Lock the highest-priority AID.
    aids.get(0).setLockStatus(true);

    // Rebuild the list in the desired priority order.
    // IMPORTANT: The updated list must contain all AIDs.
    List<Aid> updatedAids = new ArrayList<>();
    updatedAids.add(aids.get(1));
    updatedAids.add(aids.get(0));
    // Add remaining AIDs in the required order.

    // Apply both the new priority and lock status changes.
    digitalizedCard.updateAidList(updatedAids);
}
```


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## 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.payments.thalescloud.io/nfc-wallet-sdk-android/additional-features/handle-visa-multiple-aids.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.
