Class ArFragment

  • All Implemented Interfaces:
    android.content.ComponentCallbacks, android.view.View.OnCreateContextMenuListener, androidx.lifecycle.LifecycleOwner, androidx.lifecycle.ViewModelStoreOwner, androidx.savedstate.SavedStateRegistryOwner, pro.streem.ar.sceneform.Scene.OnPeekTouchListener, pro.streem.ar.sceneform.Scene.OnUpdateListener

    public class ArFragment
    extends BaseArFragment
    Implements AR Required ArFragment. Does not require additional permissions and uses the default configuration for ARCore.
    • Constructor Summary

      Constructors 
      Constructor Description
      ArFragment()  
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      java.lang.String[] getAdditionalPermissions()
      Returns an array of dangerous permissions that are required by the app in addition to Manifest.permission.CAMERA, which is needed by ARCore.
      protected com.google.ar.core.Config getSessionConfiguration​(com.google.ar.core.Session session)  
      protected java.util.Set<com.google.ar.core.Session.Feature> getSessionFeatures()
      Specifies additional features for creating an ARCore Session.
      protected void handleSessionException​(com.google.ar.core.exceptions.UnavailableException sessionException)  
      boolean isArRequired()
      Returns true if this application is AR Required, false if AR Optional.
      • Methods inherited from class androidx.fragment.app.Fragment

        dump, equals, getActivity, getAllowEnterTransitionOverlap, getAllowReturnTransitionOverlap, getArguments, getChildFragmentManager, getContext, getEnterTransition, getExitTransition, getFragmentManager, getHost, getId, getLayoutInflater, getLayoutInflater, getLifecycle, getLoaderManager, getParentFragment, 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, onActivityResult, onAttach, onAttach, onAttachFragment, onConfigurationChanged, onContextItemSelected, onCreate, onCreateAnimation, onCreateAnimator, onCreateContextMenu, onCreateOptionsMenu, onDestroyOptionsMenu, onDetach, onGetLayoutInflater, onHiddenChanged, onInflate, onInflate, onLowMemory, onMultiWindowModeChanged, onOptionsItemSelected, onOptionsMenuClosed, onPictureInPictureModeChanged, onPrepareOptionsMenu, onPrimaryNavigationFragmentChanged, onSaveInstanceState, onStart, onStop, onViewCreated, onViewStateRestored, postponeEnterTransition, postponeEnterTransition, 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
      • Methods inherited from class java.lang.Object

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

      • ArFragment

        public ArFragment()
    • Method Detail

      • isArRequired

        public boolean isArRequired()
        Description copied from class: BaseArFragment
        Returns true if this application is AR Required, false if AR Optional. This is called when initializing the application and the session.
        Specified by:
        isArRequired in class BaseArFragment
      • getAdditionalPermissions

        public java.lang.String[] getAdditionalPermissions()
        Description copied from class: BaseArFragment
        Returns an array of dangerous permissions that are required by the app in addition to Manifest.permission.CAMERA, which is needed by ARCore. If no additional permissions are needed, an empty array should be returned.
        Specified by:
        getAdditionalPermissions in class BaseArFragment
      • handleSessionException

        protected void handleSessionException​(com.google.ar.core.exceptions.UnavailableException sessionException)
        Specified by:
        handleSessionException in class BaseArFragment
      • getSessionConfiguration

        protected com.google.ar.core.Config getSessionConfiguration​(com.google.ar.core.Session session)
        Specified by:
        getSessionConfiguration in class BaseArFragment
      • getSessionFeatures

        protected java.util.Set<com.google.ar.core.Session.Feature> getSessionFeatures()
        Description copied from class: BaseArFragment
        Specifies additional features for creating an ARCore Session. See Session.Feature.
        Specified by:
        getSessionFeatures in class BaseArFragment