Developed by scan service: Difference between revisions

From wizarPOS
Line 17: Line 17:


===== startScan =====
===== startScan =====
startScan is an asynchronous call interface and indicating the continuous scanning is started.
After the application calls this interface, the scan service opens the camera defined by the scan parameter and starts the scan. After every single scanning, the results will be returned during the callback. After each callback is done, the next scanning continue to run starts.
Parameter:Scan parameter, IScanCallBack
Return: void


===== foundBarcode =====
===== foundBarcode =====
===== stopScan =====
===== stopScan =====

Revision as of 07:05, 20 April 2018

The scan service ,which is an app and started by using AIDL and the third apps custom their UI through by transfer some parameters, provides convenient services that include scaning bar code and getting result of scanning for comsumers.

Introduction

There are many applications are developed based on smart POS. In one thing, many of the Smart POS developers also have POS industry background,but not professional Android developers. So when they start developing applications, they want to be provided with a convenient scan API by WizarPOS, instead of learning Zxing/Zbar themselves.In other thing,from the hardware point of view, the scan parts used on smart POS, are not necessarily the standard camera, there will be some transformation. In some cases, the scan part will be required to be a specialized hardware. Therefore, the direct use of Zxing/Zbar is not really applicable for WizarPOS smart POS, but need some modification and customization.
For the reasons above, we consider to develop WizarPOS Scan Services to facilitate the third party developers in developing applications with scan function.

Interface

scanBarcode

scanBarcode is a synchronous calling interface.

After the application calls the interface, the scan service opens the camera defined by the scan parameter and then starts the scan. Once getting the result of scanning, the camera is closes and the results are returned immediately.

Parameter: Scan parameter

Return: Scan result

startScan

startScan is an asynchronous call interface and indicating the continuous scanning is started.

After the application calls this interface, the scan service opens the camera defined by the scan parameter and starts the scan. After every single scanning, the results will be returned during the callback. After each callback is done, the next scanning continue to run starts.

Parameter:Scan parameter, IScanCallBack

Return: void

foundBarcode
stopScan