I’m interacting with my custom BLE periphy from my application and after some manipulations of the periphery offer a bond with me through the system window and I agree. In the future, I want the system itself to request a connection automatically as soon as my periphy get into its packet receiving radius (by analogy with the bluetooth column). And the question - do I need to do something in the application code after bonding to have this same auto-connect? Or the system itself will try to automatically connect to the periphery
Asked
Active
Viewed 626 times
-1
-
Does this answer your question? [Which correct flag of autoConnect in connectGatt of BLE?](https://stackoverflow.com/questions/40156699/which-correct-flag-of-autoconnect-in-connectgatt-of-ble) – Emil Apr 08 '20 at 12:23
-
@Emil , unfortunately its works for case when I connect inside my app, I want the system itself to connect to a peripheral device when the opportunity arises (without the participation of my application) – Ильмир Шагабиев Apr 08 '20 at 14:06
-
post the code you have tried – deadshot Apr 08 '20 at 16:08
1 Answers
0
The system never connects to BLE devices by itself. You need to have an app that initiates the connection.
However if the BLE device implements a profile that the system has built-in support for, like HID, then the system will automatically initiate a connection to that device (without any app). But the profile for that device must be paired and enabled through the system's Bluetooth settings.

Emil
- 16,784
- 2
- 41
- 52
-
that is, I will create a bond with an HID device, will the smartphone automatically connect if bluetooth is on? – Ильмир Шагабиев Apr 13 '20 at 15:11
-
Only if the user does it through the Bluetooth settings. Not if you just call createBond from your application. – Emil Apr 13 '20 at 18:13