ANAFI Thermal (Android) - Switching between visible video and thermal video within the same activity

There are two excellent tutorial programs written in Kotlin for Android that show visible video and thermal video.

Visible video - HelloDrone - GroundSdk Hello Drone Tutorial — GroundSdk Android Samples 1.7.0 documentation

Thermal video – ThermalVideoSample - Streaming thermal video in Android Ground SDK - #4 by OThomas

I have written one activity that supports both (one or the other), but I am having some trouble switching from one camera to the other in the same activity. I can have the activity start by using visible or thermal and that works. Does anyone have a code snippet that shows how to switch between the cameras in the same activity?

The FreeFlight program can switch between cameras.