To use MetaWear in the background you first need to enable background mode "Uses Bluetooth LE Accessories" as show here:
Then you can just call connectWithHandler: and the callback with complete whenever the specified MetaWear is in range. The call to connectWithHandler: will never "time out" so iOS will continually look for the device, even if the app is in the background.
Being in a connection does require more power from both the phone and MetaWear, but I don't have any quantitative data and it will vary by use case. The most accurate way would be to run some experiments using your exact code.
Comments