Event Tracking Guide
Event types
You have the possibility to track various events which occur during the usage of Gini Bank SDK. Event types are partitioned into different domains according to the screens they appear on. Each domain has a number of event types. Some events might supply additional details on a map.
Domain | Event enum value and details map keys | Comment | Introduced in (updated in) |
---|---|---|---|
Onboarding |
| Onboarding started | 1.0.0 |
Onboarding |
| User completes onboarding | 1.0.0 |
Camera Screen |
| User closes the camera screen | 1.0.0 |
Camera Screen |
| User taps “Help” on the camera screen | 1.0.0 |
Camera Screen |
| User takes a picture | 1.0.0 |
Review Screen |
| User goes back from the review screen | 1.0.0 |
Review Screen |
| User advances from the review screen | 1.0.0 |
Review Screen |
| Upload error in the review screen | 1.0.0 |
Analysis Screen |
| User cancels the process during analysis | 1.0.0 |
Analysis Screen |
| The analysis ended with an error. | 1.0.0 |
Analysis Screen |
| The user decides to retry after an analysis error. | 1.0.0 |
Analysis Screen |
| The analysis ended with empty results. | 3.5.0 |
The supported events are listed for each screen in a dedicated enum. You can view these enums in our reference documentation.
Enable event tracking
To subscribe to the events, implement the EventTracker
interface and pass it to the CaptureConfiguration
:
GiniBank.setCaptureConfiguration(this,
CaptureConfiguration(
eventTracker = MyEventTracker(),
... // other configuration options
)
)
In MyEventTracker
, you can handle the events you are interested in.
class MyEventTracker implements EventTracker {
@Override
public void onCameraScreenEvent(final Event<CameraScreenEvent> event) {
switch (event.getType()) {
case TAKE_PICTURE:
// handle the picture taken event
break;
case HELP:
// handle the show help event
break;
case EXIT:
// handle the exit event
break;
}
}
@Override
public void onOnboardingScreenEvent(final Event<OnboardingScreenEvent> event) {
(...)
}
@Override
public void onAnalysisScreenEvent(final Event<AnalysisScreenEvent> event) {
(...)
}
@Override
public void onReviewScreenEvent(final Event<ReviewScreenEvent> event) {
(...)
}
}