Android GMS Barcode Scanner代码跟踪

用Android Studio看SS-Android 关于Barcode Scanner部分的代码,就想知道Detector是怎么实现Barcode识别的,到最后发现都是系统调用。

类跟踪:BarcodeDetector->zzh->zzn.zza->zzg->IInterface(Binder)->Barcode

Binder is an Android-specific interprocess communication mechanism, and remote method invocation system.

Container for a message: Parcel https://developer.android.com/reference/android/os/Parcel.html

GMS —Google Mobile Services brings Google’s most popular apps and APIs to your Android devices.

With the release of Google Play services 7.8 we’re excited to announce that we’ve added new Mobile Vision APIs which provide bar code detection APIs that read and decode a myriad of different bar code types, quickly, easily and locally.

Google Sample Android -Vision : The Mobile Vision API is now a part of ML Kit. We strongly encourage you to try it out, as it comes with new capabilities like on-device image labeling! Also, note that we ultimately plan to wind down the Mobile Vision API, with all new on-device ML capabilities released via ML Kit. Check out this codelab to use the vision APIs in ML Kit.

Firebase gives you the tools to develop high-quality apps, grow your user base, and earn more money. We cover the essentials so you can monetize your business and focus on your users.

ML Kit (for Firebase) is a mobile SDK that brings Google’s machine learning expertise to Android and iOS apps in a powerful yet easy-to-use package. Whether you’re new or experienced in machine learning, you can implement the functionality you need in just a few lines of code. There’s no need to have deep knowledge of neural networks or model optimization to get started. On the other hand, if you are an experienced ML developer, ML Kit provides convenient APIs that help you use your custom TensorFlow Lite models in your mobile apps.

TensorFlow Lite is a set of tools to help developers run TensorFlow models on mobile, embedded, and IoT devices. It enables on-device machine learning inference with low latency and a small binary size.

The live camera object detection feature uses both existing Material Design components and new elements specific to camera interaction. For code samples and demos of new elements (such as the reticle), check out the ML Kit Material Design showcase apps’ source code for Android and iOS.

Android 和 Google的产品各有偏重,Google强调跨平台,Android 的AOSP强调生态and系统行为模式,GMS 会慢慢简化,能做到跨平台的功能都转到Google去。

Leave a Reply

Your email address will not be published. Required fields are marked *