new api for barcodescanner