Create a BroadcastReceiver that listens to power connected (plugged in) and power disconnected (not plugged in) to simulate the response an Android application can have when it receives an external stimuli, like Bluetooth connection. When power is plugged in, the Broadcast Receiver updates a MutableLiveData boolean in the ViewModel. The Jetpack Compose user interface is using observeAsState() to watch this value as it changes, and it switches to a more simple user interface.