Sensibill Entry Points (UI)
Receipt Capture
- To launch the capture activity, use the ReceiptCaptureActivityBuilder.getBuilder()
- 6 properties can be added to 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 withShowProcessing Boolean value to determine whether to show the Sensibill Processing Screen after capture is finished withExternalMetaData External metadata to be added to the captured receipt withAdjustmentFeature Boolean value to determine whether to have post capture adjustment screen withDefaultCaptureMode CaptureMode value to determine which capture mode should be default: CaptureMode.AUTO or CaptureMode.MANUAL 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
- 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)
.withExternalMetadata(null)
.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
Using SDK Fragment
There are couple 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