---
"@context": https://schema.org
"@type": TechArticle
"@id": https://www.twilio.com/docs/video/android-configuring-audio-video-inputs-and-outputs#article
headline: Configuring Audio, Video Input and Output devices - Android
description: In this guide, learn how to configure Audio, Video input and output devices from your Twilio Video Rooms API application.
url: https://www.twilio.com/docs/video/android-configuring-audio-video-inputs-and-outputs
inLanguage: en
dateModified: 2026-06-25T22:34:50.000Z
author:
  "@type": Organization
  name: Twilio Developer Education Team
publisher:
  "@type": Organization
  name: Twilio
---

# Configuring Audio, Video Input and Output devices - Android

Configure audio and video input and output devices from your Twilio Video Rooms API application to build a better end-user experience. This guide covers selecting camera inputs and managing audio devices with AudioSwitch.

## Selecting a specific Video Input

### CameraCapturer

The `CameraCapturer` provides video frames via the [Camera API](https://developer.android.com/guide/topics/media/camera) for a `LocalVideoTrack` from a given `CameraCapturer.CameraSource`.

```java title="Capture and switch cameras with CameraCapturer"
// Share your camera
CameraCapturer cameraCapturer = new CameraCapturer(context, CameraSource.FRONT_CAMERA);
LocalVideoTrack localVideoTrack = LocalVideoTrack.create(context, true, cameraCapturer);
VideoView primaryVideoView = (VideoView) findViewById(R.id.local_video);

// Mirror front camera
primaryVideoView.setMirror(true);

// Render camera to view
localVideoTrack.addSink(primaryVideoView);

// Switch the camera source
CameraSource cameraSource = cameraCapturer.getCameraSource();
cameraCapturer.switchCamera();
primaryVideoView.setMirror(cameraSource == CameraSource.BACK_CAMERA);
```

### Camera2Capturer

The `Camera2Capturer` provides video frames via the [Camera 2 API](https://developer.android.com/reference/android/hardware/camera2/package-summary) for a `LocalVideoTrack` from a given camera ID.

```java title="Capture and switch cameras with Camera2Capturer"
// Get the device camera IDs
CameraManager cameraManager =
        (CameraManager) cameraCapturerActivity.getSystemService(Context.CAMERA_SERVICE);
String[] cameraIds = cameraManager.getCameraIdList();

// This example uses the first Camera ID but applications can make their own decisions
// about which Camera ID to use
String cameraId = cameraIds[0];

// Share your camera
Camera2Capturer camera2Capturer = new Camera2Capturer(context, cameraId, camera2Listener);
LocalVideoTrack localVideoTrack = LocalVideoTrack.create(context, true, camera2Capturer);

// Render camera to a view
VideoView primaryVideoView = (VideoView) findViewById(R.id.local_video);
localVideoTrack.addSink(primaryVideoView);

// Switch the camera source from the first camera ID to the second camera ID
camera2Capturer.switchCamera(cameraIds[1]);
```

For more details and other best practices capturing video from the camera capturers, please reference [the Video Android Quickstart](https://github.com/twilio/video-quickstart-android).

## Managing Audio With AudioSwitch

The Twilio Video Android SDK does not officially support audio device management. Please use [AudioSwitch](https://github.com/twilio/audioswitch) to manage audio focus and audio devices in your application.
