Added in [API level 8](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels) Summary: [Constants](https://developer.android.com/reference/android/media/CameraProfile#constants) \| [Ctors](https://developer.android.com/reference/android/media/CameraProfile#pubctors) \| [Methods](https://developer.android.com/reference/android/media/CameraProfile#pubmethods) \| [Inherited Methods](https://developer.android.com/reference/android/media/CameraProfile#inhmethods)

# CameraProfile

*** ** * ** ***

` public class CameraProfile `   
` extends https://developer.android.com/reference/java/lang/Object ` ` `

|---|---|
| [java.lang.Object](https://developer.android.com/reference/java/lang/Object) ||
| ↳ | android.media.CameraProfile |

<br />

*** ** * ** ***

The CameraProfile class is used to retrieve the pre-defined still image capture (jpeg) quality levels (0-100) used for low, medium, and high quality settings in the Camera application.

## Summary

| ### Constants ||
|---|---|
| `int` | `https://developer.android.com/reference/android/media/CameraProfile#QUALITY_HIGH` <br /> |
| `int` | `https://developer.android.com/reference/android/media/CameraProfile#QUALITY_LOW` Define three quality levels for JPEG image encoding. |
| `int` | `https://developer.android.com/reference/android/media/CameraProfile#QUALITY_MEDIUM` <br /> |

| ### Public constructors ||
|---|---|
| ` https://developer.android.com/reference/android/media/CameraProfile#CameraProfile()() ` |

| ### Public methods ||
|---|---|
| ` static int` | ` https://developer.android.com/reference/android/media/CameraProfile#getJpegEncodingQualityParameter(int)(int quality) ` Returns a pre-defined still image capture (jpeg) quality level used for the given quality level in the Camera application for the first back-facing camera on the device. |
| ` static int` | ` https://developer.android.com/reference/android/media/CameraProfile#getJpegEncodingQualityParameter(int,%20int)(int cameraId, int quality) ` Returns a pre-defined still image capture (jpeg) quality level used for the given quality level in the Camera application for the specified camera. |

### Inherited methods

From class ` https://developer.android.com/reference/java/lang/Object ` ` https://developer.android.com/reference/java/lang/Object` ` https://developer.android.com/reference/java/lang/Object#clone()() `

Creates and returns a copy of this object.
` boolean` ` https://developer.android.com/reference/java/lang/Object#equals(java.lang.Object)(https://developer.android.com/reference/java/lang/Object obj) `

Indicates whether some other object is "equal to" this one.
` void` ` https://developer.android.com/reference/java/lang/Object#finalize()() `

Called by the garbage collector on an object when garbage collection determines that there are no more references to the object.
` final https://developer.android.com/reference/java/lang/Class<?>` ` https://developer.android.com/reference/java/lang/Object#getClass()() `

Returns the runtime class of this `Object`.
` int` ` https://developer.android.com/reference/java/lang/Object#hashCode()() `

Returns a hash code value for the object.
` final void` ` https://developer.android.com/reference/java/lang/Object#notify()() `

Wakes up a single thread that is waiting on this object's monitor.
` final void` ` https://developer.android.com/reference/java/lang/Object#notifyAll()() `

Wakes up all threads that are waiting on this object's monitor.
` https://developer.android.com/reference/java/lang/String` ` https://developer.android.com/reference/java/lang/Object#toString()() `

Returns a string representation of the object.
` final void` ` https://developer.android.com/reference/java/lang/Object#wait(long,%20int)(long timeoutMillis, int nanos) `

Causes the current thread to wait until it is awakened, typically by being *notified* or *interrupted*, or until a certain amount of real time has elapsed.
` final void` ` https://developer.android.com/reference/java/lang/Object#wait(long)(long timeoutMillis) `

Causes the current thread to wait until it is awakened, typically by being *notified* or *interrupted*, or until a certain amount of real time has elapsed.
` final void` ` https://developer.android.com/reference/java/lang/Object#wait()() `

Causes the current thread to wait until it is awakened, typically by being *notified* or *interrupted*.

## Constants

### QUALITY_HIGH

Added in [API level 8](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public static final int QUALITY_HIGH
```

<br />

<br />

Constant Value: 2 (0x00000002)

### QUALITY_LOW

Added in [API level 8](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public static final int QUALITY_LOW
```

Define three quality levels for JPEG image encoding.

<br />

Constant Value: 0 (0x00000000)

### QUALITY_MEDIUM

Added in [API level 8](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public static final int QUALITY_MEDIUM
```

<br />

<br />

Constant Value: 1 (0x00000001)

## Public constructors

### CameraProfile

```
public CameraProfile ()
```

<br />

<br />

## Public methods

### getJpegEncodingQualityParameter

Added in [API level 8](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public static int getJpegEncodingQualityParameter (int quality)
```

Returns a pre-defined still image capture (jpeg) quality level used for the given quality level in the Camera application for the first back-facing camera on the device. If the device has no back-facing camera, this returns 0.

<br />

| Parameters ||
|---|---|
| `quality` | `int`: The target quality level <br /> |

| Returns ||
|---|---|
| `int` | <br /> |

### getJpegEncodingQualityParameter

Added in [API level 9](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public static int getJpegEncodingQualityParameter (int cameraId, 
                int quality)
```

Returns a pre-defined still image capture (jpeg) quality level used for the given quality level in the Camera application for the specified camera.

<br />

| Parameters ||
|---|---|
| `cameraId` | `int`: The id of the camera <br /> |
| `quality` | `int`: The target quality level <br /> |

| Returns ||
|---|---|
| `int` | <br /> |