-
- All Implemented Interfaces:
-
android.content.ComponentCallbacks,android.content.ComponentCallbacks2,android.view.KeyEvent.Callback,android.view.LayoutInflater.Factory,android.view.LayoutInflater.Factory2,android.view.View.OnCreateContextMenuListener,android.view.Window.Callback,androidx.activity.OnBackPressedDispatcherOwner,androidx.activity.contextaware.ContextAware,androidx.activity.result.ActivityResultCaller,androidx.activity.result.ActivityResultRegistryOwner,androidx.appcompat.app.ActionBarDrawerToggle.DelegateProvider,androidx.appcompat.app.AppCompatCallback,androidx.core.app.ActivityCompat.OnRequestPermissionsResultCallback,androidx.core.app.ActivityCompat.RequestPermissionsRequestCodeValidator,androidx.core.app.OnMultiWindowModeChangedProvider,androidx.core.app.OnNewIntentProvider,androidx.core.app.OnPictureInPictureModeChangedProvider,androidx.core.app.TaskStackBuilder.SupportParentable,androidx.core.content.OnConfigurationChangedProvider,androidx.core.content.OnTrimMemoryProvider,androidx.core.view.KeyEventDispatcher.Component,androidx.core.view.MenuHost,androidx.lifecycle.HasDefaultViewModelProviderFactory,androidx.lifecycle.LifecycleOwner,androidx.lifecycle.ViewModelStoreOwner,androidx.savedstate.SavedStateRegistryOwner,net.gini.android.capture.analysis.AnalysisFragmentInterface,net.gini.android.capture.analysis.AnalysisFragmentListener
public class AnalysisActivity extends AppCompatActivity implements AnalysisFragmentListener, AnalysisFragmentInterface
When you use the Screen API, the
AnalysisActivitydisplays the captured or imported document and an activity indicator while the document is being analyzed by the Gini API.Note: The title from the ActionBar was removed. Use the activity indicator message instead by overriding the string resource named
gc_analysis_activity_indicator_message. The message is displayed for images only.For PDF documents the first page is shown (only on Android 5.0 Lollipop and newer) along with the PDF's filename and number of pages above the page. On Android KitKat and older only the PDF's filename is shown with the preview area left empty.
The preferred way of adding network calls to the Gini Capture SDK is by creating a GiniCapture instance with a and a GiniCaptureNetworkApi implementation.
The
AnalysisActivityis started by the CameraActivity after the user has reviewed the document and either made no changes to the document and it hasn't been analyzed before tapping the Next button, or the user has modified the document, e.g. by rotating it.For imported documents that cannot be reviewed, like PDFs, the CameraActivity starts the
AnalysisActivitydirectly.Customizing the look of the Analysis Screen is done via overriding of app resources.
The following items are customizable:
- Activity indicator color: via the color resource named
gc_analysis_activity_indicator - Activity indicator message: via the string resource named
gc_analysis_activity_indicator_message - Activity indicator message text style: via overriding the style named
GiniCaptureTheme.Analysis.AnalysingMessage.TextStyle - Activity indicator message font: via overriding the style named
GiniCaptureTheme.Analysis.AnalysingMessage.TextStyleand setting an item namedgcCustomFontwith the path to the font file in yourassetsfolder - PDF info panel background: via the color resource named
gc_analysis_pdf_info_background - PDF filename text style: via overriding the style named
GiniCaptureTheme.Analysis.PdfFilename.TextStyleand setting an item namedandroid:textStyletonormal,boldoritalic - PDF filename text size: via overriding the style named
GiniCaptureTheme.Analysis.PdfFilename.TextStyleand setting an item namedautoSizeMaxTextSizeandautoSizeMinTextSizeto the desired maximum and minimumspsizes - PDF filename text color: via the color resource named
gc_analysis_pdf_info_text - PDF filename font: via overriding the style named
GiniCaptureTheme.Analysis.PdfFilename.TextStyleand setting an item namedgcCustomFontwith the path to the font file in yourassetsfolder - PDF page count text style: via overriding the style named
GiniCaptureTheme.Analysis.PdfPageCount.TextStyleand setting an item namedandroid:textStyletonormal,boldoritalic - PDF page count text size: via overriding the style named
GiniCaptureTheme.Analysis.PdfPageCount.TextStyleand setting an item namedandroid:textSizeto the desiredspsize - PDF page count text color: via the color resource named
gc_analysis_pdf_info_text - PDF page count font: via overriding the style named
GiniCaptureTheme.Analysis.PdfPageCount.TextStyleand setting an item namedgcCustomFontwith the path to the font file in yourassetsfolder - Background color: via the color resource named
gc_background. Note: this color resource is global to all Activities (CameraActivity, OnboardingActivity, ReviewActivity, ) - Error message text color: via the color resource named
gc_snackbar_error_text - Error message font: via overriding the style named
GiniCaptureTheme.Snackbar.Error.TextStyleand setting an item namedgcCustomFontwith the path to the font file in yourassetsfolder - Error message text style: via overriding the style named
GiniCaptureTheme.Snackbar.Error.TextStyleand setting an item namedandroid:textStyletonormal,boldoritalic - Error message text size: via overriding the style named
GiniCaptureTheme.Snackbar.Error.TextStyleand setting an item namedandroid:textSizeto the desiredspsize - Error message button text color: via the color resource named
gc_snackbar_error_button_titleandgc_snackbar_error_button_title_pressed - Error message button font: via overriding the style named
GiniCaptureTheme.Snackbar.Error.Button.TextStyleand setting an item namedgcCustomFontwith the path to the font file in yourassetsfolder - Error message button text style: via overriding the style named
GiniCaptureTheme.Snackbar.Error.Button.TextStyleand setting an item namedandroid:textStyletonormal,boldoritalic - Error message button text size: via overriding the style named
GiniCaptureTheme.Snackbar.Error.Button.TextStyleand setting an item namedandroid:textSizeto the desiredspsize - Error message background color: via the color resource named
gc_snackbar_error_background - Document analysis error message retry button text: via the string resource named
gc_document_analysis_error_retry
Important: All overriden styles must have their respective
Root.prefixed style as their parent. Ex.: the parent ofGiniCaptureTheme.Snackbar.Error.TextStylemust beRoot.GiniCaptureTheme.Snackbar.Error.TextStyle.Customizing the Action Bar is also done via overriding of app resources and each one - except the title string resource - is global to all Activities (CameraActivity, OnboardingActivity, ReviewActivity, net.gini.android.capture.review.multipage.MultiPageReviewActivity, AnalysisActivity).
The following items are customizable:
- Background color: via the color resource named
gc_action_bar(highly recommended for Android 5+: customize the status bar color viagc_status_bar) - Back button (only for ReviewActivity and AnalysisActivity): via images for mdpi, hdpi, xhdpi, xxhdpi, xxxhdpi named
gc_action_bar_back
-
-
Field Summary
Fields Modifier and Type Field Description public final static StringEXTRA_IN_DOCUMENTpublic final static StringEXTRA_IN_DOCUMENT_ANALYSIS_ERROR_MESSAGEpublic final static StringEXTRA_OUT_ERRORpublic final static intRESULT_ERRORpublic final static intRESULT_NO_EXTRACTIONSpublic final static intDEFAULT_KEYS_DIALERpublic final static intDEFAULT_KEYS_DISABLEpublic final static intDEFAULT_KEYS_SEARCH_GLOBALpublic final static intDEFAULT_KEYS_SEARCH_LOCALpublic final static intDEFAULT_KEYS_SHORTCUTpublic final static intRESULT_CANCELEDpublic final static intRESULT_FIRST_USERpublic final static intRESULT_OKpublic final static intTRIM_MEMORY_BACKGROUNDpublic final static intTRIM_MEMORY_COMPLETEpublic final static intTRIM_MEMORY_MODERATEpublic final static intTRIM_MEMORY_RUNNING_CRITICALpublic final static intTRIM_MEMORY_RUNNING_LOWpublic final static intTRIM_MEMORY_RUNNING_MODERATEpublic final static intTRIM_MEMORY_UI_HIDDENpublic final static StringACCESSIBILITY_SERVICEpublic final static StringACCOUNT_SERVICEpublic final static StringACTIVITY_SERVICEpublic final static StringALARM_SERVICEpublic final static StringAPPWIDGET_SERVICEpublic final static StringAPP_OPS_SERVICEpublic final static StringAPP_SEARCH_SERVICEpublic final static StringAUDIO_SERVICEpublic final static StringBATTERY_SERVICEpublic final static intBIND_ABOVE_CLIENTpublic final static intBIND_ADJUST_WITH_ACTIVITYpublic final static intBIND_ALLOW_OOM_MANAGEMENTpublic final static intBIND_AUTO_CREATEpublic final static intBIND_DEBUG_UNBINDpublic final static intBIND_EXTERNAL_SERVICEpublic final static intBIND_IMPORTANTpublic final static intBIND_INCLUDE_CAPABILITIESpublic final static intBIND_NOT_FOREGROUNDpublic final static intBIND_NOT_PERCEPTIBLEpublic final static intBIND_WAIVE_PRIORITYpublic final static StringBIOMETRIC_SERVICEpublic final static StringBLOB_STORE_SERVICEpublic final static StringBLUETOOTH_SERVICEpublic final static StringBUGREPORT_SERVICEpublic final static StringCAMERA_SERVICEpublic final static StringCAPTIONING_SERVICEpublic final static StringCARRIER_CONFIG_SERVICEpublic final static StringCLIPBOARD_SERVICEpublic final static StringCOMPANION_DEVICE_SERVICEpublic final static StringCONNECTIVITY_DIAGNOSTICS_SERVICEpublic final static StringCONNECTIVITY_SERVICEpublic final static StringCONSUMER_IR_SERVICEpublic final static intCONTEXT_IGNORE_SECURITYpublic final static intCONTEXT_INCLUDE_CODEpublic final static intCONTEXT_RESTRICTEDpublic final static StringCROSS_PROFILE_APPS_SERVICEpublic final static StringDEVICE_POLICY_SERVICEpublic final static StringDISPLAY_HASH_SERVICEpublic final static StringDISPLAY_SERVICEpublic final static StringDOMAIN_VERIFICATION_SERVICEpublic final static StringDOWNLOAD_SERVICEpublic final static StringDROPBOX_SERVICEpublic final static StringEUICC_SERVICEpublic final static StringFILE_INTEGRITY_SERVICEpublic final static StringFINGERPRINT_SERVICEpublic final static StringGAME_SERVICEpublic final static StringHARDWARE_PROPERTIES_SERVICEpublic final static StringINPUT_METHOD_SERVICEpublic final static StringINPUT_SERVICEpublic final static StringIPSEC_SERVICEpublic final static StringJOB_SCHEDULER_SERVICEpublic final static StringKEYGUARD_SERVICEpublic final static StringLAUNCHER_APPS_SERVICEpublic final static StringLAYOUT_INFLATER_SERVICEpublic final static StringLOCALE_SERVICEpublic final static StringLOCATION_SERVICEpublic final static StringMEDIA_COMMUNICATION_SERVICEpublic final static StringMEDIA_METRICS_SERVICEpublic final static StringMEDIA_PROJECTION_SERVICEpublic final static StringMEDIA_ROUTER_SERVICEpublic final static StringMEDIA_SESSION_SERVICEpublic final static StringMIDI_SERVICEpublic final static intMODE_APPENDpublic final static intMODE_ENABLE_WRITE_AHEAD_LOGGINGpublic final static intMODE_MULTI_PROCESSpublic final static intMODE_NO_LOCALIZED_COLLATORSpublic final static intMODE_PRIVATEpublic final static intMODE_WORLD_READABLEpublic final static intMODE_WORLD_WRITEABLEpublic final static StringNETWORK_STATS_SERVICEpublic final static StringNFC_SERVICEpublic final static StringNOTIFICATION_SERVICEpublic final static StringNSD_SERVICEpublic final static StringPEOPLE_SERVICEpublic final static StringPERFORMANCE_HINT_SERVICEpublic final static StringPOWER_SERVICEpublic final static StringPRINT_SERVICEpublic final static intRECEIVER_EXPORTEDpublic final static intRECEIVER_NOT_EXPORTEDpublic final static intRECEIVER_VISIBLE_TO_INSTANT_APPSpublic final static StringRESTRICTIONS_SERVICEpublic final static StringROLE_SERVICEpublic final static StringSEARCH_SERVICEpublic final static StringSENSOR_SERVICEpublic final static StringSHORTCUT_SERVICEpublic final static StringSTATUS_BAR_SERVICEpublic final static StringSTORAGE_SERVICEpublic final static StringSTORAGE_STATS_SERVICEpublic final static StringSYSTEM_HEALTH_SERVICEpublic final static StringTELECOM_SERVICEpublic final static StringTELEPHONY_IMS_SERVICEpublic final static StringTELEPHONY_SERVICEpublic final static StringTELEPHONY_SUBSCRIPTION_SERVICEpublic final static StringTEXT_CLASSIFICATION_SERVICEpublic final static StringTEXT_SERVICES_MANAGER_SERVICEpublic final static StringTV_INPUT_SERVICEpublic final static StringTV_INTERACTIVE_APP_SERVICEpublic final static StringUI_MODE_SERVICEpublic final static StringUSAGE_STATS_SERVICEpublic final static StringUSB_SERVICEpublic final static StringUSER_SERVICEpublic final static StringVIBRATOR_MANAGER_SERVICEpublic final static StringVIBRATOR_SERVICEpublic final static StringVPN_MANAGEMENT_SERVICEpublic final static StringWALLPAPER_SERVICEpublic final static StringWIFI_AWARE_SERVICEpublic final static StringWIFI_P2P_SERVICEpublic final static StringWIFI_RTT_RANGING_SERVICEpublic final static StringWIFI_SERVICEpublic final static StringWINDOW_SERVICE
-
Method Summary
Modifier and Type Method Description voidhideError()Call this method to hide the error shown before with showError or showError. voidonError(@NonNull() GiniCaptureError error)Called when an error occurred. booleanonOptionsItemSelected(MenuItem item)voidshowError(@NonNull() String message, @NonNull() String buttonTitle, @NonNull() View.OnClickListener onClickListener)Call this method when you need to show an error message with an invokable action to the user in the Analysis Screen. voidshowError(@NonNull() String message, int duration)Call this method when you need to show an error message to the user in the Analysis Screen. voidsetListener(@NonNull() AnalysisFragmentListener listener)Set a listener for analysis events. voidonExtractionsAvailable(@NonNull() Map<String, GiniCaptureSpecificExtraction> extractions, @NonNull() Map<String, GiniCaptureCompoundExtraction> compoundExtractions, @NonNull() List<GiniCaptureReturnReason> returnReasons)Called when the document has been analyzed and extractions are available. voidonProceedToNoExtractionsScreen(@NonNull() Document document)Called when the document has been analyzed and no extractions were received. voidonDefaultPDFAppAlertDialogCancelled()Called when the default PDF app alert dialog was cancelled. -
Methods inherited from class androidx.appcompat.app.AppCompatActivity
addContentView, closeOptionsMenu, dispatchKeyEvent, findViewById, getDelegate, getDrawerToggleDelegate, getMenuInflater, getResources, getSupportActionBar, getSupportParentActivityIntent, invalidateOptionsMenu, onConfigurationChanged, onContentChanged, onCreateSupportNavigateUpTaskStack, onKeyDown, onMenuItemSelected, onMenuOpened, onPanelClosed, onPrepareSupportNavigateUpTaskStack, onSupportActionModeFinished, onSupportActionModeStarted, onSupportContentChanged, onSupportNavigateUp, onWindowStartingSupportActionMode, openOptionsMenu, setContentView, setSupportActionBar, setSupportProgress, setSupportProgressBarIndeterminate, setSupportProgressBarIndeterminateVisibility, setSupportProgressBarVisibility, setTheme, startSupportActionMode, supportInvalidateOptionsMenu, supportNavigateUpTo, supportRequestWindowFeature, supportShouldUpRecreateTask -
Methods inherited from class androidx.fragment.app.FragmentActivity
dump, getSupportFragmentManager, getSupportLoaderManager, onAttachFragment, onCreateView, onRequestPermissionsResult, onStateNotSaved, setEnterSharedElementCallback, setExitSharedElementCallback, startActivityFromFragment, startIntentSenderFromFragment, supportFinishAfterTransition, supportPostponeEnterTransition, supportStartPostponedEnterTransition, validateRequestPermissionsRequestCode -
Methods inherited from class androidx.activity.ComponentActivity
addMenuProvider, addOnConfigurationChangedListener, addOnContextAvailableListener, addOnMultiWindowModeChangedListener, addOnNewIntentListener, addOnPictureInPictureModeChangedListener, addOnTrimMemoryListener, getActivityResultRegistry, getDefaultViewModelCreationExtras, getDefaultViewModelProviderFactory, getLastCustomNonConfigurationInstance, getLifecycle, getOnBackPressedDispatcher, getSavedStateRegistry, getViewModelStore, invalidateMenu, onBackPressed, onCreatePanelMenu, onMultiWindowModeChanged, onPictureInPictureModeChanged, onPreparePanel, onRetainCustomNonConfigurationInstance, onRetainNonConfigurationInstance, onTrimMemory, peekAvailableContext, registerForActivityResult, removeMenuProvider, removeOnConfigurationChangedListener, removeOnContextAvailableListener, removeOnMultiWindowModeChangedListener, removeOnNewIntentListener, removeOnPictureInPictureModeChangedListener, removeOnTrimMemoryListener, reportFullyDrawn, startActivityForResult, startIntentSenderForResult -
Methods inherited from class androidx.core.app.ComponentActivity
dispatchKeyShortcutEvent, getExtraData, putExtraData, superDispatchKeyEvent -
Methods inherited from class android.app.Activity
closeContextMenu, createPendingResult, dismissDialog, dismissKeyboardShortcutsHelper, dispatchGenericMotionEvent, dispatchPopulateAccessibilityEvent, dispatchTouchEvent, dispatchTrackballEvent, enterPictureInPictureMode, enterPictureInPictureMode, finish, finishActivity, finishActivityFromChild, finishAffinity, finishAfterTransition, finishAndRemoveTask, finishFromChild, getActionBar, getApplication, getCallingActivity, getCallingPackage, getChangingConfigurations, getComponentName, getContentScene, getContentTransitionManager, getCurrentFocus, getFragmentManager, getIntent, getLastNonConfigurationInstance, getLayoutInflater, getLoaderManager, getLocalClassName, getMaxNumPictureInPictureActions, getMediaController, getOnBackInvokedDispatcher, getParent, getParentActivityIntent, getPreferences, getReferrer, getRequestedOrientation, getSearchEvent, getSplashScreen, getSystemService, getTaskId, getTitle, getTitleColor, getVoiceInteractor, getVolumeControlStream, getWindow, getWindowManager, hasWindowFocus, isActivityTransitionRunning, isChangingConfigurations, isChild, isDestroyed, isFinishing, isImmersive, isInMultiWindowMode, isInPictureInPictureMode, isLaunchedFromBubble, isLocalVoiceInteractionSupported, isTaskRoot, isVoiceInteraction, isVoiceInteractionRoot, managedQuery, moveTaskToBack, navigateUpTo, navigateUpToFromChild, onActionModeFinished, onActionModeStarted, onActivityReenter, onAttachedToWindow, onContextItemSelected, onContextMenuClosed, onCreateContextMenu, onCreateDescription, onCreateNavigateUpTaskStack, onCreateOptionsMenu, onCreatePanelView, onCreateThumbnail, onDetachedFromWindow, onEnterAnimationComplete, onGenericMotionEvent, onGetDirectActions, onKeyLongPress, onKeyMultiple, onKeyShortcut, onKeyUp, onLocalVoiceInteractionStarted, onLocalVoiceInteractionStopped, onLowMemory, onNavigateUp, onNavigateUpFromChild, onOptionsMenuClosed, onPerformDirectAction, onPictureInPictureRequested, onPictureInPictureUiStateChanged, onPrepareNavigateUpTaskStack, onPrepareOptionsMenu, onProvideAssistContent, onProvideAssistData, onProvideKeyboardShortcuts, onProvideReferrer, onSearchRequested, onTopResumedActivityChanged, onTouchEvent, onTrackballEvent, onUserInteraction, onVisibleBehindCanceled, onWindowAttributesChanged, onWindowFocusChanged, onWindowStartingActionMode, openContextMenu, overridePendingTransition, postponeEnterTransition, recreate, registerActivityLifecycleCallbacks, registerComponentCallbacks, registerForContextMenu, releaseInstance, removeDialog, requestDragAndDropPermissions, requestPermissions, requestShowKeyboardShortcuts, requestVisibleBehind, requestWindowFeature, requireViewById, runOnUiThread, setActionBar, setContentTransitionManager, setDefaultKeyMode, setFeatureDrawable, setFeatureDrawableAlpha, setFeatureDrawableResource, setFeatureDrawableUri, setFinishOnTouchOutside, setImmersive, setInheritShowWhenLocked, setIntent, setLocusContext, setMediaController, setPictureInPictureParams, setProgress, setProgressBarIndeterminate, setProgressBarIndeterminateVisibility, setProgressBarVisibility, setRecentsScreenshotEnabled, setRequestedOrientation, setResult, setSecondaryProgress, setShouldDockBigOverlays, setShowWhenLocked, setTaskDescription, setTitle, setTitleColor, setTranslucent, setTurnScreenOn, setVisible, setVolumeControlStream, setVrModeEnabled, shouldDockBigOverlays, shouldShowRequestPermissionRationale, shouldUpRecreateTask, showAssist, showDialog, showDialog, showLockTaskEscapeMessage, startActionMode, startActivities, startActivity, startActivityFromChild, startActivityIfNeeded, startIntentSender, startIntentSenderFromChild, startLocalVoiceInteraction, startLockTask, startManagingCursor, startNextMatchingActivity, startPostponedEnterTransition, startSearch, stopLocalVoiceInteraction, stopLockTask, stopManagingCursor, takeKeyEvents, triggerSearch, unregisterActivityLifecycleCallbacks, unregisterComponentCallbacks, unregisterForContextMenu -
Methods inherited from class android.view.ContextThemeWrapper
applyOverrideConfiguration, getAssets, getTheme -
Methods inherited from class android.view.Window.Callback
onPointerCaptureChanged -
Methods inherited from class android.content.ContextWrapper
bindIsolatedService, bindService, bindServiceAsUser, checkCallingOrSelfPermission, checkCallingOrSelfUriPermission, checkCallingOrSelfUriPermissions, checkCallingPermission, checkCallingUriPermission, checkCallingUriPermissions, checkPermission, checkSelfPermission, checkUriPermission, checkUriPermissions, clearWallpaper, createAttributionContext, createConfigurationContext, createContext, createContextForSplit, createDeviceProtectedStorageContext, createDisplayContext, createPackageContext, createWindowContext, databaseList, deleteDatabase, deleteFile, deleteSharedPreferences, enforceCallingOrSelfPermission, enforceCallingOrSelfUriPermission, enforceCallingPermission, enforceCallingUriPermission, enforcePermission, enforceUriPermission, fileList, getApplicationContext, getApplicationInfo, getAttributionSource, getAttributionTag, getBaseContext, getCacheDir, getClassLoader, getCodeCacheDir, getContentResolver, getDataDir, getDatabasePath, getDir, getDisplay, getExternalCacheDir, getExternalCacheDirs, getExternalFilesDir, getExternalFilesDirs, getExternalMediaDirs, getFileStreamPath, getFilesDir, getMainExecutor, getMainLooper, getNoBackupFilesDir, getObbDir, getObbDirs, getOpPackageName, getPackageCodePath, getPackageManager, getPackageName, getPackageResourcePath, getParams, getSharedPreferences, getSystemServiceName, getWallpaper, getWallpaperDesiredMinimumHeight, getWallpaperDesiredMinimumWidth, grantUriPermission, isDeviceProtectedStorage, isRestricted, isUiContext, moveDatabaseFrom, moveSharedPreferencesFrom, openFileInput, openFileOutput, openOrCreateDatabase, peekWallpaper, registerReceiver, removeStickyBroadcast, removeStickyBroadcastAsUser, revokeSelfPermissionsOnKill, revokeUriPermission, sendBroadcast, sendBroadcastAsUser, sendOrderedBroadcast, sendOrderedBroadcastAsUser, sendStickyBroadcast, sendStickyBroadcastAsUser, sendStickyOrderedBroadcast, sendStickyOrderedBroadcastAsUser, setWallpaper, startForegroundService, startInstrumentation, startService, stopService, unbindService, unregisterReceiver, updateServiceGroup -
Methods inherited from class android.content.Context
getColor, getColorStateList, getDrawable, getString, getSystemService, getText, obtainStyledAttributes, revokeSelfPermissionOnKill, sendBroadcastWithMultiplePermissions -
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
-
Method Detail
-
hideError
void hideError()
-
onError
void onError(@NonNull() GiniCaptureError error)
Called when an error occurred.
- Parameters:
error- details about what went wrong
-
onOptionsItemSelected
boolean onOptionsItemSelected(MenuItem item)
-
showError
void showError(@NonNull() String message, @NonNull() String buttonTitle, @NonNull() View.OnClickListener onClickListener)
Call this method when you need to show an error message with an invokable action to the user in the Analysis Screen.
- Parameters:
message- a short error messagebuttonTitle- if not null and not empty, shows a button with the given titleonClickListener- listener for the button
-
showError
void showError(@NonNull() String message, int duration)
Call this method when you need to show an error message to the user in the Analysis Screen.
- Parameters:
message- a short error messageduration- how long should the error message be shown in ms
-
setListener
void setListener(@NonNull() AnalysisFragmentListener listener)
Set a listener for analysis events.
By default the hosting Activity is expected to implement the AnalysisFragmentListener. In case that is not feasible you may set the listener using this method.
Note: the listener is expected to be available until the fragment is attached to an activity. Make sure to set the listener before that.
- Parameters:
listener- AnalysisFragmentListener instance
-
onExtractionsAvailable
void onExtractionsAvailable(@NonNull() Map<String, GiniCaptureSpecificExtraction> extractions, @NonNull() Map<String, GiniCaptureCompoundExtraction> compoundExtractions, @NonNull() List<GiniCaptureReturnReason> returnReasons)
Called when the document has been analyzed and extractions are available.
- Parameters:
extractions- a map of the extractions with the extraction labels as keyscompoundExtractions- a map of the compound extractions with the extraction labels as keys
-
onProceedToNoExtractionsScreen
void onProceedToNoExtractionsScreen(@NonNull() Document document)
Called when the document has been analyzed and no extractions were received.
You should show the NoResultsFragmentCompat.
- Parameters:
document- contains the reviewed document
-
onDefaultPDFAppAlertDialogCancelled
void onDefaultPDFAppAlertDialogCancelled()
Called when the default PDF app alert dialog was cancelled. You should close the AnalysisFragment because the user decided not to continue with analysis.
This alert dialog is shown for PDFs imported from another app when your app was set as default for opening PDFs.
-
-
-
-