0

Assuming that the 'External accessory communication' background mode is enabled, is it possible to communicate to and from the Sphero while the iOS app is in background? If it is possible, what mechanism should I use? I'm trying to get the SensorStreaming example app to continue streaming while the app is in background.

Edward
  • 31
  • 2

2 Answers2

0

Looks like a NO as current sphero is not BTLE: Objective-C/iOS: Keeping bluetooth connection alive in the background

For BTLE accessories: https://developer.apple.com/library/ios/documentation/NetworkingInternetWeb/Conceptual/CoreBluetooth_concepts/CoreBluetoothBackgroundProcessingForIOSApps/PerformingTasksWhileYourAppIsInTheBackground.html

But not sure you can have a continuos stream but maybe an event with a batch of data as app has to be woken up and max 10 seconds to do something with the info before termination.

Community
  • 1
  • 1
kasuku
  • 371
  • 3
  • 13
0

Sphero communicates to iOS using Bluetooth Classic and not Bluetooth LE. As such, it's treated as an external accessory by iOS. In order to keep my app talking to Sphero in the background for greater than 10 minutes, I had to enabled the "External accessory communication" background mode and setup a timer in it's own run loop:

Edward
  • 31
  • 2