nionata / grapevine

Anonymous proximity-based gossip messaging mobile application
1 stars 0 forks source link

Enable Background Bluetooth Mode #20

Open nionata opened 3 years ago

nionata commented 3 years ago

By default the bluetooth scanning will only be done when the app is active. Read more here.

nionata commented 2 years ago

https://medium.com/@cbartel/ios-scan-and-connect-to-a-ble-peripheral-in-the-background-731f960d520d

nionata commented 2 years ago

I enabled both background mode for ble central and peripheral. Still requires a code change in the central for background scanning:

Pass restoreStateIdentifier and restoreStateFunction to BleManager constructor.