First, rework your Screen.Initialize blocks, especially the arbitrary (pointless) request for permissions (which, moreover, no longer exists for WRITE since Android 11).
The process of requesting Bluetooth permissions has been explained many times here in the forum, not least by me.
thanks.
that code was working well to take picture and save it.
I made changes try to use only one button and moved ProCamera ini into screen1.ini, it works for the APP first time run, the camera doesn't come up when APP restart.
problem here is about try to use ESP32 BLE control the ProCamera to take picture, I added the well run ESP32 BLE blocks onto it, it doesn't take picture now.
If you are getting plain black images taken, you may need to set a timer to give everything time to setup.
I did a small test, using firebaseDataChanged with a node value of true/false - if true take a picture.
I left this value set to true, and refresh the companion, and got a black picture. Adding a clock with a time interval of 3 seconds, on refresh it took a picture
You need to ask for camera permission before you try to initialise procam.
You should initialise procam before you start the clock, which is to take the picture.
Thanks.
I made the blocks borrow you picture and added 3000, got white screen at first start, and black screen at restart.
how to fix?
any where have a example that MIT APP received ESP32 siginal to take picture?
still from the #1 block, I did many test find out a strange phenomenon: the APP works manually by button; the BLE connection is good; just do one thing, let the BLE trig either of ProCamera or ProCamBase64 initialize after connected, can not do it.
I wonder if there is confliction of BLE with them? why the camera can be ini only by button?
added ProCamBase64.Initialize after BLE received 'TAKE_PICTURE'; manually button still works ini cam and take picture, click BLE trig nothing up, and crashed.