I am currently working on an iOS app that is running in the background that requires me to advertise and scan a device using Bluetooth 4.0.
While learning about the Corebluetooth.framework, I found that iOS developers can set two kind of advertising data on the peripheral device.
I learned if the peripheral device is running in the background, however, local name will not be advertised. In addition, service UUIDs will be set to overflow area which the central device can only get by using active scanning. However, the active scanning can be running only in the foreground.
At this point I have a question.
If both central and peripheral devices are running in the background, can a central device get service UUIDs which are set on the overflow area by a peripheral device? That is when both iOS applications are running in the background, is it possible to develop an app that each apps are advertising and scanning each other in the background?
On your iOS device go into "Settings-> Bluetooth" and turn on your BLE device. You should see the device listed in your available devices.
This protocol enables seamless interactivity between iOS and Android devices, and an iBeacon hardware, such as BLE beacons. iBeacon technology has been empowering businesses by letting them welcome customers, provide location-relevant information and promote ongoing offers.
The UIBackgroundModes key identifies which background tasks your application supports. Its value is an array that contains one or more strings with the following values: audio – The application plays audible content to the user while in the background.
Pair your device with a Bluetooth accessory On your device, go to Settings > Bluetooth and turn on Bluetooth. Stay on this screen until you complete the steps to pair your accessory. Place your accessory in discovery mode and wait for it to appear on your device.
A backgrounded peripheral cannot be found by a backgrounded central exactly for the reasons you describe:
This has been an issue in iOS 6 and I haven't seen anyone being able to do it in iOS 7 until now either. (Further testing in progress.)
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With