stop after delay function

I am reading through Kontakt beacon documentation and I could not figure out why a stop after delay method is needed?

It is because it wanted to prevent a long connecting time?

private void startScanning() {
    proximityManager.connect(new OnServiceReadyListener() {
      @Override
      public void onServiceReady() {
        proximityManager.startScanning();
        devicesCount = 0;
        Toast.makeText(BackgroundScanService.this, "Scanning service started.", Toast.LENGTH_SHORT).show();
      }
    });
    stopAfterDelay();
  }

  private void stopAfterDelay() {
    handler.postDelayed(new Runnable() {
      @Override
      public void run() {
        proximityManager.disconnect();
        stopSelf();
      }
    }, TIMEOUT);
  }
How many English words
do you know?
Test your English vocabulary size, and measure
how many words do you know
Online Test
Powered by Examplum