# 1.9.0

Picture-in-picture (PiP) mode for Android has been revamped!

## 🔨 What changed?

Android 12+ now uses the `setAutoEnterEnabled` API instead of relying on `onUserHint`, providing smoother transitions on newer Android versions.

## 💡 How to migrate?

Review our [PiP setup documentation](/video/docs/react-native/advanced/pip/#android) for Android.

## 🚨 Breaking Changes

- The `onPictureInPictureModeChanged` method now requires a screen configuration parameter:

```kotlin
override fun onPictureInPictureModeChanged(isInPictureInPictureMode: Boolean) {  // [!code --]
override fun onPictureInPictureModeChanged(isInPictureInPictureMode: Boolean, newConfig: Configuration) { // [!code ++]
    super.onPictureInPictureModeChanged(isInPictureInPictureMode)
    if (isFinishing) { // [!code ++]
        return // [!code ++]
    } // [!code ++]
    if (lifecycle.currentState == Lifecycle.State.CREATED) {
        // when user clicks on Close button of PIP
        finishAndRemoveTask()
    } else {
        StreamVideoReactNative.onPictureInPictureModeChanged(isInPictureInPictureMode) // [!code --]
        StreamVideoReactNative.onPictureInPictureModeChanged(isInPictureInPictureMode, newConfig) // [!code ++]
    }
}
```

- The `onUserLeaveHint` method implementation is now simpler:

```kotlin
public override fun onUserLeaveHint() { // [!code --]
    if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.O && StreamVideoReactNative.canAutoEnterPictureInPictureMode) { // [!code --]
        val builder = PictureInPictureParams.Builder() // [!code --]
        builder.setAspectRatio(Rational(480, 640)) // [!code --]
        enterPictureInPictureMode(builder.build()) // [!code --]
override fun onUserLeaveHint() { // [!code ++]
    if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.O && Build.VERSION.SDK_INT < Build.VERSION_CODES.S && StreamVideoReactNative.canAutoEnterPictureInPictureMode) { // [!code ++]
        val config = resources.configuration // [!code ++]
        onPictureInPictureModeChanged(true,  config) // [!code ++]
    }
}
```

- The Expo config plugin for Android PiP has changed:

```js
    androidPictureInPicture: { // [!code --]
        enableAutomaticEnter: true, // [!code --]
    }, // [!code --]
    androidPictureInPicture: true, // [!code ++]
```


---

This page was last updated at 2026-05-13T13:39:05.689Z.

For the most recent version of this documentation, visit [https://getstream.io/video/docs/react-native/migration-guides/1.9.0/](https://getstream.io/video/docs/react-native/migration-guides/1.9.0/).