Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

scan in background #14

Closed
darwin2k opened this issue Mar 3, 2015 · 2 comments
Closed

scan in background #14

darwin2k opened this issue Mar 3, 2015 · 2 comments

Comments

@darwin2k
Copy link

darwin2k commented Mar 3, 2015

Hi, great work!
Short question: Is it even possible to scan for a device in background. Or in other words: Is it possible to exchange data("String") between two devices which are both in locked background mode.

Best!

@omergul
Copy link
Owner

omergul commented Mar 10, 2015

@darwin2k Well that's a bit hard (maybe impossible, I haven't tried hard yet). When the scanner is at background, the following delegate isn't called multiple times, it is only called only once when the device is discovered. So we can not continuously receive the rssi number to detect its distance.

  • (void)centralManager:(CBCentralManager *)central
    didDiscoverPeripheral:(CBPeripheral *)peripheral
    advertisementData:(NSDictionary *)advertisementData
    RSSI:(NSNumber *)RSSI

@darwin2k
Copy link
Author

@omergul123 for me single time recognition when the device enters range is relevant. For my use-case I don´t really need to detect the distance between the devices. I will try this out. thanks!

@omergul omergul closed this as completed Mar 23, 2015
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants