我们可以在后台启动iBeacon发射器吗? [英] Can we start an iBeacon transmitter in the background?

查看:107
本文介绍了我们可以在后台启动iBeacon发射器吗?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个iPhone应用程序,我在其中创建了一个发射器和一个接收器。但是,当屏幕被锁定或应用程序被发送到后台时,发射器会停止发送。

I have an iPhone app, in which I have created a transmitter and a receiver, both. But, the transmitter stops transmitting when the screen is locked or the app is sent to the background.

我是否可以在后台继续发送(又称广告,广播) ?

Can I keep transmitting (a.k.a. advertising, broadcasting) while still in the background?

推荐答案

不幸的是,没有。 iOS确实允许蓝牙服务的背景广告,但仅使用打破iBeacon广告格式的专有技术。因此,如果您的应用程序开始作为iBeacon进行传输,然后切换到后台,它的传输仍然存在,但iBeacon探测器将不再接收它。有关详细信息,请参阅此处

Unfortunately, no. iOS does allow background advertising of Bluetooth Services, but only using a proprietary technique that breaks the iBeacon advertising format. As a result, if your app starts transmitting as an iBeacon, then switches to the background, its transmission will still exist, but it will no longer be picked up by iBeacon detectors. See here for more information:


...您应该知道,当您的应用处于后台时,广告的运营方式与您的应用位于前台时的运营方式不同。特别是,当您的应用程序在后台进行广告时... [a]服务CBAdvertisementDataServiceUUIDsKey广告密钥值中包含的服务UUID被放置在一个特殊的溢出区域中;它们只能由明确扫描它们的iOS设备发现。

...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 ...[a]ll 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.

底线是iOS设备无法作为iBeacons传输当他们在后台时。

The bottom line is that iOS devices cannot transmit as iBeacons when they are in the background.

这篇关于我们可以在后台启动iBeacon发射器吗?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆