> ## Documentation Index
> Fetch the complete documentation index at: https://docs.median.co/llms.txt
> Use this file to discover all available pages before exploring further.

# Native contacts

> Check contact permissions, retrieve all device contacts, or show the native contact picker with the Native Contacts plugin and the JavaScript Bridge.

The Native Contacts plugin lets users sync their device contacts with your app, enabling form completion and data enrichment based on lookup fields such as email or phone number. You can retrieve all contacts in bulk or prompt the user to select specific contacts through a native UI without building any contact infrastructure yourself.

Common use cases include CRM data entry, field service lookups, social connection suggestions, and E-commerce address autofill.

> [!TIP]
>
> **Test  with our demo page**
>
> We host a ready-made demo page at
>
> that calls the  features through the Median JavaScript Bridge.
> Load it inside your Median app during development, either by setting it
> as your app's website URL in App Studio or by navigating to it from your
> own site, and use it to confirm  works on a real device before
> you add it to your own pages.
>
> The demo page only works inside a Median app with  enabled.
> Opened in a regular mobile or desktop browser, the native features
> won't respond. Remember to switch your app back to your own URL before
> release.

## Why use native contacts

* **CRM integration**: Sync device contacts directly into your app's workflow, eliminating manual data entry for sales and support teams.
* **Field service and operations**: Look up and act on contact data in real time for scheduling, dispatch, and on-site workflows.
* **Social and E-commerce features**: Enable social networking platforms and E-commerce shipping solutions to access contact data natively for connection recommendations or address autofill.

## Implementation guide

### App configuration

1. **Navigate to Native Plugins**: In Median App Studio, go to the Native Plugins section.
2. **Enable Native Contacts**: Toggle the plugin to enabled status.

![Native Contacts plugin toggled on in the Native Plugins section of App Studio](https://mintcdn.com/median-co/7LCOHMhgIef7ewYE/images/docs/74bb8e295d6cfd1f24cbda7448b1d64b0a8c1426aa173aff51416d1874627031-Screenshot_2026-06-29_at_09.08.05.png?fit=max\&auto=format\&n=7LCOHMhgIef7ewYE\&q=85\&s=daa35542fa2f2e0bc4d40dbd3250572b)

Native Contacts plugin enablement

### JavaScript Bridge implementation

All contact functionality is accessed through the [Median JavaScript Bridge](https://docs.median.co/docs/javascript-bridge.md). Each method accepts either a callback function or returns a Promise. See [Promises](https://docs.median.co/docs/javascript-bridge.md#promises) for `async`/`await` patterns.

#### Check contact permission status

Before accessing contacts, check whether the user has already granted permission. The app will automatically prompt for permission on first access, but this method lets you check current status without triggering a prompt.

Median JavaScript Bridge

```javascript JavaScript theme={null}
// Callback style
median.contacts.getPermissionStatus({ callback: myCallback });

// Promise style
const result = await median.contacts.getPermissionStatus({});
console.log(result.status); // for example, "granted"
```

#### Permission status values

Given the differences between both iOS and Android you can expect slightly different permission values based on the operating system.

**iOS**

| Status | Description |
| - | - |
| `granted` | User has granted access |
| `denied` | User has explicitly denied access |
| `restricted` | Access is administratively prohibited (e.g. parental controls or mobile device management policy) |
| `notDetermined` | User has not yet been prompted |

**Android**

| Status | Description |
| - | - |
| `granted` | User has granted access |
| `denied` | User has not yet been asked, or has explicitly denied access |

#### Retrieve all contacts

Fetch the complete contacts list stored on the device.

Median JavaScript Bridge

```javascript JavaScript theme={null}
// Callback style
median.contacts.getAll({ callback: myCallback });

// Promise style
const result = await median.contacts.getAll({});
```

**Note**: On iOS the `note` field is not returned by `getAll()` by default. Accessing it requires the `com.apple.developer.contacts.notes` entitlement, which requires approval by Apple.

#### Present a native contact picker

Display the device's native contact selection UI, allowing the user to choose one or multiple contacts. This is the recommended approach when you need explicit user selection rather than bulk access.

Median JavaScript Bridge

```javascript JavaScript theme={null}
// Callback style
median.contacts.pickContact({
  callback: myCallback,
  multiple: true  // true = allow multi-select; false = single contact only
});

// Promise style
const result = await median.contacts.pickContact({ multiple: false });
```

**Note**: The `note` field is available when using `pickContact()` on iOS, without any additional entitlement.

#### Response format

When permission is granted, all contact methods return an object in the following shape:

```json JSON theme={null}
{
  success: true,
  contacts: [] // array of contact objects
}
```

`contacts` is an array of contact objects. Available fields depend on the platform.

#### Contact fields

**iOS**

| Field | Type |
| - | - |
| `birthday` | String |
| `namePrefix` | String |
| `givenName` | String |
| `middleName` | String |
| `familyName` | String |
| `previousFamilyName` | String |
| `nameSuffix` | String |
| `nickname` | String |
| `phoneticGivenName` | String |
| `phoneticMiddleName` | String |
| `phoneticFamilyName` | String |
| `organizationName` | String |
| `departmentName` | String |
| `jobTitle` | String |
| `note` | String (`pickContact()` only; see above) |
| `phoneNumbers` | Array |
| `emailAddresses` | Array |
| `postalAddresses` | Array |

**Android**

| Field | Type |
| - | - |
| `birthday` | String |
| `givenName` | String |
| `familyName` | String |
| `companyName` | String |
| `companyTitle` | String |
| `note` | String |
| `phoneNumbers` | Array |
| `emailAddresses` | Array |
| `postalAddresses` | Array |

#### Array field schemas

`phoneNumbers`, `emailAddresses`, and `postalAddresses` are arrays of objects. All other fields are strings.

**Phone numbers**

```json JSON theme={null}
{
  "label": "STRING",
  "phoneNumber": "STRING"
}
```

**Email addresses**

```json JSON theme={null}
{
  "label": "STRING",
  "emailAddress": "STRING"
}
```

**Postal addresses**

```jsonc JSON theme={null}
{
  "label": "STRING",
  "street": "STRING",
  "city": "STRING",
  "state": "STRING",             // iOS only
  "region": "STRING",            // Android only
  "postalCode": "STRING",
  "country": "STRING",
  "isoCountryCode": "STRING",    // iOS only
  "subAdministrativeArea": "STRING", // iOS only
  "subLocality": "STRING"        // iOS only
}
```

## Demo app

You can test the native contact features using our virtual demo app on iOS and Android simulators.


## Related topics

- [Native functionality](https://docs.median.co/docs/native-functionality.md)
- [Bubble plugin](https://docs.median.co/docs/bubble-plugin.md)
- [Changelog archive](https://docs.median.co/docs/changelog-archive.md)


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.