Class BeaconManager

  • All Implemented Interfaces:
    org.altbeacon.beacon.BeaconConsumer, org.altbeacon.beacon.MonitorNotifier, org.altbeacon.beacon.RangeNotifier, org.altbeacon.beacon.startup.BootstrapNotifier

    public class BeaconManager
    extends java.lang.Object
    implements org.altbeacon.beacon.RangeNotifier, org.altbeacon.beacon.MonitorNotifier, org.altbeacon.beacon.BeaconConsumer, org.altbeacon.beacon.startup.BootstrapNotifier
    Manages beacon lifecycles and functions.
    • Constructor Detail

      • BeaconManager

        public BeaconManager​(android.content.Context context)
    • Method Detail

      • startMonitoring

        public void startMonitoring()
        Intialize monitoring for detecting beacons.
      • stopMonitoring

        public void stopMonitoring()
        Stop monitoring of beacons
      • setBackgroundIntervalScanPeriod

        public void setBackgroundIntervalScanPeriod​(long backgroundScanIntervalPeriod)
        Set the background duration interval period. This overrides the default value 20000L in milliseconds.
        Parameters:
        backgroundScanIntervalPeriod - interval for scanning beacon
      • setBackgroundDurationScanPeriod

        public void setBackgroundDurationScanPeriod​(long backgroundScanDurationPeriod)
        Set the background duration scan period. This overrides the default value 1000L in milliseconds.
        Parameters:
        backgroundScanDurationPeriod - duration on how long scanning will occur
      • didRangeBeaconsInRegion

        public void didRangeBeaconsInRegion​(java.util.Collection<org.altbeacon.beacon.Beacon> beacons,
                                            org.altbeacon.beacon.Region region)
        Specified by:
        didRangeBeaconsInRegion in interface org.altbeacon.beacon.RangeNotifier
      • didEnterRegion

        public void didEnterRegion​(org.altbeacon.beacon.Region region)
        Specified by:
        didEnterRegion in interface org.altbeacon.beacon.MonitorNotifier
      • didExitRegion

        public void didExitRegion​(org.altbeacon.beacon.Region region)
        Specified by:
        didExitRegion in interface org.altbeacon.beacon.MonitorNotifier
      • didDetermineStateForRegion

        public void didDetermineStateForRegion​(int i,
                                               org.altbeacon.beacon.Region region)
        Specified by:
        didDetermineStateForRegion in interface org.altbeacon.beacon.MonitorNotifier
      • onBeaconServiceConnect

        public void onBeaconServiceConnect()
        Specified by:
        onBeaconServiceConnect in interface org.altbeacon.beacon.BeaconConsumer
      • getApplicationContext

        public android.content.Context getApplicationContext()
        Specified by:
        getApplicationContext in interface org.altbeacon.beacon.BeaconConsumer
        Specified by:
        getApplicationContext in interface org.altbeacon.beacon.startup.BootstrapNotifier
      • unbindService

        public void unbindService​(android.content.ServiceConnection serviceConnection)
        Specified by:
        unbindService in interface org.altbeacon.beacon.BeaconConsumer
      • bindService

        public boolean bindService​(android.content.Intent intent,
                                   android.content.ServiceConnection serviceConnection,
                                   int i)
        Specified by:
        bindService in interface org.altbeacon.beacon.BeaconConsumer