Google ML Kit Dependency
Anyline’s scanning runs on the Anyline scanning engine and does not use Google ML Kit. One optional feature is the exception, and it is off by default.
This page applies to Android only. On iOS, face detection comes from the operating system, so there is nothing to add.
|
As of Anyline Mobile SDK 56.3.0, the Anyline Android SDK no longer bundles Google ML Kit, and Apps that do not use face detection need no change. They ship with no Google ML Kit. |
Do you need Google ML Kit?
Most integrations need nothing. Face detection is the only feature that requires it, and it is only active when faceDetectionEnabled is set to true on universalIdConfig or mrzConfig in your scan view configuration. The default is false.
Anyline barcode scanning, OCR, Meter, ID, MRZ, License Plate, Tire, VIN, Container and Document all run on the Anyline engine and need nothing.
Search your scan view configuration JSON for faceDetectionEnabled. If it does not appear, your app needs no Google ML Kit.
|
Add Google ML Kit (only if you need it)
Add both packages to your app project, under your Android target framework:
<ItemGroup Condition="'$(TargetFramework)' == 'net10.0-android'">
<!-- Required for face detection on Universal ID / MRZ scan modes -->
<PackageReference Include="Xamarin.GooglePlayServices.MLKit.FaceDetection" Version="116.1.7" />
<PackageReference Include="Xamarin.Google.Dagger" Version="2.27.0" />
</ItemGroup>
Match the TargetFramework condition to the Android target framework your project uses.
Xamarin.GooglePlayServices.MLKit.FaceDetection is the .NET binding of the Android com.google.mlkit:face-detection module. Xamarin.Google.Dagger is a companion binding that Google ML Kit requires. Add both.
Once the packages are present, no further setup is required. The Anyline SDK initializes Google ML Kit on demand when the feature runs.
iOS
Nothing to add. On iOS, face detection uses frameworks that ship with the operating system, so it works with no extra package and no change to your project.
This has one consequence worth knowing. The same scan view configuration can behave differently across platforms: if you enable faceDetectionEnabled and forget the Android packages, the feature works on iOS and fails on Android.
Google’s data collection
Google ML Kit is Google’s software, not Anyline’s. When you add it to your app, it runs under Google’s ML Kit terms and may send its own diagnostic and usage data to Google. That traffic comes from the ML Kit libraries running in your app. It does not pass through the Anyline SDK, and Anyline neither controls it nor receives any of it.
Accepting Google’s terms is therefore a matter between your app and Google. If your app carries privacy notice, consent or data processing obligations, Google ML Kit falls under your app’s, not Anyline’s.
If you do not add it, no Google ML Kit code ships in your app and none of this applies. The next section shows how to confirm that.
Verify a build without Google ML Kit
For privacy-sensitive deployments that do not use face detection, confirm no Google ML Kit reaches the Android build:
-
Check the APK with the Android Studio APK Analyzer. There should be no
com.google.mlkit.*classes. -
Inspect the merged manifest. There should be no
com.google.mlkit.common.internal.MlKitInitProvider. -
Run your scan and confirm it completes with no crash and no Google ML Kit or Google Play Services network traffic.
Other packages in your app may pull in Google ML Kit independently of Anyline.
|
Get help
If there is anything you are missing, you require support, or want to provide us with feedback, please reach out to us via https://support.anyline.com, where you either may find helpful information in our Knowledge Base or you can open a Support Ticket for more specific inquiries. In order to better assist you, please include any code of your Anyline integration and any ScanViewConfig you are using. |