目录

Customized View

In Customized View mode, you do not need to worry about developing the scanning process or camera control. Scan Kit will do all these tasks for you. However, you will need to design the scanning UI. This can also be easily completed based on sample code.

Before using this mode, ensure that hardware acceleration is not disabled for your app. That is, ensure that the value of hardwareAccelerated is true. Otherwise, the black screen may occur on some models.

Service Process

The process of using Scan Kit in Customized View mode is as follows.

  1. A user launches an app and sends a request of scanning a barcode.
  2. The app checks whether it has the camera access and file read permissions.
  3. The app initializes the customized view to build the scanning UI and start scanning.
  4. If the scanning is successful, the HMS Core Scan SDK calls the onResult API of the app to pass the scanning result.
  5. The app encapsulates the scanning result and sends it to the user.

Development Process