VisionBarcodePhone
interface
A phone number and it's detected type, e.g. VisionBarcodePhoneType.MOBILE
Example
import vision, { VisionBarcodeValueType } from '@react-native-firebase/ml-vision';
const [barcode, ...otherBarcodes] = await vision().barcodeDetectorProcessImage(filePath);
if (barcode && barcode.valueType === VisionBarcodeValueType.PHONE) {
console.log(barcode.phone);
} else if (barcode && barcode.valueType === VisionBarcodeValueType.CONTACT_INFO) {
console.log(barcode.contactInfo.phones[0]);
}