public class GiniVisionCoordinator
extends java.lang.Object
The GiniVisionCoordinator
facilitates the default behavior for the Gini Vision Library.
You can ignore this class when using the Screen API.
If you use the Component API we recommend relying on this class to provide the default behavior of the Gini Vision Library. This can be achieved by calling the required methods at pre-defined points in your code and by implementing the GiniVisionCoordinator.Listener
.
Modifier and Type | Class and Description |
---|---|
static interface |
GiniVisionCoordinator.Listener
Interface for the
GiniVisionCoordinator to dispatch events. |
Modifier and Type | Method and Description |
---|---|
static GiniVisionCoordinator |
createInstance(Context context)
Factory method to create and configure a
GiniVisionCoordinator instance. |
void |
onCameraStarted()
Call this method when the
CameraFragmentStandard or CameraFragmentCompat has started. |
GiniVisionCoordinator |
setListener(GiniVisionCoordinator.Listener listener)
Listener for handling events from the
GiniVisionCoordinator to provide the default behavior. |
GiniVisionCoordinator |
setShowOnboardingAtFirstRun(boolean showOnboardingAtFirstRun)
Enable or disable showing the Onboarding Screen once per installation the first time the Camera Screen is started.
|
static boolean |
shouldShowGiniVisionNoResultsScreen(Document document) |
public static boolean shouldShowGiniVisionNoResultsScreen(Document document)
public static GiniVisionCoordinator createInstance(Context context)
Factory method to create and configure a GiniVisionCoordinator
instance.
context
- a Context
used by the new instance to provide the default behaviorGiniVisionCoordinator
public GiniVisionCoordinator setListener(GiniVisionCoordinator.Listener listener)
Listener for handling events from the GiniVisionCoordinator
to provide the default behavior.
listener
- your implementation of the GiniVisionCoordinator.Listener
GiniVisionCoordinator
instance for a fluid apipublic GiniVisionCoordinator setShowOnboardingAtFirstRun(boolean showOnboardingAtFirstRun)
Enable or disable showing the Onboarding Screen once per installation the first time the Camera Screen is started.
Default value is true
.
showOnboardingAtFirstRun
- if true
the Onboarding Screen is shown the first time the Camera Screen is startedGiniVisionCoordinator
instance for a fluid apipublic void onCameraStarted()
Call this method when the CameraFragmentStandard
or CameraFragmentCompat
has started.
Can be called in your Acitivity's Activity#onStart()
method, which hosts the Camera Fragment.