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

# Choreographer.VsyncCallback

*** ** * ** ***

` public static interface Choreographer.VsyncCallback `   
` `

|---|
| android.view.Choreographer.VsyncCallback |

<br />

*** ** * ** ***

Implement this interface to receive a callback to start the next frame. The callback is invoked on the `https://developer.android.com/reference/android/os/Looper` thread to which the `https://developer.android.com/reference/android/view/Choreographer` is attached. The callback payload contains information about multiple possible frames, allowing choice of the appropriate frame based on latency requirements.
**See also:**

- `https://developer.android.com/reference/android/view/Choreographer.FrameCallback`

## Summary

| ### Public methods ||
|---|---|
| ` abstract void` | ` https://developer.android.com/reference/android/view/Choreographer.VsyncCallback#onVsync(android.view.Choreographer.FrameData)(https://developer.android.com/reference/android/view/Choreographer.FrameData data) ` Called when a new display frame is being rendered. |

## Public methods

### onVsync

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

```
public abstract void onVsync (Choreographer.FrameData data)
```

Called when a new display frame is being rendered.

<br />

| Parameters ||
|---|---|
| `data` | `Choreographer.FrameData`: The payload which includes frame information. Divide nanosecond values by `1000000` to convert it to the `https://developer.android.com/reference/android/os/SystemClock#uptimeMillis()` time base. `data` is not valid outside of `onVsync` and should not be accessed outside the callback. This value cannot be `null`. <br /> |

**See also:**

- `https://developer.android.com/reference/android/view/Choreographer.FrameCallback#doFrame(long)`