获取我们在 Firebase 峰会上发布的所有信息,了解 Firebase 可如何帮助您加快应用开发速度并满怀信心地运行应用。
了解详情
使用集合让一切井井有条
根据您的偏好保存内容并对其进行分类。
条码扫描
plat_ios
plat_android

使用 ML Kit 的条形码扫描 API,您可以读取使用大多数标准条形码格式编码的数据。条码扫描发生在设备上,不需要网络连接。
条形码是将信息从现实世界传递到您的应用程序的便捷方式。特别是,当使用二维码(例如 QR 码)时,您可以对结构化数据(例如联系信息或 WiFi 网络凭据)进行编码。由于 ML Kit 可以自动识别和解析这些数据,因此您的应用可以在用户扫描条形码时做出智能响应。
iOS安卓
如果您是 Flutter 开发人员,您可能会对FlutterFire感兴趣,它包含一个用于 Firebase 的 ML Vision API 的插件。
关键能力
读取大多数标准格式 | - 线性格式:Codabar、Code 39、Code 93、Code 128、EAN-8、EAN-13、ITF、UPC-A、UPC-E
- 2D 格式:Aztec、Data Matrix、PDF417、QR 码
|
自动格式检测 | 一次扫描所有支持的条形码格式,而无需指定您要查找的格式。或者,通过将检测器限制为您感兴趣的格式来提高扫描速度。 |
提取结构化数据 | 使用支持的 2D 格式之一存储的结构化数据会被自动解析。支持的信息类型包括 URL、联系信息、日历事件、电子邮件地址、电话号码、SMS 消息提示、ISBN、WiFi 连接信息、地理位置和 AAMVA 标准驱动程序信息。 |
适用于任何方向 | 条形码被识别和扫描,无论其方向如何:正面朝上、倒置或侧面。 |
在设备上运行 | 条码扫描完全在设备上执行,不需要网络连接。 |
示例结果
 | 结果 |
---|
角落 | (49,125), (172,125), (172,160), (49,160) | 原始值 | 2404105001722 |
|
 | 结果 |
---|
角落 | (87,87) (612,87) (612,612) (87,612) | 原始值 | WIFI:S:SB1Guest;P:12345;T:WEP;; | 无线网络信息 | |
|
Except as otherwise noted, the content of this page is licensed under the Creative Commons Attribution 4.0 License, and code samples are licensed under the Apache 2.0 License. For details, see the Google Developers Site Policies. Java is a registered trademark of Oracle and/or its affiliates.
Last updated 2023-01-18 UTC.
[{
"type": "thumb-down",
"id": "missingTheInformationINeed",
"label":"没有我需要的信息"
},{
"type": "thumb-down",
"id": "tooComplicatedTooManySteps",
"label":"太复杂/步骤太多"
},{
"type": "thumb-down",
"id": "outOfDate",
"label":"内容需要更新"
},{
"type": "thumb-down",
"id": "translationIssue",
"label":"翻译问题"
},{
"type": "thumb-down",
"id": "samplesCodeIssue",
"label":"示例/代码问题"
},{
"type": "thumb-down",
"id": "otherDown",
"label":"其他"
}]
[{
"type": "thumb-up",
"id": "easyToUnderstand",
"label":"易于理解"
},{
"type": "thumb-up",
"id": "solvedMyProblem",
"label":"解决了我的问题"
},{
"type": "thumb-up",
"id": "otherUp",
"label":"其他"
}]