Class CheckInFragment<V extends CheckInView,​P extends CheckInPresenter<V>>

  • All Implemented Interfaces:
    android.content.ComponentCallbacks, android.view.View.OnClickListener, android.view.View.OnCreateContextMenuListener, androidx.activity.result.ActivityResultCaller, androidx.lifecycle.HasDefaultViewModelProviderFactory, androidx.lifecycle.LifecycleOwner, androidx.lifecycle.ViewModelStoreOwner, androidx.savedstate.SavedStateRegistryOwner, ChallengeResponseView, CheckInView, com.cheetahdigital.corekit.sdk.analytics.AnalyticsManager.AnalyticsScreen, com.cheetahdigital.uikit.architecture.mvp.MvpView, com.cheetahdigital.uikit.helper.permissions.LocationPermissionHelper.LocationPermissionCallback

    public class CheckInFragment<V extends CheckInView,​P extends CheckInPresenter<V>>
    extends ChallengeResponseFragment<V,​P>
    implements com.cheetahdigital.uikit.helper.permissions.LocationPermissionHelper.LocationPermissionCallback, CheckInView
    Class that gets the current location of the user and use received coordinates for checkin challenge
    • Nested Class Summary

      • Nested classes/interfaces inherited from class androidx.fragment.app.Fragment

        androidx.fragment.app.Fragment.InstantiationException, androidx.fragment.app.Fragment.SavedState
    • Constructor Summary

      Constructors 
      Constructor Description
      CheckInFragment()  
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      protected P createPresenter()
      Instantiate MvpFragmentView.mPresenter to be used for this MvpActivityView
      protected int getContentLayoutId()
      Provide the Content Layout ID which is of a Layout Resource Reference of Android
      void onActivityResult​(int requestCode, int resultCode, android.content.Intent data)  
      void onClick​(android.view.View view)  
      void onCreate​(android.os.Bundle savedInstanceState)  
      void onLocationPermissionDenied()  
      void onLocationPermissionGranted()  
      void onStart()  
      void onStop()  
      void onViewCreated​(android.view.View view, android.os.Bundle savedInstanceState)  
      void showCheckInConfirmation​(int points)
      Notifies the view to that check-in is successful
      void showCheckInDetails​(com.cheetahdigital.locations.core.model.Place place, int points)
      Notifies the view to show check-in details
      void showCheckInNotAvailable()
      Notifies the view to that check-in is not available at current location
      void submitChallenge()
      Submit challenge response
      • Methods inherited from class com.cheetahdigital.uikit.architecture.mvp.MvpFragmentView

        captureSharedElementValues, getPresenter, getScreenName, getSharedElementViews, initSharedElementValues, isSharedAnimationEnabled, onAttach, onCreateView, onDestroyView, startActivity, startActivityForResult
      • 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, onActivityCreated, onAttach, onAttachFragment, onConfigurationChanged, onContextItemSelected, onCreateAnimation, onCreateAnimator, onCreateContextMenu, onCreateOptionsMenu, onDestroy, onDestroyOptionsMenu, onDetach, onGetLayoutInflater, onHiddenChanged, onInflate, onInflate, onLowMemory, onMultiWindowModeChanged, onOptionsItemSelected, onOptionsMenuClosed, onPause, onPictureInPictureModeChanged, onPrepareOptionsMenu, onPrimaryNavigationFragmentChanged, onRequestPermissionsResult, onResume, onSaveInstanceState, 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, startActivityForResult, startIntentSenderForResult, startPostponedEnterTransition, toString, unregisterForContextMenu
      • Methods inherited from class java.lang.Object

        clone, finalize, getClass, notify, notifyAll, wait, wait, wait
    • Constructor Detail

      • CheckInFragment

        public CheckInFragment()
    • Method Detail

      • getContentLayoutId

        protected int getContentLayoutId()
        Description copied from class: com.cheetahdigital.uikit.architecture.mvp.MvpFragmentView
        Provide the Content Layout ID which is of a Layout Resource Reference of Android
        Specified by:
        getContentLayoutId in class com.cheetahdigital.uikit.architecture.mvp.MvpFragmentView<V extends CheckInView,​P extends CheckInPresenter<V>>
        Returns:
        id of the content layout
      • createPresenter

        protected P createPresenter()
        Description copied from class: com.cheetahdigital.uikit.architecture.mvp.MvpFragmentView
        Instantiate MvpFragmentView.mPresenter to be used for this MvpActivityView
        Specified by:
        createPresenter in class com.cheetahdigital.uikit.architecture.mvp.MvpFragmentView<V extends CheckInView,​P extends CheckInPresenter<V>>
        Returns:
        return the MvpBasePresenter
      • showCheckInDetails

        public void showCheckInDetails​(com.cheetahdigital.locations.core.model.Place place,
                                       int points)
        Description copied from interface: CheckInView
        Notifies the view to show check-in details
        Specified by:
        showCheckInDetails in interface CheckInView
        Parameters:
        place - the Place model
        points - the check-in reward
      • showCheckInNotAvailable

        public void showCheckInNotAvailable()
        Description copied from interface: CheckInView
        Notifies the view to that check-in is not available at current location
        Specified by:
        showCheckInNotAvailable in interface CheckInView
      • showCheckInConfirmation

        public void showCheckInConfirmation​(int points)
        Description copied from interface: CheckInView
        Notifies the view to that check-in is successful
        Specified by:
        showCheckInConfirmation in interface CheckInView
        Parameters:
        points - the check-in reward
      • onActivityResult

        public void onActivityResult​(int requestCode,
                                     int resultCode,
                                     @Nullable
                                     android.content.Intent data)
        Overrides:
        onActivityResult in class androidx.fragment.app.Fragment
      • onLocationPermissionGranted

        public void onLocationPermissionGranted()
        Specified by:
        onLocationPermissionGranted in interface com.cheetahdigital.uikit.helper.permissions.LocationPermissionHelper.LocationPermissionCallback
      • onLocationPermissionDenied

        public void onLocationPermissionDenied()
        Specified by:
        onLocationPermissionDenied in interface com.cheetahdigital.uikit.helper.permissions.LocationPermissionHelper.LocationPermissionCallback
      • onStart

        public void onStart()
        Overrides:
        onStart in class androidx.fragment.app.Fragment
      • onStop

        public void onStop()
        Overrides:
        onStop in class androidx.fragment.app.Fragment