Android 设备可以充当 iBeacon 吗? [英] Can an Android device act as an iBeacon?

查看:35
本文介绍了Android 设备可以充当 iBeacon 吗?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

Android 设备能否充当 iBeacon 并确定其他 Android 设备何时进入其范围?其他 Android 设备是否需要开启蓝牙?

Can an Android device act as an iBeacon and figure out when other Android devices come in its range? Do those other Android devices need to have Bluetooth turned on?

如果客户进入我的商店并且他的设备上没有安装我的应用程序,iBeacon 可以工作,还是必须先安装应用程序?每天都有很多客户光顾我们的商店,但如果他们没有安装我的应用程序,iBeacon 概念是否有效?

If a customer comes into my shop and he doesn't have my app installed on his device, can iBeacon work, or must he install the app first? There are so many customers are visiting our shop daily, but if they don't have my app installed, does the iBeacon concept work?

推荐答案

YES 这在 Android 5+ 上是可行的,你可以找到 作为信标传输的开源代码Android 信标库.Beacon Scope 应用.

YES This is possible on Android 5+, and you can find open-source code for transmitting as a beacon in the Android Beacon Library. There is also a full-featured version of a beacon transmitter in the Beacon Scope app in the Google Play Store.

以下是使用 Android Beacon 库传输 iBeacon 的示例:

Here's an example of transmitting iBeacon with the Android Beacon Library:

Beacon beacon = new Beacon.Builder()
        .setId1("2f234454-cf6d-4a0f-adf2-f4911ba9ffa6")
        .setId2("1")
        .setId3("2")
        .setManufacturer(0x004c)
        .setTxPower(-59)
        .build();
BeaconParser beaconParser = new BeaconParser()
        .setBeaconLayout("m:2-3=0215,i:4-19,i:20-21,i:22-23,p:24-24");
BeaconTransmitter beaconTransmitter = new BeaconTransmitter(getApplicationContext(), beaconParser); 
beaconTransmitter.startAdvertising(beacon);

您还可以在 rootedAndroid 4.4.3 设备,但需要安装有系统权限的应用.

You can also transmit as a beacon on rooted Android 4.4.3 devices, but it requires an app installed with system privileges.

带有蓝牙LE的Android 4.3设备可以看到iBeacons,但不能充当iBeacons,因为Android 4.3不支持外设模式.三星 Android 设备包含一个单独的专有 SDK,但它也不允许设备充当 iBeacon.请参阅:让三星 Android 设备作为 iBeacon 做广告) iOS但是,设备可以充当 iBeacon.

Android 4.3 devices with BluetoothLE can see iBeacons but not act as iBeacons, because Android 4.3 does not support peripheral mode. Samsung Android devices contain a separate proprietary SDK but it also does not allow devices to act as iBeacons. See: Make Samsung Android device advertise as an iBeacon) iOS devices, however, can act as iBeacons.

通常,iBeacon 技术不适用于手机查看其他手机.但是您可以通过制作一个自定义应用程序来执行您在 iOS 上的建议,该应用程序使手机充当 iBeacon 并在它们周围寻找其他 iBeacon.这将允许任何拥有该应用程序的人看到附近拥有相同应用程序的其他人.所有手机都需要打开蓝牙.

Normally, iBeacon technologies are not intended for phones to see other phones. But you could do what you suggest on iOS by making a custom app that makes phones act as an iBeacon and look for other iBeacons around them. This would allow anybody with the app to see others with the same app nearby. All phones would need Bluetooth turned on.

要回答您的第二个问题,是的,Android 或 iOS 移动设备必须安装应用程序才能利用 iBeacons.除非安装了专门编程来执行某些操作的应用程序,否则当它看到 iBeacon 时,这两个操作系统当前都不会执行任何操作.因此,到达商店的客户必须已经安装了应用程序,否则他们将无法与 iBeacons 进行交互.

To answer your second question, yes, a mobile device, both Android or iOS, must have an app installed to take advantage of iBeacons. Neither operating system currently does anything when it sees an iBeacon unless an app is installed that is specifically programmed to do something. So customers who arrive in a store must have an app already installed or they cannot interact with iBeacons.

这篇关于Android 设备可以充当 iBeacon 吗?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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