Package 

Class BeaconTransmitter


  • 
    public class BeaconTransmitter
    
                        

    Provides a mechanism for transmitting as a beacon. Requires Android 5.0

    • Constructor Detail

      • BeaconTransmitter

        BeaconTransmitter(Context context, BeaconParser parser)
        Creates a new beacon transmitter capable of transmitting beacons with the format specified in the BeaconParser and with the data fields specified in the Beacon object
        Parameters:
        parser - specifies the format of the beacon transmission
    • Method Detail

      • isStarted

         boolean isStarted()

        Tells if transmission has started

      • setBeacon

         void setBeacon(Beacon beacon)

        Sets the beacon whose fields will be transmitted

      • setAdvertiseMode

         void setAdvertiseMode(int mAdvertiseMode)

        AdvertiseSettings.ADVERTISE_MODE_BALANCED 3 Hz AdvertiseSettings.ADVERTISE_MODE_LOW_LATENCY 10 Hz AdvertiseSettings.ADVERTISE_MODE_LOW_POWER 1 Hz

      • setAdvertiseTxPowerLevel

         void setAdvertiseTxPowerLevel(int mAdvertiseTxPowerLevel)

        AdvertiseSettings.ADVERTISE_TX_POWER_HIGH -56 dBm @ 1 meter with Nexus 5 AdvertiseSettings.ADVERTISE_TX_POWER_LOW -75 dBm @ 1 meter with Nexus 5 AdvertiseSettings.ADVERTISE_TX_POWER_MEDIUM -66 dBm @ 1 meter with Nexus 5 AdvertiseSettings.ADVERTISE_TX_POWER_ULTRA_LOW not detected with Nexus 5

      • setConnectable

         void setConnectable(boolean connectable)

        Whether the advertisement should indicate the device is connectable.

      • startAdvertising

         void startAdvertising(Beacon beacon)

        Starts advertising with fields from the passed beacon

      • stopAdvertising

         void stopAdvertising()

        Stops this beacon from advertising