Copyright (c) Huawei Technologies Co., Ltd. 2012-2021. All rights reserved.
- Introduction
- What you will Create
- What You Will Learn
- Hardware Requirements
- Software Requirements
- Example Code
- License
CardReader App will give insight about how HMS ML kit, Scan kit, and Fido kit can be used for Business&Office purpose category and how we can make the card scanning easy. This app demonstrate on how end user can scan the Bank Cards, General Cards(Business, PAN Card and Adhaar Card) and save it in the app. Whenver required User can open the app and see the stored card details. As a Safety purpose the Details of the card can only be seen after authentication using PIN Lock or FingerPrint or 3D-FaceRecognition. App is developed using below HMS Features.
In this code lab, you will create a CardReader Demo project and use the APIs of HUAWEI ML, Scan and Fido. We are going to create a end to end prototype for scanning the different type of cards (General,Bank cards) and store it in the app.
- Recognizing bank cards and general cards using ML Kit
- Generate QR code and share
- PIN/Fingerprint/Face Authentication using FIDO kit
In this code lab, you will learn how to:
- Integrate HUAWEI ML Kit.
- Integrate Scan Kit.
- Integrate Fido .
- A computer (desktop or laptop) that runs the Windows 10 operating system
- Huawei phone with HMS Core (APK) 5.0.0.300 or later installed
**Note:** Please prepare the preceding hardware environment and relevant devices in advance.
- Android Studio 3.X
- JDK 1.8 and later
- SDK Platform 23 and later
- Gradle 4.6 and later
**Note:** Please prepare the preceding software environment in advance.
> Only EMUI 4 (API Level 23) and later versions support fingerprint authentication. In addition, ensure that the mobile phone hardware supports fingerprint authentication
> Only EMUI 10 (API Level 29) and later versions support 3D facial authentication. In addition, the device hardware must support 3D facial authentication. Currently, only Mate 20 Pro and Mate 30 Pro support 3D facial authentication.
Use the below link to do initial configuration for the application development https://developer.huawei.com/consumer/en/codelab/HMSPreparation/index.html#3
Enable the API permission for below kits from Project Settings, Manage APIs and enable the API permission.
- ML Kit
- Fido Kit
- Scan Kit (is a standalone sdk, no need of any configuration in AGC)
**Note:** Some API’s will be enabled by default. If not enable it manually.
For official Documentation and more services, please refer below documentation from developer website
AgreementPageView: Displays agreement page to user to utilize device authentication. User should agree to proceed further to use the application.
DashboardActivity: Application Main Dash Board, which contains GeneralCard, BankCard and Settings grid view in the main page.
GeneralCardActivity: Dispays the Add Card page to scan Businesscard, pancard and adhaar card
ScannedCardListActivity: Contains the list of saved General Cards (Businesscard, pancard and adhaar card)
GeneralcardListAdapter: Adapter to handle the General card list
AadhaarProcessing: Contains processing logic for scanned text from Aadhaar card.
GenericProcessing: Contains processing logic for scanned text from Business Card.
PanProcessing: Contains processing logic for scanned text from Pan Card
BankCard: Dispays the Add Card page to scan BankCard. Only VISA/Master Card are supported as of now.
BankCardListAdapter: Contains the list of saved bank cards.
ScannedCardDetailsActivity: Displays the Full details of the card
AuthenticationPage: prompt the user to show authenication page to enter PIN lock or Fingerprint or FaceRecognition, to access the card details. If user wants to View or delete the card, this page appears to make sure user is the actual owner of the device.
BioAuthUtils: Contains common functions used inside the app to check Device authentication.
AppDatabase,BusinessCardEntity, BusinessCardEntityDao, DatabaseClient: Used for roomdb functionality
SettingsActivity: Settings menu, contains version Info and Change Security Settings menu
Constants: Contains the constants used inside the application
- ML Kit(General Card Recognition)
- ML Kit (Bank Card Recognition)
- Scan Kit(Generating QR Code)
- Fingerprint Authentication using FIDO kit
- Face Recognition using FIDO Kit
HMS Guide sample is licensed under the Apache License, version 2.0.# CardReader