Sensibill Entry Points (UI)
Receipt Capture
- To launch the capture activity, use the provided builder via
ReceiptCaptureActivityBuilder.getBuilder()
- Properties can be set in the builder to configure capture functionality
-
Parameters:
Name Description withExternalAccountTransactionId External transactionId which will be used to match the captured receipt to an external transaction withShowProcessing Boolean value to determine whether to show the Sensibill Processing Screen after capture is finished withModeSummaryOnboarding Boolean value to determine which capture onboarding to display on first capture launch for a user. True will show a page summarizing both capture methods, false will show a page with tips for the default capture mode. Default: true
NOTE: If this flag is set tofalse
, no onboarding page will be displayed in the new capture flowwithCaptureExpense Enum value to determine which expense type should be attached to the captured receipt. Defaults to null. Note: Expense type set here can be overridden by user through expense selection UI if withShowProcessing
is set to true.withLegacyCaptureFlow Boolean value to determine if the legacy capture flow, or new capture UI will be used. Default: false
withSecureWindow Boolean value to determine whether to allow screen capture on the Sensibill capture screens, Default: false
withCropEnabled Boolean value to determine if cropping functionality will be available in the capture flow. Default: true
withLongReceiptEnabled Boolean value to determine if long receipt capture functionality will be possible during the capture flow. Default: true
NOTE: This flag does not apply to the legacy capture flow.withInitialAutoCaptureState Boolean value to determine if the auto-capture feature will be ON when the capture flow begins. Default: true
NOTE: This flag does not apply to the legacy capture flow.
NOTE: This flag has no effect ifwithAutoCaptureEnabled
has been set tofalse
withAutoCaptureEnabled Boolean value to determine if the auto-capture feature will be enabled (usable) for the capture flow. Default: true
NOTE: This flag does not apply to the legacy capture flow.withBlurDetectionEnabled Boolean value to determine if the blur detection feature will be enabled. Default: true
NOTE: This flag does not apply to the legacy capture flow.withInitialFlashState FlashMode
enum value to determine what the initial flash mode will be when the capture flow begins. Default:FLASH_MODE_AUTO
NOTE: This flag does not apply to the legacy capture flow.withFlashToggleable Boolean value to determine if the flash mode will be toggleable by the user within the capture flow. Default: true
NOTE: This flag does not apply to the legacy capture flow.withFeedbackToastEnabled Boolean value to determine if the capture progress feedback toasts will display during the capture flow. Default: true
NOTE: This flag does not apply to the legacy capture flow.withImageGallerySelectionEnabled Boolean value to determine if the user will be able to select an image from their device gallery during the capture flow. Default: true
NOTE: This flag does not apply to the legacy capture flow. - Once the builder is constructed and desired properties are assigned, call .build(context) to generate an intent which can be used to start the capture activity
Example:
val captureIntent = ReceiptCaptureActivityBuilder.getBuilder()
.withExternalAccountTransactionId("my_transaction_id")
.withShowProcessing(true)
.build(this)
startActivity(captureIntent)
Launching Receipt Detail Activity
- To launch the Receipt Detail Activity, call ReceiptDetailActivity.newIntent() like the following:
val receiptID = "receipt-id"
startActivity(ReceiptDetailActivity.newIntent(context, receiptID))
- ReceiptDetailActivity.newIntent() takes 2 parameters.
-
Parameters:
Name Description context Activity Context receipt_id Sensibill receipt id to be displayed in the Receipt detail view
Launching Receipt Export List Activity
- To launch the receipt export activity, call SBExportListActivity.newIntent() like the following:
startActivity(SBExportListActivity.newIntent(MyActivity.this));
- SBExportListActivity.newIntent() takes 1 parameters.
-
Parameters:
Name Description context Activity Context
Launching Receipt Search Activity
- To launch the receipt search activity, call SBSearchReceiptListActivity.newIntent() like the following:
startActivity(SBSearchReceiptListActivity.newIntent(MyActivity.this));
- SBSearchReceiptListActivity.newIntent() takes 1 parameters.
-
Parameters:
Name Description context Activity Context
Using SDK Fragments
There are number of fragments that you can embed in your app’s activities for seamless integration between SDK and your app.
-
SBReceiptListFragment contains the list of receipts
-
SBReceiptFolderFragment contains the list of folders the user created.
-
SBNotificationFragment contains the notification items.
-
SBMainTabsFragment is a single fragment hosting all of the above.
All these fragments can also be embedded directly in the layout file (except SBMainTabsFragment).
- Example ReceiptListHostActivity shows example of how to host a Sensibill Fragment
<activity
android:name=".activities.DemoMainActivity"
android:screenOrientation="portrait"
android:theme="@style/Theme.Sensibill"
/>
IMPORTANT Make sure that Theme.Sensibill or a style extending Theme.Sensibill is applied to any activity hosting a Sensibill Fragment in the Android Manifest