Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Detect a bluetooth connection with paired car? #236

Open
ropims opened this issue Jun 1, 2020 · 1 comment
Open

Detect a bluetooth connection with paired car? #236

ropims opened this issue Jun 1, 2020 · 1 comment

Comments

@ropims
Copy link

ropims commented Jun 1, 2020

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

@ARIEnergy
Copy link

@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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants