2

I have an iOS project where I'm retrieving heart rate data from a standard Bluetooth sensor continuously and sending it to a web server. I want this to work when the app moves to background and when the user locks the screen. I've tried various approaches: checking off the bluetooth settings in background mode section of the project settings, playing music in the background. I don't have to submit this to the App Store, so what are some (possibly underhanded) ways to keep a persistent Bluetooth connection in the background?

3
  • Does your peripheral support notify for the characteristics? If so, use that. If not then you are probably stuck - If you aren't going to the app store and aren't too concerned about battery life you can disable locking in your app
    – Paulw11
    Nov 14, 2014 at 2:37
  • Hey Paul, it does support notify, and we already use didUpdateValueForCharacteristic. It doesn't seem to help though.
    – Shine Wang
    Nov 14, 2014 at 8:33
  • I wish someone answered this I am stuck on the same thing. I am using didUpdateValueForCharacteristic as well and it won't wake the app up from terminated to notify. It does when the app is in the task switcher but once I swipe it up and kill it, the notifications stop in the app.
    – GoreDefex
    Aug 10, 2017 at 12:46

0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.