# Put photos, videos or contacts on the Preview device

> Send photos, videos or contact cards in the chat, have an Agent add them to a Preview device, and pick them in your app's photo or contact picker.

Source: https://air.build/docs/build/put-photos-on-the-preview-device/

To try your app's photo picker, a gallery or a contact list in Preview, the device needs something in its Photos and Contacts. An Agent can add your own photos, videos and contact cards to a Preview device. Then you pick them in your app, as you would on a real iPhone.

> [!NOTE]
> Preview has no button for adding files to the device. You ask an Agent in the project's chat, and it uses `simulator add-media` (see [simulator](https://air.build/docs/cli/simulator/#add-media)). The command's help doesn't say whether this works differently in a local Team, where the devices run on the Team's Mac.

## What you can add

| Kind | Files | Where they go |
| --- | --- | --- |
| Photos | `.jpg`, `.jpeg`, `.png`, `.heic`, `.heif`, `.gif`, `.tif`, `.tiff`, `.bmp`, `.webp` | The device's Photos |
| Videos | `.mov`, `.mp4`, `.m4v` | The device's Photos |
| Contacts | `.vcf` contact cards | The device's Contacts. iPhone and iPad only. |

On an Android phone in Preview (beta), photos and videos go into the phone's camera roll. Android phones don't take contacts.

## Add your files

1. Open Preview with your app and note the device you're looking at. Its name is on the device menu. See [Run your app in Preview](https://air.build/docs/build/preview-your-app/#choose-a-device).

2. In the project's chat, attach the photos, videos or contact cards. See [Send photos, files and sketches to an Agent](https://air.build/docs/projects/send-photos-and-files/#add-files-to-a-message).

3. In the same message, ask the Agent to add them to that device, for example:

   ```text
   Add the attached photos and the video to the iPhone in Preview, so I can try the photo picker in my app.
   ```

4. The Agent adds the files one by one and tells you when they're in. It checks every file before it adds the first one, so a wrong file name adds nothing.

5. In Preview, open your app and its photo or contact picker. The files are there with the device's other photos and contacts.

Name the device in your request. Picking a device in Preview changes only what you see; an Agent adds the files to the device you name, or else to the Team's default device. The default device is never an Android phone, so for Android always say which phone.

### No files at hand

Ask the Agent to make sample files and add them, for example:

```text
Make 20 sample contacts with names, phone numbers and email addresses, and add them to the iPhone in Preview.
```

### Keep a photo's original file

Photos you attach in HEIC or HEIF, the formats an iPhone camera usually saves in, are turned into JPEG before the Agent gets them. They're also made smaller, and their location data is left out. See [Send photos, files and sketches to an Agent](https://air.build/docs/projects/send-photos-and-files/#what-the-agent-gets).

If your app reads where a photo was taken, or you want to try it with full-size HEIC photos, put the photos in a zip file, attach that, and ask the Agent to add the photos inside it.

## Who sees them, and for how long

The Preview devices are shared by the Team. Everyone who opens that device in Preview sees the files, and so do the Agents that test on it. Add pictures and contacts you're happy for your Team to see.

The files stay on the device while it's running. In a cloud Team, a device that was shut down comes back as a fresh device, without them. That happens when someone chooses **Shut Down** for it in the device menu, when nobody watches or uses a device other than the default one for a while, and when the Team goes to sleep. Ask the Agent to add them again; the files are still in the chat.

The `simulator` help doesn't say how long they stay on a local Team's devices.

## Questions

**I don't see the photos in my app.**

You may be looking at another device. Open the device menu and pick the device the Agent added them to. If they're on the device but your app doesn't show them, tell the Agent what you expected to see.

**The Agent says a file isn't a photo, video or contact.**

It's not one of the kinds in the table above. Convert it, for example a video to `.mp4`, or send another file. Nothing was added: the Agent checks every file before it adds any.

**Can I add contacts to an Android phone?**

No. Contacts go only on iPhones and iPads. Android phones take photos and videos.

**Can I take the photos off the device again?**

The `simulator` command has no way to remove them. In a cloud Team, a fresh device starts without them. See [Start your app fresh in Preview, like a first-time user](https://air.build/docs/build/start-your-app-fresh-in-preview/).

**Do the files reach my own iPhone?**

No. They go only on the Preview device. To try your app on your iPhone, see [Install your app on your iPhone](https://air.build/docs/build/install-on-your-iphone/).
