BluetoothLE1 Disconnect issue Background Tasks: Itoo

Hello Sir,
The MAC address is stored into itoo.
Next, I press Start button(GREEN).
In Android 12, when start button is pressed, it connects (Connected) after 3 seconds app sends data RELAY_ON (SendOnClock is 3000), i.e procSendOnClock clock runs after 3 seconds. (ProcessStopClock = 3000 true) once the data is sent, after 3 seconds procProcessStopClock clock executes and disconnects from ESP32.

In android 14, when start button is pressed, it connects ESP32 (Connected) after 3 seconds app sends data RELAY_ON, i.e procSendOnClock clock runs. once the data is sent, after 3 seconds procProcessStopClock clock executes (Till here everything works fine) but BluetoothLE1.disconnect does not disconnect from the connected ESP32 module.

Your codebase is pretty messy. Please state what you are trying to achieve. I can help you.

When the user presses the start button, a background process should initialize.

Once the background process starts, the device should establish a connection with the ESP32 module via BLE

Once the connection is established, either the RELAY_ON or RELAY_OFF command (depending on your logic) should be sent to the ESP32 module.

After successfully sending the command, the device should disconnect from the ESP32 module.

When the user presses the start button, a background process should initialize.

Once the background process starts, the device should establish a connection with the ESP32 module via BLE

Once the connection is established, either the RELAY_ON or RELAY_OFF command (depending on your logic) should be sent to the ESP32 module.

After successfully sending the command, the device should disconnect from the ESP32 module.

itoo extension is developed by @Kumaraswamy I think he is not ready to help. thanks.
@Taifun is stopped replying thanks Sir.

Both are not ready to help. thanks a lot.

Android program file attached here and .aia file attached in my first post. If anyone want to check they are free to check.

ESP32_BLE.ino (4.4 KB)

And you expect more help after this ?

You should not be using Itoo for such tasks of small duration.

I genuinely asked help. because they have developed the extension. I waited for more than 10 days. but did not get the reply. and yeah, I don't expect any help now on. Don't worry. that's why I attached both arduino and aia files. The aia file is borrowed from some other person and I modified according to my need. If anyone want to check they can. If you want you can also try. I sincerely try to solve this issue. So that it can help me and others.

Thanks.

OK Sir, Thanks. Will try to use some other logic