'increase Android BLE bonding / pairing dialog timeout

I have an android app that connects to a BLE device and pairs with it using BleDevice.createBond(). the issue is that the dialog could disappear before the user noticing it.

here is a screenshot of the dialog I am talking about.

enter image description here

how long does the dialog appear? the documentation doesn't mention it

is there any way to increase the time of which the dialog is showing?



Solution 1:[1]

No, you cannot increase the time. The dialog can only be valid for 30 seconds (even shorter if you also have to enter a PIN) this is because of BLE_GAP_SEC_STATUS_TIMEOUT and is defined in the Bluetooth Core Spec as 30 seconds (Bluetooth Specification, Version 5.0, Vol 3, Part H, Section 3.4 - SMP Timeout.)

Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source
Solution 1 SigiN