public final class LayarSDKFragment extends Fragment
| Modifier and Type | Class and Description |
|---|---|
static class |
LayarSDKFragment.PermissionDialogFragment |
static class |
LayarSDKFragment.ViewMode |
Fragment.InstantiationException, Fragment.SavedState| Constructor and Description |
|---|
LayarSDKFragment() |
| Modifier and Type | Method and Description |
|---|---|
void |
closePopOut() |
void |
createScreenshot(ScreenshotListener listener)
Request a screenshot.
|
void |
executeAction(Layer20 layer,
POI poi,
Action action)
FOR INTERNAL USE ONLY
|
Layer |
getCurrentLayer()
Get the current layer information.
|
LayarSDKFragment.ViewMode |
getViewMode()
Get the currently active view mode.
|
boolean |
isInPopOutMode() |
boolean |
isInScanMode() |
static void |
logMemoryUsage() |
void |
onActivityResult(int requestCode,
int resultCode,
Intent data) |
void |
onAttach(Context context) |
boolean |
onBackPressed() |
void |
onCreate(Bundle savedInstanceState) |
void |
onCreateOptionsMenu(Menu menu,
MenuInflater inflater) |
View |
onCreateView(LayoutInflater inflater,
ViewGroup container,
Bundle savedInstanceState) |
void |
onDestroy() |
boolean |
onOptionsItemSelected(MenuItem item) |
void |
onPause() |
void |
onRequestPermissionsResult(int requestCode,
String[] permissions,
int[] grantResults) |
void |
onResume() |
void |
openFilters()
Open the filter settings screen.
|
void |
openScanMode()
Open the Scan mode of the Layar SDK.
|
void |
openScreenshotMode()
Open the Screenshot mode, which allows the user to take a screen capture of the current AR
view contents, save it to the gallery and/or share it online.
|
void |
refreshCurrentLayer()
Refresh the contents of the currently loaded layer.
|
void |
setDefaultPopOutUIEnabled(boolean defaultPopOutUIEnabled)
Specify whether the default Pop-out UI should be enabled.
|
void |
setDefaultScanUIEnabled(boolean defaultScanUIEnabled) |
void |
setPopOut3DModeEnabled(boolean enable3D)
Specify whether 3D mode is enabled in the pop-out mode.
|
void |
setPopOut3DTiltEnabled(boolean enableTilt)
Specify whether 3D content should be tilted in pop-out mode.
|
void |
setPopOutFitContent(boolean popOutFitContent)
Specify whether the content on the page should be fitted to the screen in pop-out mode.
|
void |
setPopOutShowPreviewImage(boolean showPreviewImage)
Specify whether the preview image should be shown in a pop-out (detached state).
|
void |
setPopOutTrackingEnabled(boolean trackingEnabled)
Specify whether tracking needs to stay enabled while in pop-out mode.
|
void |
setSdkClient(LayarSDKClient sdkClient)
Set the SDK client to use for callbacks.
|
void |
setShowRadar(boolean showRadar)
Specify whether the radar should be shown when opening a geo layer.
|
void |
setShowStatusMessage(boolean showStatusMessage)
Specify whether the status message should be shown when opening a geo layer.
|
void |
setSystemWindowPadding(Rect insets) |
void |
switchViewMode(LayarSDKFragment.ViewMode mode)
Switch to the desired ViewMode (AR or Map).
|
boolean |
triggerPopOut()
Trigger pop-out mode for the current or last tracked reference image.
|
boolean |
triggerPopOut(String referenceImageKey)
Trigger pop-out mode for a specific reference image.
|
void |
triggerScan()
Trigger a scan when the SDK is in scan mode.
|
dump, equals, getActivity, getAllowEnterTransitionOverlap, getAllowReturnTransitionOverlap, getArguments, getChildFragmentManager, getContext, getEnterTransition, getExitTransition, getFragmentManager, getHost, getId, getLayoutInflater, getLoaderManager, getParentFragment, getReenterTransition, getResources, getRetainInstance, getReturnTransition, getSharedElementEnterTransition, getSharedElementReturnTransition, getString, getString, getTag, getTargetFragment, getTargetRequestCode, getText, getUserVisibleHint, getView, hashCode, hasOptionsMenu, instantiate, instantiate, isAdded, isDetached, isHidden, isInLayout, isMenuVisible, isRemoving, isResumed, isVisible, onActivityCreated, onAttach, onConfigurationChanged, onContextItemSelected, onCreateAnimation, onCreateContextMenu, onDestroyOptionsMenu, onDestroyView, onDetach, onHiddenChanged, onInflate, onInflate, onLowMemory, onOptionsMenuClosed, onPrepareOptionsMenu, onSaveInstanceState, onStart, onStop, onViewCreated, onViewStateRestored, registerForContextMenu, requestPermissions, setAllowEnterTransitionOverlap, setAllowReturnTransitionOverlap, setArguments, setEnterSharedElementCallback, setEnterTransition, setExitSharedElementCallback, setExitTransition, setHasOptionsMenu, setInitialSavedState, setMenuVisibility, setReenterTransition, setRetainInstance, setReturnTransition, setSharedElementEnterTransition, setSharedElementReturnTransition, setTargetFragment, setUserVisibleHint, shouldShowRequestPermissionRationale, startActivity, startActivity, startActivityForResult, startActivityForResult, toString, unregisterForContextMenupublic void onRequestPermissionsResult(int requestCode,
String[] permissions,
int[] grantResults)
onRequestPermissionsResult in class Fragmentpublic View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState)
onCreateView in class Fragmentpublic void openFilters()
public void switchViewMode(LayarSDKFragment.ViewMode mode)
mode - public LayarSDKFragment.ViewMode getViewMode()
public void createScreenshot(ScreenshotListener listener)
public void setSdkClient(LayarSDKClient sdkClient)
sdkClient - public void openScanMode()
public void openScreenshotMode()
public void refreshCurrentLayer()
public void triggerScan()
public void setDefaultPopOutUIEnabled(boolean defaultPopOutUIEnabled)
defaultPopOutUIEnabled - (true by default)public void setDefaultScanUIEnabled(boolean defaultScanUIEnabled)
public void setShowRadar(boolean showRadar)
showRadar - (true by default)public void setShowStatusMessage(boolean showStatusMessage)
showStatusMessage - public void setPopOutShowPreviewImage(boolean showPreviewImage)
showPreviewImage - (true by default)public void setPopOutTrackingEnabled(boolean trackingEnabled)
trackingEnabled - (false by default)public void setPopOutFitContent(boolean popOutFitContent)
popOutFitContent - (true by default)public void setPopOut3DModeEnabled(boolean enable3D)
enable3D - public void setPopOut3DTiltEnabled(boolean enableTilt)
enableTilt - (true by default)public boolean triggerPopOut()
public boolean triggerPopOut(String referenceImageKey)
referenceImageKey - public void closePopOut()
public void executeAction(Layer20 layer,
POI poi,
Action action)
public boolean onBackPressed()
public Layer getCurrentLayer()
public void onCreateOptionsMenu(Menu menu, MenuInflater inflater)
onCreateOptionsMenu in class Fragmentpublic boolean onOptionsItemSelected(MenuItem item)
onOptionsItemSelected in class Fragmentpublic void onActivityResult(int requestCode,
int resultCode,
Intent data)
onActivityResult in class Fragmentpublic boolean isInScanMode()
public boolean isInPopOutMode()
public void setSystemWindowPadding(Rect insets)
public static void logMemoryUsage()