CameraFragmentStandard
Component API
{@code CameraFragmentStandard}
is the main entry point to the Gini Vision Library when using the Component API without the Android Support Library.
It shows a camera preview with tap-to-focus functionality, a trigger button and an optional flash on/off button. The camera preview also shows document corner guides to which the user should align the document.
If instantiated with createInstance then a button for importing documents is shown next to the trigger button. A hint popup is displayed the first time the Gini Vision Library is used to inform the user about document importing.
For importing documents {@code READ_EXTERNAL_STORAGE}
permission is required and if the permission is not granted the Gini Vision Library will prompt the user to grant the permission. See @ { code Customizing the Camera Screen } on how to override the message and button titles for the rationale and on permission denial alerts.
Include the {@code CameraFragmentStandard}
into your layout either directly with {@code }
in your Activity's layout or using the android.app.FragmentManager and one of the {@code createInstance()}
methods.
A CameraFragmentListener instance must be available until the {@code CameraFragmentStandard}
is attached to an activity. Failing to do so will throw an exception. The listener instance can be provided either implicitly by making the hosting Activity implement the CameraFragmentListener interface or explicitly by setting the listener using setListener .
Your Activity is automatically set as the listener in onAttach .
Customizing the Camera ScreenSee the CameraActivity for details.