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() {
      public void onServiceReady() {
        devicesCount = 0;
        Toast.makeText(BackgroundScanService.this, "Scanning service started.", Toast.LENGTH_SHORT).show();

  private void stopAfterDelay() {
    handler.postDelayed(new Runnable() {
      public void run() {
    }, 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