Hi, I solved this. The problem is that BT Media Button (and almost any of these kinds of paired BT devices) all look like keyboards to the OS. When they connect/disconnect, they force a configuration_change event, which re-starts the activity. I just put this in the manifest to inhibit the event:
SetActivityAttribute(Main, android:configChanges, "keyboard|keyboardHidden")
I am locked to landscape in my app so I don't care about the rotation event. I do have several other activity modules so I made a manifest line for each one, since this keyboard change event might occur when any one of them is active. Since I need the virtual keyboard as well, I also did this setting on the phone:
[Android 10]
Settings>System>Languages and Input>>Physical Keyboard>>Show virtual Keyboard = On
This is an example of how a person who has not had prior experience or interest in Android can get quite far into using B4A successfully, and still not know the OS itself well enough to avoid spending 2 days trying to solve a simple problem. In Windows, there would be 100 posts about registry hacks for something like this--and most of them would be out of date. Thank you, as always, Erel, for creating B4X.