usesmileid_huawei_document 12.4.0
usesmileid_huawei_document: ^12.4.0 copied to clipboard
Huawei HMS document detection implementation for the UseSmileID Flutter SDK.
usesmileid_huawei_document #
The Android (Huawei HMS ML Kit) implementation of document detection for the Smile ID Flutter SDK — for Huawei devices that ship without Google Mobile Services.
This is an endorsed federated implementation of
usesmileid_platform_interface
— it runs document capture/analysis natively via Huawei ML Kit.
Choosing HMS per phone #
An app lists this plugin with usesmileid_mlkit_document, and usesmileid_vision_document for iOS,
and either picks per phone or ships a build per store. The SDK README's
Huawei section has the one snippet to copy: it resolves UseSmileIDMobileServices once before UseSmileIDBuilder is in the
tree, picks the Huawei, ML Kit or, by platform, Vision factory from one answer, turns away a phone
whose services the build cannot use, and says which phones a Huawei-only build must not reach. For
documents the factories are HuaweiDocumentAnalyzerFactory, MlKitDocumentAnalyzerFactory and
VisionDocumentAnalyzerFactory, registered with
analyzers.forCaptureType(CaptureType.document, (c) => c.add(documentFactory)).
Android manifest #
HMS's ml-computer-vision-base, which this plugin brings in, declares
android:allowBackup="false". An app that sets android:allowBackup="true"
fails its manifest merge until it marks its own value as the one that wins:
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools">
<application
android:allowBackup="true"
tools:replace="android:allowBackup">
The plugin adds Huawei's Maven repository to the build itself.
License #
MIT — see LICENSE.