Class IOSBarcodeScanService
java.lang.Object
com.gluonhq.attach.barcodescan.impl.IOSBarcodeScanService
- All Implemented Interfaces:
BarcodeScanService
Note: Since iOS 10, the key
NSCameraUsageDescription is required in
the plist file in order to use this service-
Property Summary
PropertiesTypePropertyDescriptionjavafx.beans.property.ReadOnlyStringPropertyA read-only property containing the result of the scan. -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidStarts up the scanner functionality (commonly provided via the camera), and then parsed by Attach to determine the string the barcode represents.voidStarts up the scanner functionality (commonly provided via the camera), and then parsed by Attach to determine the string the barcode represents.javafx.beans.property.ReadOnlyStringPropertyA read-only property containing the result of the scan.scan()Starts up the scanner functionality (commonly provided via the camera), in a blocking way, and then parsed by Attach to determine the string the barcode represents.Starts up the scanner functionality (commonly provided via the camera), in a blocking way, and then parsed by Attach to determine the string the barcode represents.static voidSets the value of the property result.
-
Property Details
-
result
public javafx.beans.property.ReadOnlyStringProperty resultProperty- Specified by:
resultPropertyin interfaceBarcodeScanService- See Also:
-
-
Constructor Details
-
IOSBarcodeScanService
public IOSBarcodeScanService()
-
-
Method Details
-
scan
Description copied from interface:BarcodeScanServiceStarts up the scanner functionality (commonly provided via the camera), in a blocking way, and then parsed by Attach to determine the string the barcode represents.- Specified by:
scanin 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
Description copied from interface:BarcodeScanServiceStarts up the scanner functionality (commonly provided via the camera), in a blocking way, and then parsed by Attach to determine the string the barcode represents.- Specified by:
scanin 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.
-
asyncScan
public void asyncScan()Description copied from interface:BarcodeScanServiceStarts up the scanner functionality (commonly provided via the camera), and then parsed by Attach to determine the string the barcode represents.- Specified by:
asyncScanin interfaceBarcodeScanService
-
asyncScan
Description copied from interface:BarcodeScanServiceStarts up the scanner functionality (commonly provided via the camera), and then parsed by Attach to determine the string the barcode represents.- Specified by:
asyncScanin 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.
-
resultProperty
public javafx.beans.property.ReadOnlyStringProperty resultProperty()Description copied from interface:BarcodeScanServiceA read-only property containing the result of the scan.- Specified by:
resultPropertyin interfaceBarcodeScanService- See Also:
-
setResult
Sets the value of the property result.- Property description:
-