Connecting External Accessories Bluetooth devices without user interaction - bluetooth

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.

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://stackoverflow.com/a/70823487/415982

Related

Create MediaSource from AudioPlaybackConnection

I'm trying to make my windows computer a valid output for bluetooth audio from my phone. Enabling the actual audio was easy enough using the winrt AudioPlaybackConnection, but I'm trying to get metadata working and running into dead ends in the Windows UWP documentation. I'm familiar with the MediaPlayer class, but I can't see how to set the source to the AudioPlaybackConnection. My next thought was to create a MediaPlayer and handle the controls/metadata myself, but I can't see how to access the metadata for the AudioPlaybackConnection either. I tried getting the BluetoothDevice matching the same phone since I see the properties for the actual device list AVRCP Transport and A2DP SNK as two separate hardware "devices" making up the phone device, but I have no more luck accessing metadata with the BluetoothDevice. I know Windows 10 supports Bluetooth's AVRCP and can handle metadata/controls (source), but I'm beginning to think it's under a different device in winrt and I don't have the winrt know-how to track it down.
I've consulted the Bluetooth team about this. But currently, control like this is not supported in Windows at this time. You could submit a feature request about this in the Feedback Hub. Please select Developer Platform->API Feedback as the category when you submit your request. The related team will check the request.

What is the proper way to connect to bluetooth device?

I have inherited an application that connects to a ble device.
The app searches through devices that are scanned, and connects to the one that has a name that matches the expected name.
Pretty simple question...is this the standard way of connecting to a type of device?
Should I use something more specific like inspecting the services for the expected service ids?
The general approach is to filter the scan results using service uuid present in the advertising data. Name is not a good filter approach since it's supposed to be user friendly, and on many devices a user can put their own name, and potentially the same one as you are using.

Can you see what mobile is currently connected to Acumatica

I am trying to find a way to see the IMEI code of the current logged in user from their mobile device. I see that Acumatica does create an Instance ID but I also have had no luck in seeing a way to check which one is currently being used.
I have found the following:
bool mobile = this.Base.IsMobile;
This does show that a mobile device is currently connected. Is there a way to see the current connect device IMEI or has some done something similar
There is no way to do this. This information is not sent from mobile device to acumatica

Connecting to a custom device via Bluetooth when its SDK is unavailable

I am building an Android app in which I need to connect to an custom device over classic Bluetooth (preferably). My problem is SDK for that device is not created to facilitate the connection. Now I am stuck onto the part where I need to create a Socket which will be opened by the custom device which is acting as a server and other Android devices will act as clients and connect to it.
I am stuck at the part where we need to have identical UUIDs at both client and server for the socket connection to work. I am following the BleutoothChatApp as reference for this but I cannot always make sure that both my app and custom device will have identical UUIDs. Because I may or may not be able to hard code the UUID in custom device.
What can I do in such case.?
Also when I try to use BLE and search for services, I discover only one service which has no description or anything.
What can I do in such cases. What will be the best approach to create a connection to that device.?
You get multiple UUIDs for the same device because the devices offer multiple services. Base UUID for Bluetooth is "00000000-0000-1000-8000-00805F9B34FB".
If you find this UUID in a device, it means it supports Bluetooth Service. Use the UUID for connecting to the device.

iOS BLE - How to keep app active in the background?

I am trying to find a clever way to keep a BLE app active in the background on iOS 6, without breaking any of Apple's rules. I plan to use the phone as a peripheral device and another BLE circuit as the central. My app will automatically be opened when a user arrives to a building using geofencing. After that the iPhone will connect to the first BLE central device it sees (the device will be in its white list). The user will then be able to move throughout the building switching to different BLE "nodes".
My question is: What do I need to do in the background when a user is stationary at their desk so that the app does not get suspended due to memory resources?
My idea is based on this solution for a separate problem: There could potentially (not regularly) be 10-50 users in an area with only a few BLE "nodes" and I read at bluetooth.org that I could setup a dynamic connection system, basically rotating connections through all the users.
My idea is to setup a similar dynamic system where the central device (not the iPhone) disconnects the device on regular intervals (30-40 minutes) and then the iPhone will reconnect.
Is this something that some feasible? Is this against the iOS development guidelines? I was unable to find anything explicit about this. I have also asked on the iOS developer forum, but unfortunately it is not as popular as this site.
Thanks in advance!
Xcode -> Project target -> Capabilities -> Enable background mode
Check Uses Bluetooth LE Accessories
Capabilities
Also enable the following key in .plist file
Required background modes
App communicates using CoreBluetooth
Plist

Resources