Service advertisement in the background is misbehaving
Service advertisement in the background is misbehaving
- Subject: Service advertisement in the background is misbehaving
- From: Andras Kovi <email@hidden>
- Date: Fri, 28 Sep 2012 22:14:47 +0200
Hi Joakim,
I just helped debugging an issue for Frederic and found a really interesting behavior. Please confirm or correct me.
Observation: if the app is sent to background, the advertising continues but the advertisement data is not sent in the packages
Effect 1: Backgrounded apps cannot be discovered by clients that filter for services. When a client uses scanForPeripheralsWithServices, the peripheral will be found but callback not happens in the app as the service filtering criteria will not be satisfied
Effect 2: Backgrounded apps will never be discovered by clients that started scanning while the app was in background. If a client starts scanning while the app is in the background, CoreBluetooth finds the peripheral but callback does not happen. Then when the app comes to foreground and advertisement data is sent again, CoreBluetooth will not invoke the callback as it thinks it already provided the callback for that. (Discovery may happen only when the BLE address is changed (every 15 minutes or so))
I think this phenomenon can explain many recently reported issues too.
Your help is much appreciated.
Regards,
Andras
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Bluetooth-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden