Skip to content Skip to sidebar Skip to footer

How To Programmatically Set Uuid, Major Id, ... And Other Properties At 1m In Altbeacon Format

I am currently exploring retail advertising options. I am interested in AltBeacon as it is an open standard. I have a basic question, if someone can answer How can I programmatical

Solution 1:

If you wan to know how to do this with the Android Beacon Library, this is explained on the sample code page

 Beacon beacon = new Beacon.Builder()
    .setId1("2f234454-cf6d-4a0f-adf2-f4911ba9ffa6")
    .setId2("1")
    .setId3("2")
    .setManufacturer(0x0118)
    .setTxPower(-59)
    .setDataFields(Arrays.asList(new Long[] {0l}))
    .build();
 BeaconParser beaconParser = new BeaconParser()
    .setBeaconLayout("m:2-3=beac,i:4-19,i:20-21,i:22-23,p:24-24,d:25");
 BeaconTransmitter beaconTransmitter = new BeaconTransmitter(getApplicationContext(), beaconParser);
 beaconTransmitter.setAdvertiseMode(AdvertiseSettings.ADVERTISE_MODE_LOW_LATENCY);
 beaconTransmitter.setAdvertiseTxPowerLevel(AdvertiseSettings.ADVERTISE_TX_POWER_HIGH);
 beaconTransmitter.startAdvertising(beacon);

Post a Comment for "How To Programmatically Set Uuid, Major Id, ... And Other Properties At 1m In Altbeacon Format"