Launch UI on Android
Once the SensibillSDK
is started, we can launch the Spend Manager UI.
The most basic way to launch the Spend Manager UI is to directly start WebUiActivity
. This will use the default configurations, navigating directly to the dashboard.
startActivity(Intent(this, WebUiActivity::class.java))
startActivity(new Intent(this, WebUiActivity.class));
Customizing the Default CaptureConfig
By default, every created instance of the capture flow will use the default CaptureConfig
object: CaptureConfig.defaultConfig
.
This default CaptureConfig
can be modified to globally change the default capture configuration. Once a new default config has been set, every subsequent instance of any capture use case will use that default, unless otherwise directly overridden.
This property lives in a Kotlin object
(singleton), so it should be customized either in your Application.onCreate
, or when you set up the SensibillSDK
. The customized values will then be used from that point onward.
// Use default settings, overriding the maximum captured image limit to be 5
CaptureConfig.defaultConfig = CaptureConfig.defaultConfig.copy(
maxImages = 5
)
// Use default settings, overriding the maximum captured image limit to be 5
final CaptureConfig intendedDefaultConfig = new CaptureConfig(
true,
true,
FlashMode.FLASH_MODE_AUTO,
true,
true,
true,
true,
5,
true,
true,
false,
false,
true,
true
);
CaptureConfig.Companion.setDefaultConfig(intendedDefaultConfig);