-
-
Notifications
You must be signed in to change notification settings - Fork 3.5k
refactor: migrate android to google ML Kit #3272
refactor: migrate android to google ML Kit #3272
Conversation
9dae321
to
e2e7664
Compare
Hi @seancheung , thanks for your help! I noticed that the build step for android is broken |
Yes, but it should be |
voilà~ |
d0c3f79
to
a946239
Compare
Just merged #3241 for iOS, please let me know if there is any problem with the |
# [4.0.0](v3.44.3...v4.0.0) (2021-07-16) ### Features * migrate android to google ML Kit ([#3272](#3272)) ([f72289f](f72289f)) * migrate to google ML Kit ([#3241](#3241)) [skip ci] ([670b973](670b973)) ### BREAKING CHANGES * migrate to Google ML Kit * migrate to google ML Kit * refactor: migrate android to google ML Kit * refactor: migrate android general flavor to mlkit * docs: update docs for MLKit * docs: update installation doc Co-authored-by: Mike Duminy <michael-james.duminy@klarna.com> Co-authored-by: Zhang Xuan <xuan.zhang@xiaobao100.com>
🎉 This PR is included in version 4.0.0 🎉 The release is available on: Your semantic-release bot 📦🚀 |
implementation "com.google.android.gms:play-services-mlkit-text-recognition:16.3.0" | ||
generalImplementation "com.google.android.gms:play-services-mlkit-barcode-scanning:16.2.0" | ||
generalImplementation "com.google.android.gms:play-services-mlkit-face-detection:16.2.0" | ||
mlkitImplementation "com.google.mlkit:barcode-scanning:16.2.0" | ||
mlkitImplementation "com.google.mlkit:face-detection:16.1.2" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It is really unfortunate that they do not publish a "Bill of Materials" that handles all the disparate versioning, there appears to be no avoiding a different version for almost every part.
It might still be a good idea for a follow-on PR that allowed users to specify versions in gradle variables in an ext block like googlePlayServicesVisionVersion
used to have, e.g. playServicesMLKitFaceDetectionVersion
/ mlKitFaceDetectionVersion
etc etc
sidebar_label: Migrating from version 2.x/3.x to 4.x | ||
--- | ||
|
||
Version 3.x of react-native-camera replaces `MLKit for Firebase`(which has been deprecated) with `Google MLKit`, allowing you to use advanced features such as text/face recognition without Firebase. You can learn more at [MLKit](https://developers.google.com/ml-kit/migration) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Typo: not version 3.x, version 4.x here
@seancheung I just successfully integrated v4 on android while using react-native-firebase for other things, and tested QR scanning feeding into a react-native-firebase dynamic link decode etc - everything worked ✨ |
According to https://developers.google.com/ml-kit/migration "ML Kit for Firebase" has been replaced with "ML Kit".
This PR cleans up all the old Firebase library references in the Android code and migrates to the new ML Kit.
I've tested this on-device and it works without any problem.(The example does not work at the beginning).
Docs are partially updated.
For iOS migration, check this PR: #3241