code: public void bind(@NonNull BeaconConsumer consumer) {
          if (!isBleAvailableOrSimulated()) {
              LogManager.w(TAG, "Method invocation will be ignored.");
              return;
          }
          synchronized (consumers) {
              ConsumerInfo newConsumerInfo = new ConsumerInfo();
              ConsumerInfo alreadyBoundConsumerInfo = consumers.putIfAbsent(consumer, newConsumerInfo);
              if (alreadyBoundConsumerInfo != null) {
                  LogManager.d(TAG, "This consumer is already bound");
              }
              else {
                  LogManager.d(TAG, "This consumer is not bound.  Binding now: %s", consumer);
                  if (mScheduledScanJobsEnabled) {
                      LogManager.d(TAG, "Not starting beacon scanning service. Using scheduled jobs");
                      consumer.onBeaconServiceConnect();
                  }
                  else {
                      LogManager.d(TAG, "Binding to service");
                      Intent intent = new Intent(consumer.getApplicationContext(), BeaconService.class);
                      if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.O &&
                              this.getForegroundServiceNotification() != null) {
                          if (isAnyConsumerBound()) {
                              LogManager.i(TAG, "Not starting foreground beacon scanning" +
                                      " service.  A consumer is already bound, so it should be started");
                          }
                          else {
                              LogManager.i(TAG, "Starting foreground beacon scanning service.");
                              mContext.startForegroundService(intent);
                          }
                      }
                      else {
                      }
                      consumer.bindService(intent, newConsumerInfo.beaconServiceConnection, Context.BIND_AUTO_CREATE);
                  }
                  LogManager.d(TAG, "consumer count is now: %s", consumers.size());
              }
          }
      }
docs: Binds an Android <code>Activity</code> or <code>Service</code> to the <code>BeaconService</code>.  The
  <code>Activity</code> or <code>Service</code> must implement the <code>beaconConsumer</code> interface so
  that it can get a callback when the service is ready to use.
  
  @param consumer the <code>Activity</code> or <code>Service</code> that will receive the callback when the service is ready.