GithubHelp home page GithubHelp logo

clearboy88 / hms-scan-demo Goto Github PK

View Code? Open in Web Editor NEW

This project forked from hms-core/hms-scan-demo

0.0 0.0 0.0 805 KB

Sample code for demonstrating Huawei HMS ScanKit capabilities. It illustrates how to help developers quickly build code scanning capabilities.

Home Page: https://developer.huawei.com/consumer/en/doc/development/HMS-Guides/scan-introduction-4?ha_source=hms1

License: Apache License 2.0

Java 71.22% Kotlin 28.78%

hms-scan-demo's Introduction

HMS Scankit Demo

English | δΈ­ζ–‡

Table of Contents

Introduction

The sample code shows how to use the HMS Scan Kit's code scanning capabilities to help developers quickly build code scanning capabilities within applications.

You also can use HMS Toolkit to quickly integrate the kit and run the demo project, as well as debug the app using a remote device for free. For details, please visit https://developer.huawei.com/consumer/en/doc/development/Tools-Guides/getting-started-0000001077381096.

Getting Started

  1. Create an app and configure the app information in AppGallery Connect. See details:HUAWEI Scan Development Preparation

  2. Adding the AppGallery Connect Configuration File of Your App

  3. Configuring the Maven Repository Address for the HMS Core SDK

Supported Environments

Compile using Android Studio and JDK1.8 Prepared a device running EMUI 3.0 or later, adapted HMS APK 4.0.0.200 or later

Sample Code

Scan kit demo provides four modes to adapt to the code scanning ability in different scenarios.

  • Default View

The app directly calls the scanning activity of HUAWEI Scan Kit, and obtains the scanning result through the asynchronous callback API. Barcodes can be scanned using the device camera, or through an imported image.

Code location:example/scankitdemo/MainActivity.java

  • Customized View

The app directly creates a RemoteView, and obtains the scanning result through the asynchronous callback API. Barcodes can be scanned using the device camera, or through an imported image.

Code location:example/scankitdemo/DefinedActivity.java

  • Bitmap API

The app directly passes a bitmap through the bitmap API, and obtains the scanning result through the API. In your app, you can call the camera API or import a local image to obtain the bitmap, and then call the bitmap API of HUAWEI Scan Kit to decode the bitmap.

Code location:example/scankitdemo/CommonActivity.java example/scankitdemo/CommonHandler.java

  • MultiProcessor API

The app passes frame data through the MultiProcessor API for decoding, and detects barcodes along with multiple objects such as faces, using the same technology as HUAWEI ML Kit.

Code location:example/scankitdemo/CommonActivity.java example/scankitdemo/CommonHandler.java

5)Generate Code API

The app allow you to generate barcode.

Code location:example/scankitdemo/GenerateCodeActivity.java

Result

Question or issues

If you want to evaluate more about HMS Core, r/HMSCore on Reddit is for you to keep up with latest news about HMS Core, and to exchange insights with other developers.

If you have questions about how to use HMS samples, try the following options:

  • Stack Overflow is the best place for any programming questions. Be sure to tag your question with huawei-mobile-services.
  • Huawei Developer Forum HMS Core Module is great for general questions, or seeking recommendations and opinions.

If you run into a bug in our samples, please submit an issue to the Repository. Even better you can submit a Pull Request with a fix.

License

HMS Scan Kit sample is licensed under the Apache License, version 2.0.

hms-scan-demo's People

Contributors

hms-scankit avatar mike-mei avatar hms-mlkit avatar tiantian0303 avatar gwwhuawei avatar bugfactory9527 avatar ferprieto avatar huawei-mobile-services-core avatar luckyduby avatar chenjingming1 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    πŸ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. πŸ“ŠπŸ“ˆπŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❀️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.