Class IOSBarcodeScanService
- java.lang.Object
-
- com.gluonhq.attach.barcodescan.impl.IOSBarcodeScanService
-
- All Implemented Interfaces:
BarcodeScanService
public class IOSBarcodeScanService extends java.lang.Object implements BarcodeScanService
Note: Since iOS 10, the keyNSCameraUsageDescription
is required in the plist file in order to use this service
-
-
Constructor Summary
Constructors Constructor Description IOSBarcodeScanService()
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description java.util.Optional<java.lang.String>
scan()
Starts up the scanner functionality (commonly provided via the camera), and then parsed by Attach to determine the string the barcode represents.java.util.Optional<java.lang.String>
scan(java.lang.String title, java.lang.String legend, java.lang.String resultText)
Starts up the scanner functionality (commonly provided via the camera), and then parsed by Attach to determine the string the barcode represents.static void
setResult(java.lang.String v)
-
-
-
Method Detail
-
scan
public java.util.Optional<java.lang.String> scan()
Description copied from interface:BarcodeScanService
Starts up the scanner functionality (commonly provided via the camera), and then parsed by Attach to determine the string the barcode represents.- Specified by:
scan
in interfaceBarcodeScanService
- Returns:
- Returns an Optional containing the parsed string. The Optional may be empty if the String fails to be parsed for any reason, or if the user cancels the operation.
-
scan
public java.util.Optional<java.lang.String> scan(java.lang.String title, java.lang.String legend, java.lang.String resultText)
Description copied from interface:BarcodeScanService
Starts up the scanner functionality (commonly provided via the camera), and then parsed by Attach to determine the string the barcode represents.- Specified by:
scan
in interfaceBarcodeScanService
- Parameters:
title
- The title of the scan view. If null or empty nothing will be displayed.legend
- An explanatory message displayed in the scan view. If null or empty nothing will be displayed.resultText
- The text to display when the scan ends successfully, before the scanned text. If empty or null, the result won't be shown.- Returns:
- Returns an Optional containing the parsed string. The Optional may be empty if the String fails to be parsed for any reason, or if the user cancels the operation.
-
setResult
public static void setResult(java.lang.String v)
-
-