Set Shutdown Timeout

This method sets the time, in minutes, before a card reader on battery power will automatically shut down due to inactivity. Sending a shutdown timeout of 0 will disable the shutdown timeout entirely, meaning that the card reader will stay on until it is manually powered off or it runs out of battery. Times in the range of 0-60 minutes are valid.

note

Only supported for ROAM card readers (Moby/5500).

Only supported on Android and iOS platforms.

Code Samples

Java

Implement the ECLCardReaderOperationListener<ECLTransactionProgress> interface, then pass an instance of it to the setShutdownTimeout API to receive callbacks about the status of the operation.

ECLCardReaderInterface cardReader;
cardReader.setShutdownTimeout(timeout, new ECLCardReaderOperationListener<ECLTransactionProgress>()
{
    @Override
    public void deviceOperationCompleted(ECLCardReaderInterface eclCardReaderInterface,
        ECLTransactionProgress progress)
    {
        // handle successful completion of operation
    }
 
    @Override
    public void deviceOperationError(ECLCardReaderInterface eclCardReaderInterface, ECCError eccError)
    {
        // handle error
    }
 
    @Override
    public void deviceOperationProgress(ECLCardReaderInterface eclCardReaderInterface,
        ECLTransactionProgress progress)
    {
        // handle progress messages
    }
});

Objective-C

Implement the ECLGeneralOperationDelegate protocol, then pass an instance of it to the setShutdownTimeout API to receive callbacks about the status of the operation.

id<ECLCardReaderProtocol> cardReader;
[cardReader setShutdownTimeout:self minutes:60];
 
// Implement ECLGeneralOperationDelegate methods
- (void)progress:(ECLTransactionProgress)progress {
    // handle progress messages
}
 
- (void)completed:(BOOL)success error:(nullable NSError *)error {
    // handle result of operation completion, whether successful or failed
}