java.lang.Object | ||
↳ | com.neomades.app.Screen | |
↳ | com.neomades.barcode.BarcodeScannerScreen |
Screen that opens the camera to scan for bar code.
Use setBarcodeScanner(BarcodeScanner)
to define what kind of barcode
to track and to perform customized action when a barcode has been detected.
By default, a BarcodeScannerScreen has a configured BarcodeScanner
to
track QR Code. The action to perform when a QR Code is found can be changed
by setting a BarcodeListener
on the default scanner.
The camera of the BarcodeScanner is not automatically started. To start it, a
call to startBarcodeScanner()
must be done. To start the camera
immediately when the screen appears, call the start method in the
onResume()
of the screen. Calling start in
onCreate()
may result in undefined behaviors.
Camera must be stopped when the screen is exited. The best way to do that is
to call stopBarcodeScanner()
in the onPause()
method of
the screen.
The BarcodeScanner automatically stops when a bar code is detected. To
restart the scan, a call to startBarcodeScanner()
must be done.
[Expand]
Inherited Constants | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
![]() | |||||||||||
![]() | |||||||||||
![]() | |||||||||||
![]() | |||||||||||
![]() |
[Expand]
Inherited Fields | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
![]() |
Public Constructors | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
BarcodeScannerScreen() |
Public Methods | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
BarcodeScanner |
getBarcodeScanner()
Returns the BarcodeScanner of this screen.
| ||||||||||
BarcodeScannerView |
getBarcodeScannerView()
Returns the BarcodeScannerView that occupies all the screen.
| ||||||||||
void |
setBarcodeScanner(BarcodeScanner scanner)
Associates a
BarcodeScanner with this screen. | ||||||||||
void |
startBarcodeScanner()
Starts the camera to track bar codes.
| ||||||||||
void |
stopBarcodeScanner()
Stops the camera tracking.
|
[Expand]
Inherited Methods | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
![]() | |||||||||||
![]() |
Returns the BarcodeScanner of this screen.
By default, the screen has a BarcodeScanner configured to track QR Code.
Returns the BarcodeScannerView that occupies all the screen.
Associates a BarcodeScanner
with this screen.
This will indicate to the camera what kind of bar code to track and what to do when found.
scanner | a BarcodeScanner |
---|
Starts the camera to track bar codes. The scan should be started in the
onResume()
method.
Stops the camera tracking. The scan should be stopped in the
onPause()
method.