如何Android和iOS扫描蓝牙信标,不带电池的问题? [英] How do Android and iOS scan for Bluetooth beacons without battery issues?

查看:624
本文介绍了如何Android和iOS扫描蓝牙信标,不带电池的问题?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

如果我想在开发Android或IOS自己我iBeacon显示服务,它必须是实用的。这意味着客户可以用我的服务,而电池的不足。

if i want to develop own my iBeacon services in Android or IOS, it has to be practical. which means customer can use my services without shortage of battery.

我想就算iBeacon显示技术是基于蓝牙低耗能,也可能是还缺乏电池。这是因为应用程序必须运行扫描iBeacon显示设备的所有时间。

i think even if iBeacon technology is based on Bluetooth Low Energy, it could be still lack of battery. that's because an application must be running to scan iBeacon device all the time.

据我所知,iOS的有电池问题自己的解决方案。当iOS应用程序检测iBeacon显示设备,它在后台运行和IOS(未应用)由自身扫描特定的UUID,而不是所有的UUID附近。这是他们如何节约能源。对吗?

As i know, iOS has its own solution for battery issue. when an IOS application detect iBeacon devices, it is running in the background and IOS(not app) is scanning specific UUIDs by itself, not the all UUIDs nearby. this is how they save energy. am i right?

但在Android的情况下,不提供电池问题的任何解决方案。更重要的是,
当一个Android应用程序检测iBeacon显示设备,它附近的扫描所有的UUID,它的一切,而不是Android操作系统的交易。这是正确的?

but in case of Android, any solution for battery issue is not provided. what's more, when an Android application detects iBeacon devices, it scans all the UUIDs nearby and it deals with everything, not the Android OS. is this right?

因此​​Im担心这种电池的问题,我开始开发自己的我服务之前。
它是会没事带电池?
有没有什么好的解决办法?分享你们如何解决这个问题?

so Im worry about this battery problems, before i start to develop own my services. is it gonna be ok with battery? is there any good solution to share?? how do you guys solve this problem??

推荐答案

借助临Android的iBeacon显示库的版本带有自动电池保护程序,减慢扫描时,应用程序在后台以节省电池。开源的Andr​​oid iBeacon显示库还允许前景和背景蓝牙扫描速率的配置,并提供了方法,打电话告诉库时,应用程序是在前台和后台。

The Pro version of the Android iBeacon Library comes with an automatic battery saver that slows down scans when the app is in the background to save battery. The open source Android iBeacon Library also allows configuration of a foreground and background bluetooth scan rate, and provides methods to call to tell the library when the app is in the foreground and the background.

在iOS上的节电策略是相似的。如果没有应用程序是为范围在前台iBeacons,蓝牙扫描​​不是不断地进行。背景扫描的精确频率没有公布,但我有分寸这一次发生在与iOS 7.1 iPhone 4S的每15分钟。

On iOS the battery saving strategy is similar. When no app is ranging for iBeacons in the foreground, bluetooth scans are not performed constantly. The exact frequency of background scans is not published, but I have measured it happening once every 15 minutes on a iPhone 4S with iOS 7.1.

扫描特定的UUID,对电池的寿命没有影响。在操作系统层级,蓝牙LE扫描查找不管它是否是一个iBeacon显示,或者是否具有特定的UUID是广告任何蓝牙LE设备。具体的UUID过滤器软件在更高层次上进行处理。

Scanning for specific UUIDs has no effect on battery life. At the OS-level, a Bluetooth LE scan looks for any Bluetooth LE device that is advertising regardless of whether it is an iBeacon or whether it has a specific UUID. The filter for specific UUIDs is handled in software at a higher level.

这篇关于如何Android和iOS扫描蓝牙信标,不带电池的问题?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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