public ScanOptions setTimeout(long timeout) {
        addExtra(Intents.Scan.TIMEOUT, timeout);
        return this;
    }
Initiates a scan for all known barcode types with the default camera.
And starts a timer to finish on timeout

@return Activity.RESULT_CANCELED and true on parameter TIMEOUT.
zxing-android-embedded/src/com/journeyapps/barcodescanner/ScanOptions.java