Warning: file_get_contents(/data/phpspider/zhask/data//catemap/1/php/257.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Beacon PC或Android模拟器_Android_Bluetooth_Ibeacon_Beacon_Eddystone - Fatal编程技术网

Beacon PC或Android模拟器

Beacon PC或Android模拟器,android,bluetooth,ibeacon,beacon,eddystone,Android,Bluetooth,Ibeacon,Beacon,Eddystone,我需要一些关于模拟信标的帮助,我搜索了很多小脚本来运行一个没有运气的sumilator,我没有找到android的信标模拟器应用程序。你知道有一个在工作吗?我需要测试,因为我开始使用android的api。有什么想法吗?提前感谢。您可以使用在Android 5+设备上作为信标进行传输。下面是一个例子: Beacon beacon = new Beacon.Builder() .setId1("2f234454-cf6d-4a0f-adf2-f4911ba9ffa6") .setI

我需要一些关于模拟信标的帮助,我搜索了很多小脚本来运行一个没有运气的sumilator,我没有找到android的信标模拟器应用程序。你知道有一个在工作吗?我需要测试,因为我开始使用android的api。有什么想法吗?提前感谢。

您可以使用在Android 5+设备上作为信标进行传输。下面是一个例子:

Beacon beacon = new Beacon.Builder()
    .setId1("2f234454-cf6d-4a0f-adf2-f4911ba9ffa6")
    .setId2("1")
    .setId3("2")
    .setManufacturer(0x0118) // Radius Networks.  Change this for other beacon layouts
    .setTxPower(-59)
    .setDataFields(Arrays.asList(new Long[] {0l})) // Remove this for beacon layouts without d: fields
    .build();

// Change the layout below for other beacon types
BeaconParser beaconParser = new BeaconParser()
    .setBeaconLayout("m:2-3=beac,i:4-19,i:20-21,i:22-23,p:24-24,d:25-25");
BeaconTransmitter beaconTransmitter = new     BeaconTransmitter(getApplicationContext(), beaconParser); 
beaconTransmitter.startAdvertising(beacon, new AdvertiseCallback() {
        @Override
        public void onStartFailure(int errorCode) {
            Log.e(TAG, "Advertisement start failed with code: "+errorCode);
        }

        @Override
        public void onStartSuccess(AdvertiseSettings settingsInEffect) {
            Log.i(TAG, "Advertisement start succeeded.");
        }
});
请参阅此处的更多详细信息:


你也可以使用基于这个库的现成软件。

好的,我知道我要说的不是android设备的模拟器,但是当开发一个应用程序来检测android设备中的信标(用于estimote信标)接收数据时,如果你手边有ipad,你可以用estimote应用程序模拟信标。这解决了我的问题。谢谢你的另一个答案,我也会试试