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

Cannot advertised in the background? #19

Open
Deepblue1996 opened this issue Oct 23, 2018 · 6 comments
Open

Cannot advertised in the background? #19

Deepblue1996 opened this issue Oct 23, 2018 · 6 comments

Comments

@Deepblue1996
Copy link

I tested it and failed

@SlickJava
Copy link

I tested it and failed

hey I was wondering whether or not you managed to get background advertising working, and if you did how did you do it? I'm working on a school project that requires something similar. thanks a lot

@Deepblue1996
Copy link
Author

I tested it and failed

hey I was wondering whether or not you managed to get background advertising working, and if you did how did you do it? I'm working on a school project that requires something similar. thanks a lot

It can't be achieved for the time being. Official automatic suspension

@falcon283
Copy link

I’m not using that project but come across due to some experimentation. I want to advertise a specific uuid in background and exactly scan that uuid from the central from a foreground app.
It’s unbelievable that peripheralManager does not advertise when in background.
My he documentation states that si possible.


In addition to allowing your app to be woken up to handle read, write, and subscription requests from connected centrals, the Core Bluetooth framework allows your app to advertise while in the background state. That said, you should be aware that advertising while your app is in the background operates differently than when your app is in the foreground. In particular, when your app is advertising while in the background:

The CBAdvertisementDataLocalNameKey advertisement key is ignored, and the local name of peripheral is not advertised.
All service UUIDs contained in the value of the CBAdvertisementDataServiceUUIDsKey advertisement key are placed in a special “overflow” area; they can be discovered only by an iOS device that is explicitly scanning for them.
If all apps that are advertising are in the background, the frequency at which your peripheral device sends advertising packets may decrease.

Did you had any progress on this.
I’m using iOS 13 and 12 with no lack :(

@prakashRavi1990
Copy link

Hi @falcon283

Is there any solution for this? Have you found any alternate for background advertising? I am running into the same problem as you.

Thanks in advance.

@falcon283
Copy link

@prakashRavi1990
Well actually no.
With the latest worldwide events I convinced myself that the current behavior is the Apple wanted behavior and not a bug.

Probably the Apple documentation is a left over from an old removed behavior.

In the end what Apple and Google released recently with the Exposure Notifications (COVID-19) is merely the same use case of us, but it's kept totally private and the SDK make you able to accomplish a single specific use case (COVID-19).

The reason for this, I guess, is "privacy" for the user.
If background advertising would be ever possible, except for genuine implementations like our use cases, it will allow devs to create a new class of contact tracing applications and there will be no way for Apple to control what informations will the devs exchange and gather.

So hostly I don't think there will be a legal/official/accepted way to make a peripheral advertisement in background.

I would like to hear also your opinion guys 😉

@Deepblue1996
Copy link
Author

@prakashRavi1990
Well actually no.
With the latest worldwide events I convinced myself that the current behavior is the Apple wanted behavior and not a bug.

Probably the Apple documentation is a left over from an old removed behavior.

In the end what Apple and Google released recently with the Exposure Notifications (COVID-19) is merely the same use case of us, but it's kept totally private and the SDK make you able to accomplish a single specific use case (COVID-19).

The reason for this, I guess, is "privacy" for the user.
If background advertising would be ever possible, except for genuine implementations like our use cases, it will allow devs to create a new class of contact tracing applications and there will be no way for Apple to control what informations will the devs exchange and gather.

So hostly I don't think there will be a legal/official/accepted way to make a peripheral advertisement in background.

I would like to hear also your opinion guys 😉

I don't get it. If Android allows it, why doesn't Apple

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

4 participants