Connecting External Accessories Bluetooth devices without user interaction
Asked Answered
A

1

6

According to EAAccessoryManager Class Reference from iOS 6 onward using showBluetoothAccessoryPickerWithNameFilter we can show a Accessory picker that will help user to connect External Accessories with that include an iAP over Bluetooth unique ID.

Now We want to connect programmatically one of the external accessory from that list.

We require your support on following.

How can we connect Programmatically any of our External devices that are in the range of phone?.

How can we connect programmatically any of our external device without user interaction?

How can we get programmatically a list of external devices that are in the range of user's phone?

How can we get a list of EAAccessory Objects of our external devices that are in the range but not connected ?

Can we store EAAccessory Object in NSUserDefaults? If yes, how can we do that? As EAAccessory EAAccessory does not implements the encodeWithCoder and initWithCoder methods, so it does not allow to store it into NSUserDefaults.

Using BTLE we can solve this, but we want solution in BT Classic.

Autogamy answered 19/11, 2012 at 17:10 Comment(1)
I trying to search the same answer too, do you have the answer for auto select the bluetooth device from the Dialog? or store the EAAccessory Object ?Byline
G
0

You can't programmatically connect to a Bluetooth 3.x device ­– iOS has no API for that. If your Bluetooth 3.x is MfI-compliant, then ­– in theory ­– you can show the ExternalAccessoryBluetoothPicker which would allow you to pair on user interaction within your app ­– circumventing the need to open the settings app.

Alas this is broken since iOS 13 for most apps. It broke when Apple introduced the new Scene-based lifecycle. Roll back to the classic one and it starts working again. More details here: https://mcmap.net/q/1324110/-ea-showbluetoothaccessorypicker-not-showing-in-swiftui

Garber answered 12/5, 2022 at 14:3 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.