Z Fold 2 How to launch an activity on both the inner and outer display at once

This is my code in Kotlin so far but I am unaware of how to enable the outside display to show an activity while the phone is unfolded and the main activity is shown on the inner display. I know it must be possible because the Samsung Camera app is able to do it.

I was trying to follow Google’s documentation here but with not much luck.

val dm = getSystemService(Context.DISPLAY_SERVICE) as DisplayManager
val displays = dm.displays

The number of displays always shows 1 and no more even though the Z Fold 2 has 2, so I am not sure.

These are only for internal use only. Thats why samsung camera can use .