IOS Devices Cannot See Nexus 9 Advertised AltBeacon Beacon

We have an ecosystem based on iBeacon and we want to expand it with Android ads. We are using the AltBeacon BeaconTransmitter class based on this blog post: http://developer.radiusnetworks.com/2014/11/18/beacon-transmission-with-android-5.html with the layout given in this thread: Is this correct layout to detect iBeacons with Android Beacon Library from AltBeacon?

We use a Nexus 9 tablet for advertising, our other Android devices can see the advertised beacon, but the iOS device cannot.

We create a beacon as follows:

mBeaconTransmitter = new BeaconTransmitter(this, new BeaconParser().setBeaconLayout("m:2-3=0215,i:4-19,i:20-21,i:22-23,p:24-24"));
            // Transmit a beacon with Identifiers 2F234454-CF6D-4A0F-ADF2-F4911BA9FFA6 1 2
            Beacon beacon = new Beacon.Builder()
                    .setId1("our uuid")
                    .setId2("a major id")
                    .setId3("a minor id")
                    .setManufacturer(0x0000)
                    .setTxPower(-59)
                    .setDataFields(Arrays.asList(new Long[] {0l}))
                    .build();

      

What could be the missing piece? We do not see this beacon in the CL method didRangeBeacons.

+3


source to share


1 answer


The new BeaconTransmitter

Android Beacon Library class requires the expression to new BeaconParser.setBeaconLayout()

be exactly correct for the type of beacon you want to pass.

Two things about the code look suspicious:



  • The code calls setDataFields () on the beacon even if no data fields (prefixed with d :) are defined in the beacon layout expression. This should probably result in an exception, but if it doesn't, it could cause the transfer to fail. I would remove that.

  • I'm not sure if the vendor code 0x0000 is valid. If (1) doesn't solve the problem, try different manufacturer codes to find the one that works with iOS.

To check if your Nexus 9 has hardware issues, try running the free QuickBeacon app on the Google Play store. It uses the same transfer APIs, so if it works, you should be able to get your code to work as well.

+3


source







All Articles