bluejay icon indicating copy to clipboard operation
bluejay copied to clipboard

Detect a bluetooth connection with paired car?

Open ropims opened this issue 4 years ago • 1 comments

Hello! I making some tests with Bluejay framework and I have a small question. Can you please tell me if it is possible to detect when the iPhone is connecting to or disconnecting from a paired car in background?

Best Ruddy Yemey

ropims avatar Jun 01 '20 16:06 ropims

@ropims There are three ways to deal with the use case:

  1. Retrieve a list of known peripherals—peripherals that you’ve discovered or connected to in the past—using the
retrievePeripheralsWithIdentifiers: method. If the peripheral you’re looking for is in the list, try to connect to it. This reconnection
option is described in Retrieving a List of Known Peripherals.
  2. Retrieve a list of peripheral devices that are currently connected to the system using the retrieveConnectedPeripheralsWithServices: method. If the peripheral you’re looking for is in the list, connect
it locally to your app. This reconnection option is described in
Retrieving a List of Connected Peripherals.
  3. Scan for and discover a peripheral using the scanForPeripheralsWithServices:options: method. If you find it, connect to it. These steps are described in Discovering Peripheral Devices That Are Advertising and Connecting to a Peripheral Device After You’ve Discovered It.

ARIEnergy avatar May 13 '22 08:05 ARIEnergy