-
- All Implemented Interfaces:
-
android.content.ComponentCallbacks,android.content.DialogInterface.OnCancelListener,android.content.DialogInterface.OnDismissListener,android.view.View.OnCreateContextMenuListener,androidx.activity.result.ActivityResultCaller,androidx.lifecycle.HasDefaultViewModelProviderFactory,androidx.lifecycle.LifecycleOwner,androidx.lifecycle.ViewModelStoreOwner,androidx.savedstate.SavedStateRegistryOwner,com.hcaptcha.sdk.IHCaptchaVerifier,com.hcaptcha.sdk.tasks.OnFailureListener,com.hcaptcha.sdk.tasks.OnLoadedListener,com.hcaptcha.sdk.tasks.OnOpenListener,com.hcaptcha.sdk.tasks.OnSuccessListener
public final class HCaptchaDialogFragment extends DialogFragment implements IHCaptchaVerifier
HCaptcha Dialog Fragment Class. Must have `public` modifier, so it can be properly recreated from instance state!
-
-
Method Summary
Modifier and Type Method Description static HCaptchaDialogFragmentnewInstance(@NonNull() HCaptchaConfig config, @NonNull() HCaptchaInternalConfig internalConfig, @NonNull() HCaptchaStateListener listener)Creates a new instance voidonCreate(Bundle savedInstanceState)ViewonCreateView(@Nullable() LayoutInflater inflater, @Nullable() ViewGroup container, @Nullable() Bundle savedInstanceState)voidonDestroy()voidonStart()voidonCancel(@NonNull() DialogInterface dialogInterface)voidonLoaded()Called when the hCaptcha challenge is loaded to the html page voidonOpen()Called when the hCaptcha visual challenge is displayed on the html page voidonFailure(@NonNull() HCaptchaException exception)Called whenever there is a hCaptcha error or user closed the challenge dialog voidonSuccess(String token)Called when the challenge is successfully completed voidstartVerification(@NonNull() Activity fragmentActivity)Starts the human verification process. voidreset()Force stop verification and release resources. -
Methods inherited from class androidx.fragment.app.DialogFragment
dismiss, dismissAllowingStateLoss, getDialog, getShowsDialog, getTheme, isCancelable, onAttach, onCancel, onCreate, onCreateDialog, onDestroyView, onDetach, onDismiss, onGetLayoutInflater, onSaveInstanceState, onStart, onStop, onViewStateRestored, requireDialog, setCancelable, setShowsDialog, setStyle, setupDialog, show, show, showNow -
Methods inherited from class androidx.fragment.app.Fragment
dump, equals, getActivity, getAllowEnterTransitionOverlap, getAllowReturnTransitionOverlap, getArguments, getChildFragmentManager, getContext, getDefaultViewModelProviderFactory, getEnterTransition, getExitTransition, getFragmentManager, getHost, getId, getLayoutInflater, getLifecycle, getLoaderManager, getParentFragment, getParentFragmentManager, getReenterTransition, getResources, getRetainInstance, getReturnTransition, getSavedStateRegistry, getSharedElementEnterTransition, getSharedElementReturnTransition, getString, getTag, getTargetFragment, getTargetRequestCode, getText, getUserVisibleHint, getView, getViewLifecycleOwner, getViewLifecycleOwnerLiveData, getViewModelStore, hasOptionsMenu, hashCode, instantiate, isAdded, isDetached, isHidden, isInLayout, isMenuVisible, isRemoving, isResumed, isStateSaved, isVisible, onActivityCreated, onActivityResult, onAttachFragment, onConfigurationChanged, onContextItemSelected, onCreateAnimation, onCreateAnimator, onCreateContextMenu, onCreateOptionsMenu, onCreateView, onDestroy, onDestroyOptionsMenu, onHiddenChanged, onInflate, onLowMemory, onMultiWindowModeChanged, onOptionsItemSelected, onOptionsMenuClosed, onPause, onPictureInPictureModeChanged, onPrepareOptionsMenu, onPrimaryNavigationFragmentChanged, onRequestPermissionsResult, onResume, onViewCreated, postponeEnterTransition, 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, startActivityForResult, startIntentSenderForResult, startPostponedEnterTransition, toString, unregisterForContextMenu -
Methods inherited from class com.hcaptcha.sdk.IHCaptchaVerifier
startVerification -
Methods inherited from class com.hcaptcha.sdk.tasks.OnSuccessListener
onSuccess -
Methods inherited from class com.hcaptcha.sdk.tasks.OnFailureListener
onFailure -
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
-
Method Detail
-
newInstance
static HCaptchaDialogFragment newInstance(@NonNull() HCaptchaConfig config, @NonNull() HCaptchaInternalConfig internalConfig, @NonNull() HCaptchaStateListener listener)
Creates a new instance
- Parameters:
config- the configlistener- the listener
-
onCreateView
View onCreateView(@Nullable() LayoutInflater inflater, @Nullable() ViewGroup container, @Nullable() Bundle savedInstanceState)
-
onDestroy
void onDestroy()
-
onStart
void onStart()
-
onCancel
void onCancel(@NonNull() DialogInterface dialogInterface)
-
onLoaded
void onLoaded()
Called when the hCaptcha challenge is loaded to the html page
-
onOpen
void onOpen()
Called when the hCaptcha visual challenge is displayed on the html page
-
onFailure
void onFailure(@NonNull() HCaptchaException exception)
Called whenever there is a hCaptcha error or user closed the challenge dialog
- Parameters:
exception- the exception
-
startVerification
void startVerification(@NonNull() Activity fragmentActivity)
Starts the human verification process.
-
reset
void reset()
Force stop verification and release resources.
-
-
-
-