com.getsensibill.capturestandalone / CaptureStandaloneActivity
CaptureStandaloneActivity
class CaptureStandaloneActivity : AppCompatActivity, Listener, Listener, ReceiptFileCreator, Listener, Listener
Single Entry Point into the sensibill-capture-standalone
module, and Activity that directs the receipt capture flow.
This Activity is intended to be used for result. This Activity will direct the process of capturing one or more receipt images, and provide access to the resulting captured images via BareCapturedReceiptData.
Inputs
- A CaptureConfig object with the extra key EXTRA_CAPTURE_CONFIG. Attaching a CaptureConfig object will configure the behaviour of this activity.
Results Result Activity.RESULT_OK:
- Result Data: An Array of BareCapturedReceiptData objects with the extra key EXTRA_CAPTURED_RECEIPTS.
- Result Conditions: The user successfully captured CaptureConfig.maxPages receipt images, or one long receipt image (if CaptureConfig.enableLongCapture is enabled).
Result Activity.RESULT_CANCELED:
- Result Data: NONE.
- Result Conditions: The user exited the flow before capturing CaptureConfig.maxPages receipts. Any files pertaining to images that were captured before the flow was cancelled will be deleted.
NOTE: For security reasons, please ensure to call BareCapturedReceiptData.cleanup once the resulting images from this Activity have been processed. This ensures that the images do not remain on the device longer than necessary.
Constructors
Name | Summary |
---|---|
<init> | CaptureStandaloneActivity() Single Entry Point into the sensibill-capture-standalone module, and Activity that directs the receipt capture flow. |
Companion Object Properties
Name | Summary |
---|---|
EXTRA_CAPTURE_CONFIG | const val EXTRA_CAPTURE_CONFIG: String Intent Bundle Extra argument key. This is used for passing a config (CaptureConfig) to this activity to determine its configurable behaviour. |
EXTRA_CAPTURED_RECEIPTS | const val EXTRA_CAPTURED_RECEIPTS: String Activity result bundle argument key. When one or more receipt images are captured, the result (BareCapturedReceiptData) will be attached to the activity result extras. |