I'm using a bluetooth remote button (this one: https://www.amazon.ca/Bluetooth-Smartphones-UBeesize-Wireless-Compatible/dp/B07FCZ8KQT), and periodically I take a bunch of pictures only to find that it had switched to the front-facing camera.
I was able to dupicate this once by turning the BT remote off and on again, then when I hit the button it switched cameras. (Cannot duplicate it reliably as yet, however).
I can sniff out what the remote is doing, and also dig into the OpenCamera code to try to sort it out, however that's going to take some time and I thought I'd post here first in case anyone has any quick thoughts.
Thanks!
Anonymous
Just a bit more info: I set up an ESP32 device to behave like a bluetooth HID keyboard and it is behaving the same way: When the device is disconnected and reconnected (ie: by power cycling it), sometimes the camera switches from rear to front (or the converse). Also note that it seems to re-focus the camera.
Having a bit of trouble getting ADB to work, but I'll try to get some info from the application side.
I've managed to get a bit more info, and I don't think that there's anything to be done from the config and/or code in OpenCamera - looks like it's a result of how Android handles things when the BLE keyboard is connected (also when disconnected). I had noticed that the screen seems to flash and redraw when it is connected, and the same thing happens when running any other app.
For reference, here's what I see in adb logcat after the keyboard is connected: