Package com.geniusscansdk.camera
Class ScanFragmentLegacy
- java.lang.Object
-
- androidx.fragment.app.Fragment
-
- com.geniusscansdk.camera.ScanFragment
-
- com.geniusscansdk.camera.ScanFragmentLegacy
-
- All Implemented Interfaces:
android.content.ComponentCallbacks,android.view.View.OnCreateContextMenuListener,androidx.activity.result.ActivityResultCaller,androidx.lifecycle.HasDefaultViewModelProviderFactory,androidx.lifecycle.LifecycleOwner,androidx.lifecycle.ViewModelStoreOwner,androidx.savedstate.SavedStateRegistryOwner
@Deprecated public class ScanFragmentLegacy extends ScanFragment
Deprecated.UseScanFragmentXImplementation ofScanFragmentusing the legacy Camera API
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from class com.geniusscansdk.camera.ScanFragment
ScanFragment.Callback, ScanFragment.CameraCallbackProvider
-
-
Constructor Summary
Constructors Constructor Description ScanFragmentLegacy()Deprecated.
-
Method Summary
All Methods Instance Methods Concrete Methods Deprecated Methods Modifier and Type Method Description java.util.List<FlashMode>getAvailableFlashModes()Deprecated.voidinitializeCamera()Deprecated.Setup the camera and start the preview.booleanisRealTimeBorderDetectionEnabled()Deprecated.voidonActivityCreated(android.os.Bundle savedInstanceState)Deprecated.voidonAttach(android.content.Context context)Deprecated.android.view.ViewonCreateView(android.view.LayoutInflater inflater, android.view.ViewGroup container, android.os.Bundle savedInstanceState)Deprecated.voidonDestroy()Deprecated.voidonPause()Deprecated.voidresetBorderDetection()Deprecated.voidsetAutoTriggerAnimationEnabled(boolean enabled)Deprecated.voidsetBorderDetectorListener(BorderDetector.BorderDetectorListener listener)Deprecated.voidsetFlashMode(FlashMode flashMode)Deprecated.Set the camera flash mode.voidsetFocusIndicator(FocusIndicator focusIndicator)Deprecated.voidsetJpegQuality(int jpegQuality)Deprecated.Set the JPEG quality of camera output pictures.voidsetOverlayColor(int color)Deprecated.voidsetOverlayColorResource(int colorResId)Deprecated.voidsetPreviewAspectFill(boolean isAspectFill)Deprecated.voidsetPreviewEnabled(boolean enabled)Deprecated.voidsetRealTimeDetectionEnabled(boolean enabled)Deprecated.booleantakePicture(ImageCaptureCallback callback)Deprecated.booleantakePicture(ImageCaptureCallback callback, boolean focusBeforeTrigger)Deprecated.Stop the real-time border detection and capture the imageFlashModetoggleFlashMode()Deprecated.Toggle the flash mode to the next available flash mode.-
Methods inherited from class com.geniusscansdk.camera.ScanFragment
createBestForDevice
-
Methods inherited from class androidx.fragment.app.Fragment
dump, equals, getActivity, getAllowEnterTransitionOverlap, getAllowReturnTransitionOverlap, getArguments, getChildFragmentManager, getContext, getDefaultViewModelProviderFactory, getEnterTransition, getExitTransition, getFragmentManager, getHost, getId, getLayoutInflater, getLayoutInflater, getLifecycle, getLoaderManager, getParentFragment, getParentFragmentManager, getReenterTransition, getResources, getRetainInstance, getReturnTransition, getSavedStateRegistry, getSharedElementEnterTransition, getSharedElementReturnTransition, getString, getString, getTag, getTargetFragment, getTargetRequestCode, getText, getUserVisibleHint, getView, getViewLifecycleOwner, getViewLifecycleOwnerLiveData, getViewModelStore, hashCode, hasOptionsMenu, instantiate, instantiate, isAdded, isDetached, isHidden, isInLayout, isMenuVisible, isRemoving, isResumed, isStateSaved, isVisible, onActivityResult, onAttach, onAttachFragment, onConfigurationChanged, onContextItemSelected, onCreate, onCreateAnimation, onCreateAnimator, onCreateContextMenu, onCreateOptionsMenu, onDestroyOptionsMenu, onDestroyView, onDetach, onGetLayoutInflater, onHiddenChanged, onInflate, onInflate, onLowMemory, onMultiWindowModeChanged, onOptionsItemSelected, onOptionsMenuClosed, onPictureInPictureModeChanged, onPrepareOptionsMenu, onPrimaryNavigationFragmentChanged, onRequestPermissionsResult, onResume, onSaveInstanceState, onStart, onStop, onViewCreated, onViewStateRestored, postponeEnterTransition, postponeEnterTransition, registerForActivityResult, registerForActivityResult, registerForContextMenu, requestPermissions, requireActivity, requireArguments, requireContext, requireFragmentManager, requireHost, requireParentFragment, requireView, setAllowEnterTransitionOverlap, setAllowReturnTransitionOverlap, setArguments, setEnterSharedElementCallback, setEnterTransition, setExitSharedElementCallback, setExitTransition, setHasOptionsMenu, setInitialSavedState, setMenuVisibility, setReenterTransition, setRetainInstance, setReturnTransition, setSharedElementEnterTransition, setSharedElementReturnTransition, setTargetFragment, setUserVisibleHint, shouldShowRequestPermissionRationale, startActivity, startActivity, startActivityForResult, startActivityForResult, startIntentSenderForResult, startPostponedEnterTransition, toString, unregisterForContextMenu
-
-
-
-
Method Detail
-
onAttach
public void onAttach(@NonNull android.content.Context context)Deprecated.- Overrides:
onAttachin classandroidx.fragment.app.Fragment
-
onCreateView
public android.view.View onCreateView(@NonNull android.view.LayoutInflater inflater, android.view.ViewGroup container, android.os.Bundle savedInstanceState)Deprecated.- Overrides:
onCreateViewin classandroidx.fragment.app.Fragment
-
onActivityCreated
public void onActivityCreated(android.os.Bundle savedInstanceState)
Deprecated.- Overrides:
onActivityCreatedin classandroidx.fragment.app.Fragment
-
onPause
public void onPause()
Deprecated.- Overrides:
onPausein classandroidx.fragment.app.Fragment
-
onDestroy
public void onDestroy()
Deprecated.- Overrides:
onDestroyin classandroidx.fragment.app.Fragment
-
initializeCamera
public void initializeCamera()
Deprecated.Description copied from class:ScanFragmentSetup the camera and start the preview. This needs to be called by the parent activity in Activity#onResume().- Specified by:
initializeCamerain classScanFragment
-
setPreviewEnabled
public void setPreviewEnabled(boolean enabled)
Deprecated.- Specified by:
setPreviewEnabledin classScanFragment
-
setPreviewAspectFill
public void setPreviewAspectFill(boolean isAspectFill)
Deprecated.- Specified by:
setPreviewAspectFillin classScanFragment- See Also:
PreviewSurfaceView.setAspectFill(boolean)
-
takePicture
public boolean takePicture(ImageCaptureCallback callback)
Deprecated.- Specified by:
takePicturein classScanFragment- Parameters:
callback- used to notify capture success or failure- See Also:
ScanFragment.takePicture(ImageCaptureCallback, boolean)
-
takePicture
public boolean takePicture(ImageCaptureCallback callback, boolean focusBeforeTrigger)
Deprecated.Description copied from class:ScanFragmentStop the real-time border detection and capture the image- Specified by:
takePicturein classScanFragment- Parameters:
callback- used to notify capture success or failure-
focusBeforeTrigger- if true, an auto-focus will run before the picture is captured. This can be especially useful on devices where the continuous auto-focus is not great to improve the chances of the picture being sharp, but it slows down the capture. - Returns:
- false if a picture is already being taken, true otherwise
-
setRealTimeDetectionEnabled
public void setRealTimeDetectionEnabled(boolean enabled)
Deprecated.- Specified by:
setRealTimeDetectionEnabledin classScanFragment
-
setOverlayColor
public void setOverlayColor(@ColorInt int color)Deprecated.- Specified by:
setOverlayColorin classScanFragment
-
setOverlayColorResource
public void setOverlayColorResource(@ColorRes int colorResId)Deprecated.- Specified by:
setOverlayColorResourcein classScanFragment
-
getAvailableFlashModes
@NonNull public java.util.List<FlashMode> getAvailableFlashModes()
Deprecated.- Specified by:
getAvailableFlashModesin classScanFragment- Returns:
- supported flash modes or an empty list if the camera is not yet available
-
setFlashMode
public void setFlashMode(@NonNull FlashMode flashMode)Deprecated.Description copied from class:ScanFragmentSet the camera flash mode. It's best to callScanFragment.getAvailableFlashModes()to make sure that the camera supports this flash mode.- Specified by:
setFlashModein classScanFragment- Parameters:
flashMode- the flash mode to use
-
toggleFlashMode
@Nullable public FlashMode toggleFlashMode()
Deprecated.Description copied from class:ScanFragmentToggle the flash mode to the next available flash mode. It's best to callScanFragment.getAvailableFlashModes()to make sure that the camera supports this flash mode.- Specified by:
toggleFlashModein classScanFragment- Returns:
- the next available flash mode or null if the camera doesn't support flash.
-
setJpegQuality
public void setJpegQuality(int jpegQuality)
Deprecated.Description copied from class:ScanFragmentSet the JPEG quality of camera output pictures. This method can only be called when the camera is ready.- Specified by:
setJpegQualityin classScanFragment- Parameters:
jpegQuality- , between 0 and 100
-
setFocusIndicator
public void setFocusIndicator(@Nullable FocusIndicator focusIndicator)Deprecated.- Specified by:
setFocusIndicatorin classScanFragment
-
setBorderDetectorListener
public void setBorderDetectorListener(BorderDetector.BorderDetectorListener listener)
Deprecated.- Specified by:
setBorderDetectorListenerin classScanFragment
-
setAutoTriggerAnimationEnabled
public void setAutoTriggerAnimationEnabled(boolean enabled)
Deprecated.- Specified by:
setAutoTriggerAnimationEnabledin classScanFragment
-
isRealTimeBorderDetectionEnabled
public boolean isRealTimeBorderDetectionEnabled()
Deprecated.- Specified by:
isRealTimeBorderDetectionEnabledin classScanFragment
-
resetBorderDetection
public void resetBorderDetection()
Deprecated.- Specified by:
resetBorderDetectionin classScanFragment
-
-