Stay organized with collections Save and categorize content based on your preferences.
Base activity that provides easy integration with GVR headsets.
Exposes events to interact with GVR headsets and handles many of the details commonly required when creating an Activity for VR rendering.
This activity keeps the screen ON as long as it detects that the phone is moving. This way the screen saver won't kick in while users are experiencing VR content. If no phone movement is detected for ~30 seconds, the regular screen wakelock policy is restored.
Inherited Constants From class android.app.Activity int DEFAULT_KEYS_DIALER int DEFAULT_KEYS_DISABLE int DEFAULT_KEYS_SEARCH_GLOBAL int DEFAULT_KEYS_SEARCH_LOCAL int DEFAULT_KEYS_SHORTCUT int RESULT_CANCELED int RESULT_FIRST_USER int RESULT_OK From class android.content.Context String ACCESSIBILITY_SERVICE String ACCOUNT_SERVICE String ACTIVITY_SERVICE String ALARM_SERVICE String APPWIDGET_SERVICE String APP_OPS_SERVICE String AUDIO_SERVICE String BATTERY_SERVICE int BIND_ABOVE_CLIENT int BIND_ADJUST_WITH_ACTIVITY int BIND_ALLOW_OOM_MANAGEMENT int BIND_AUTO_CREATE int BIND_DEBUG_UNBIND int BIND_EXTERNAL_SERVICE int BIND_IMPORTANT int BIND_NOT_FOREGROUND int BIND_WAIVE_PRIORITY String BIOMETRIC_SERVICE String BLUETOOTH_SERVICE String CAMERA_SERVICE String CAPTIONING_SERVICE String CARRIER_CONFIG_SERVICE String CLIPBOARD_SERVICE String COMPANION_DEVICE_SERVICE String CONNECTIVITY_SERVICE String CONSUMER_IR_SERVICE int CONTEXT_IGNORE_SECURITY int CONTEXT_INCLUDE_CODE int CONTEXT_RESTRICTED String CROSS_PROFILE_APPS_SERVICE String DEVICE_POLICY_SERVICE String DISPLAY_SERVICE String DOWNLOAD_SERVICE String DROPBOX_SERVICE String EUICC_SERVICE String FINGERPRINT_SERVICE String HARDWARE_PROPERTIES_SERVICE String INPUT_METHOD_SERVICE String INPUT_SERVICE String IPSEC_SERVICE String JOB_SCHEDULER_SERVICE String KEYGUARD_SERVICE String LAUNCHER_APPS_SERVICE String LAYOUT_INFLATER_SERVICE String LOCATION_SERVICE String MEDIA_PROJECTION_SERVICE String MEDIA_ROUTER_SERVICE String MEDIA_SESSION_SERVICE String MIDI_SERVICE int MODE_APPEND int MODE_ENABLE_WRITE_AHEAD_LOGGING int MODE_MULTI_PROCESS int MODE_NO_LOCALIZED_COLLATORS int MODE_PRIVATE int MODE_WORLD_READABLE int MODE_WORLD_WRITEABLE String NETWORK_STATS_SERVICE String NFC_SERVICE String NOTIFICATION_SERVICE String NSD_SERVICE String POWER_SERVICE String PRINT_SERVICE int RECEIVER_VISIBLE_TO_INSTANT_APPS String RESTRICTIONS_SERVICE String ROLE_SERVICE String SEARCH_SERVICE String SENSOR_SERVICE String SHORTCUT_SERVICE String STORAGE_SERVICE String STORAGE_STATS_SERVICE String SYSTEM_HEALTH_SERVICE String TELECOM_SERVICE String TELEPHONY_SERVICE String TELEPHONY_SUBSCRIPTION_SERVICE String TEXT_CLASSIFICATION_SERVICE String TEXT_SERVICES_MANAGER_SERVICE String TV_INPUT_SERVICE String UI_MODE_SERVICE String USAGE_STATS_SERVICE String USB_SERVICE String USER_SERVICE String VIBRATOR_SERVICE String WALLPAPER_SERVICE String WIFI_AWARE_SERVICE String WIFI_P2P_SERVICE String WIFI_RTT_RANGING_SERVICE String WIFI_SERVICE String WINDOW_SERVICE From interface android.content.ComponentCallbacks2 int TRIM_MEMORY_BACKGROUND int TRIM_MEMORY_COMPLETE int TRIM_MEMORY_MODERATE int TRIM_MEMORY_RUNNING_CRITICAL int TRIM_MEMORY_RUNNING_LOW int TRIM_MEMORY_RUNNING_MODERATE int TRIM_MEMORY_UI_HIDDEN Public Constructors Public Methods GvrView void onBackPressed()
Invokes the currently configured "close" behavior, in addition to the default Activity.onBackPressed() behavior.
void onCardboardTrigger()
Override to detect when the Cardboard trigger was pulled and released.
void void setGvrView(
GvrViewgvrView, boolean enableVrModeFallbacks)
Associates a GVR view with this activity.
Inherited Methods From class android.app.Activity void voidcloseContextMenu()
voidcloseOptionsMenu()
PendingIntent createPendingResult(int arg0,
Intentarg1, int arg2)
final voiddismissDialog(int arg0)
final voiddismissKeyboardShortcutsHelper()
boolean boolean boolean dispatchKeyShortcutEvent(
KeyEventarg0)
boolean boolean boolean void booleanenterPictureInPictureMode(PictureInPictureParams arg0)
voidenterPictureInPictureMode()
<T extends View> TfindViewById(int arg0)
voidfinish()
voidfinishActivity(int arg0)
void finishActivityFromChild(
Activityarg0, int arg1)
voidfinishAffinity()
voidfinishAfterTransition()
voidfinishAndRemoveTask()
void ActionBargetActionBar()
final ApplicationgetApplication()
ComponentNamegetCallingActivity()
StringgetCallingPackage()
intgetChangingConfigurations()
ComponentNamegetComponentName()
ScenegetContentScene()
TransitionManagergetContentTransitionManager()
ViewgetCurrentFocus()
FragmentManagergetFragmentManager()
IntentgetIntent()
ObjectgetLastNonConfigurationInstance()
LayoutInflatergetLayoutInflater()
LoaderManagergetLoaderManager()
StringgetLocalClassName()
intgetMaxNumPictureInPictureActions()
final MediaControllergetMediaController()
MenuInflatergetMenuInflater()
final ActivitygetParent()
IntentgetParentActivityIntent()
SharedPreferencesgetPreferences(int arg0)
UrigetReferrer()
intgetRequestedOrientation()
final SearchEventgetSearchEvent()
Object getSystemService(
Stringarg0)
intgetTaskId()
final CharSequencegetTitle()
final intgetTitleColor()
VoiceInteractorgetVoiceInteractor()
final intgetVolumeControlStream()
WindowgetWindow()
WindowManagergetWindowManager()
booleanhasWindowFocus()
voidinvalidateOptionsMenu()
booleanisActivityTransitionRunning()
booleanisChangingConfigurations()
final booleanisChild()
booleanisDestroyed()
booleanisFinishing()
booleanisImmersive()
booleanisInMultiWindowMode()
booleanisInPictureInPictureMode()
booleanisLocalVoiceInteractionSupported()
booleanisTaskRoot()
booleanisVoiceInteraction()
booleanisVoiceInteractionRoot()
final Cursor booleanmoveTaskToBack(boolean arg0)
boolean boolean void void void onActivityReenter(int arg0,
Intentarg1)
void voidonAttachedToWindow()
voidonBackPressed()
void voidonContentChanged()
boolean void onContextMenuClosed(
Menuarg0)
void void CharSequenceonCreateDescription()
void boolean onCreateOptionsMenu(
Menuarg0)
boolean onCreatePanelMenu(int arg0,
Menuarg1)
ViewonCreatePanelView(int arg0)
boolean View View voidonDetachedFromWindow()
voidonEnterAnimationComplete()
boolean boolean boolean onKeyLongPress(int arg0,
KeyEventarg1)
boolean onKeyMultiple(int arg0, int arg1,
KeyEventarg2)
boolean boolean voidonLocalVoiceInteractionStarted()
voidonLocalVoiceInteractionStopped()
voidonLowMemory()
boolean onMenuItemSelected(int arg0,
MenuItemarg1)
boolean onMenuOpened(int arg0,
Menuarg1)
voidonMultiWindowModeChanged(boolean arg0)
void booleanonNavigateUp()
boolean boolean void onOptionsMenuClosed(
Menuarg0)
void onPanelClosed(int arg0,
Menuarg1)
void voidonPictureInPictureModeChanged(boolean arg0)
void void boolean onPrepareOptionsMenu(
Menuarg0)
boolean onPreparePanel(int arg0,
Viewarg1,
Menuarg2)
voidonProvideAssistContent(AssistContent arg0)
void onProvideAssistData(
Bundlearg0)
void onProvideKeyboardShortcuts(
List<KeyboardShortcutGroup> arg0,
Menuarg1, int arg2)
UrionProvideReferrer()
void onRequestPermissionsResult(int arg0,
String[]arg1, int[] arg2)
void ObjectonRetainNonConfigurationInstance()
void booleanonSearchRequested(SearchEvent arg0)
booleanonSearchRequested()
voidonStateNotSaved()
voidonTopResumedActivityChanged(boolean arg0)
boolean boolean voidonTrimMemory(int arg0)
voidonUserInteraction()
voidonVisibleBehindCanceled()
void voidonWindowFocusChanged(boolean arg0)
ActionMode ActionMode void openContextMenu(
Viewarg0)
voidopenOptionsMenu()
voidoverridePendingTransition(int arg0, int arg1)
voidpostponeEnterTransition()
voidrecreate()
void void registerForContextMenu(
Viewarg0)
booleanreleaseInstance()
final voidremoveDialog(int arg0)
voidreportFullyDrawn()
DragAndDropPermissions requestDragAndDropPermissions(
DragEventarg0)
final void requestPermissions(
String[]arg0, int arg1)
final voidrequestShowKeyboardShortcuts()
booleanrequestVisibleBehind(boolean arg0)
final booleanrequestWindowFeature(int arg0)
final <T extends View> TrequireViewById(int arg0)
final void void void void void setContentView(
Viewarg0)
voidsetContentView(int arg0)
final voidsetDefaultKeyMode(int arg0)
void void final void setFeatureDrawable(int arg0,
Drawablearg1)
final voidsetFeatureDrawableAlpha(int arg0, int arg1)
final voidsetFeatureDrawableResource(int arg0, int arg1)
final void setFeatureDrawableUri(int arg0,
Uriarg1)
voidsetFinishOnTouchOutside(boolean arg0)
voidsetImmersive(boolean arg0)
void final void voidsetPictureInPictureParams(PictureInPictureParams arg0)
final voidsetProgress(int arg0)
final voidsetProgressBarIndeterminate(boolean arg0)
final voidsetProgressBarIndeterminateVisibility(boolean arg0)
final voidsetProgressBarVisibility(boolean arg0)
voidsetRequestedOrientation(int arg0)
final void setResult(int arg0,
Intentarg1)
final voidsetResult(int arg0)
final voidsetSecondaryProgress(int arg0)
voidsetShowWhenLocked(boolean arg0)
void voidsetTheme(int arg0)
void voidsetTitle(int arg0)
voidsetTitleColor(int arg0)
voidsetTurnScreenOn(boolean arg0)
voidsetVisible(boolean arg0)
final voidsetVolumeControlStream(int arg0)
void boolean shouldShowRequestPermissionRationale(
Stringarg0)
boolean shouldUpRecreateTask(
Intentarg0)
boolean final boolean showDialog(int arg0,
Bundlearg1)
final voidshowDialog(int arg0)
voidshowLockTaskEscapeMessage()
ActionMode ActionMode void void void void void startActivityForResult(
Intentarg0, int arg1)
void startActivityForResult(
Intentarg0, int arg1,
Bundlearg2)
void void void void boolean boolean startActivityIfNeeded(
Intentarg0, int arg1)
void void void startIntentSenderForResult(
IntentSenderarg0, int arg1,
Intentarg2, int arg3, int arg4, int arg5)
void void void void startLocalVoiceInteraction(
Bundlearg0)
voidstartLockTask()
void startManagingCursor(
Cursorarg0)
boolean boolean startNextMatchingActivity(
Intentarg0)
voidstartPostponedEnterTransition()
void startSearch(
Stringarg0, boolean arg1,
Bundlearg2, boolean arg3)
voidstopLocalVoiceInteraction()
voidstopLockTask()
void stopManagingCursor(
Cursorarg0)
voidtakeKeyEvents(boolean arg0)
void void void unregisterForContextMenu(
Viewarg0)
From class android.view.ContextThemeWrapper From class android.content.ContextWrapper boolean boolean int checkCallingOrSelfPermission(
Stringarg0)
int checkCallingOrSelfUriPermission(
Uriarg0, int arg1)
int checkCallingPermission(
Stringarg0)
int checkCallingUriPermission(
Uriarg0, int arg1)
int checkPermission(
Stringarg0, int arg1, int arg2)
int checkSelfPermission(
Stringarg0)
int checkUriPermission(
Uriarg0,
Stringarg1,
Stringarg2, int arg3, int arg4, int arg5)
int checkUriPermission(
Uriarg0, int arg1, int arg2, int arg3)
voidclearWallpaper()
Context Context createContextForSplit(
Stringarg0)
ContextcreateDeviceProtectedStorageContext()
Context createDisplayContext(
Displayarg0)
Context createPackageContext(
Stringarg0, int arg1)
String[]databaseList()
boolean boolean boolean deleteSharedPreferences(
Stringarg0)
void void enforceCallingOrSelfUriPermission(
Uriarg0, int arg1,
Stringarg2)
void void enforceCallingUriPermission(
Uriarg0, int arg1,
Stringarg2)
void enforcePermission(
Stringarg0, int arg1, int arg2,
Stringarg3)
void void enforceUriPermission(
Uriarg0, int arg1, int arg2, int arg3,
Stringarg4)
String[]fileList()
ContextgetApplicationContext()
ApplicationInfogetApplicationInfo()
AssetManagergetAssets()
ContextgetBaseContext()
FilegetCacheDir()
ClassLoadergetClassLoader()
FilegetCodeCacheDir()
ContentResolvergetContentResolver()
FilegetDataDir()
File getDatabasePath(
Stringarg0)
File getDir(
Stringarg0, int arg1)
FilegetExternalCacheDir()
File[]getExternalCacheDirs()
File getExternalFilesDir(
Stringarg0)
File[] getExternalFilesDirs(
Stringarg0)
File[]getExternalMediaDirs()
File getFileStreamPath(
Stringarg0)
FilegetFilesDir()
ExecutorgetMainExecutor()
LoopergetMainLooper()
FilegetNoBackupFilesDir()
FilegetObbDir()
File[]getObbDirs()
StringgetOpPackageName()
StringgetPackageCodePath()
PackageManagergetPackageManager()
StringgetPackageName()
StringgetPackageResourcePath()
ResourcesgetResources()
SharedPreferences getSharedPreferences(
Stringarg0, int arg1)
Object getSystemService(
Stringarg0)
String getSystemServiceName(
Class<?> arg0)
Resources.ThemegetTheme()
DrawablegetWallpaper()
intgetWallpaperDesiredMinimumHeight()
intgetWallpaperDesiredMinimumWidth()
void grantUriPermission(
Stringarg0,
Uriarg1, int arg2)
booleanisDeviceProtectedStorage()
booleanisRestricted()
boolean boolean FileInputStream FileOutputStream openFileOutput(
Stringarg0, int arg1)
SQLiteDatabase SQLiteDatabase DrawablepeekWallpaper()
Intent Intent Intent Intent void removeStickyBroadcast(
Intentarg0)
void void revokeUriPermission(
Uriarg0, int arg1)
void revokeUriPermission(
Stringarg0,
Uriarg1, int arg2)
void void void void void void void void sendStickyBroadcast(
Intentarg0)
void void void voidsetTheme(int arg0)
void void void void void void ComponentName startForegroundService(
Intentarg0)
boolean void void ComponentName boolean void void void From class android.content.Context boolean abstract boolean abstract int checkCallingOrSelfPermission(
Stringarg0)
abstract int checkCallingOrSelfUriPermission(
Uriarg0, int arg1)
abstract int checkCallingPermission(
Stringarg0)
abstract int checkCallingUriPermission(
Uriarg0, int arg1)
abstract int checkPermission(
Stringarg0, int arg1, int arg2)
abstract int checkSelfPermission(
Stringarg0)
abstract int checkUriPermission(
Uriarg0,
Stringarg1,
Stringarg2, int arg3, int arg4, int arg5)
abstract int checkUriPermission(
Uriarg0, int arg1, int arg2, int arg3)
abstract voidclearWallpaper()
abstract Context abstract Context createContextForSplit(
Stringarg0)
abstract ContextcreateDeviceProtectedStorageContext()
abstract Context createDisplayContext(
Displayarg0)
abstract Context createPackageContext(
Stringarg0, int arg1)
abstract String[]databaseList()
abstract boolean abstract boolean abstract boolean deleteSharedPreferences(
Stringarg0)
abstract void abstract void enforceCallingOrSelfUriPermission(
Uriarg0, int arg1,
Stringarg2)
abstract void abstract void enforceCallingUriPermission(
Uriarg0, int arg1,
Stringarg2)
abstract void enforcePermission(
Stringarg0, int arg1, int arg2,
Stringarg3)
abstract void abstract void enforceUriPermission(
Uriarg0, int arg1, int arg2, int arg3,
Stringarg4)
abstract String[]fileList()
abstract ContextgetApplicationContext()
abstract ApplicationInfogetApplicationInfo()
abstract AssetManagergetAssets()
abstract FilegetCacheDir()
abstract ClassLoadergetClassLoader()
abstract FilegetCodeCacheDir()
final intgetColor(int arg0)
final ColorStateListgetColorStateList(int arg0)
abstract ContentResolvergetContentResolver()
abstract FilegetDataDir()
abstract File getDatabasePath(
Stringarg0)
abstract File getDir(
Stringarg0, int arg1)
final DrawablegetDrawable(int arg0)
abstract FilegetExternalCacheDir()
abstract File[]getExternalCacheDirs()
abstract File getExternalFilesDir(
Stringarg0)
abstract File[] getExternalFilesDirs(
Stringarg0)
abstract File[]getExternalMediaDirs()
abstract File getFileStreamPath(
Stringarg0)
abstract FilegetFilesDir()
ExecutorgetMainExecutor()
abstract LoopergetMainLooper()
abstract FilegetNoBackupFilesDir()
abstract FilegetObbDir()
abstract File[]getObbDirs()
StringgetOpPackageName()
abstract StringgetPackageCodePath()
abstract PackageManagergetPackageManager()
abstract StringgetPackageName()
abstract StringgetPackageResourcePath()
abstract ResourcesgetResources()
abstract SharedPreferences getSharedPreferences(
Stringarg0, int arg1)
final String final StringgetString(int arg0)
final <T> T getSystemService(
Class<T> arg0)
abstract Object getSystemService(
Stringarg0)
abstract String getSystemServiceName(
Class<?> arg0)
final CharSequencegetText(int arg0)
abstract Resources.ThemegetTheme()
abstract DrawablegetWallpaper()
abstract intgetWallpaperDesiredMinimumHeight()
abstract intgetWallpaperDesiredMinimumWidth()
abstract void grantUriPermission(
Stringarg0,
Uriarg1, int arg2)
abstract booleanisDeviceProtectedStorage()
booleanisRestricted()
abstract boolean abstract boolean final TypedArray final TypedArray obtainStyledAttributes(
AttributeSetarg0, int[] arg1, int arg2, int arg3)
final TypedArrayobtainStyledAttributes(int arg0, int[] arg1)
final TypedArrayobtainStyledAttributes(int[] arg0)
abstract FileInputStream abstract FileOutputStream openFileOutput(
Stringarg0, int arg1)
abstract SQLiteDatabase abstract SQLiteDatabase abstract DrawablepeekWallpaper()
void abstract Intent abstract Intent abstract Intent abstract Intent abstract void removeStickyBroadcast(
Intentarg0)
abstract void abstract void revokeUriPermission(
Uriarg0, int arg1)
abstract void revokeUriPermission(
Stringarg0,
Uriarg1, int arg2)
abstract void abstract void abstract void abstract void abstract void abstract void abstract void abstract void sendStickyBroadcast(
Intentarg0)
abstract void abstract void abstract void abstract voidsetTheme(int arg0)
abstract void abstract void abstract void abstract void abstract void abstract void abstract ComponentName startForegroundService(
Intentarg0)
abstract boolean abstract void abstract void abstract ComponentName abstract boolean abstract void void abstract void void From class java.lang.Object boolean final Class<?>getClass()
inthashCode()
final voidnotify()
final voidnotifyAll()
StringtoString()
final voidwait(long arg0, int arg1)
final voidwait(long arg0)
final voidwait()
From interface android.view.LayoutInflater.Factory2 From interface android.view.Window.Callback abstract boolean abstract boolean abstract boolean dispatchKeyShortcutEvent(
KeyEventarg0)
abstract boolean abstract boolean abstract boolean abstract void abstract void abstract voidonAttachedToWindow()
abstract voidonContentChanged()
abstract boolean onCreatePanelMenu(int arg0,
Menuarg1)
abstract ViewonCreatePanelView(int arg0)
abstract voidonDetachedFromWindow()
abstract boolean onMenuItemSelected(int arg0,
MenuItemarg1)
abstract boolean onMenuOpened(int arg0,
Menuarg1)
abstract void onPanelClosed(int arg0,
Menuarg1)
voidonPointerCaptureChanged(boolean arg0)
abstract boolean onPreparePanel(int arg0,
Viewarg1,
Menuarg2)
void onProvideKeyboardShortcuts(
List<KeyboardShortcutGroup> arg0,
Menuarg1, int arg2)
abstract booleanonSearchRequested()
abstract booleanonSearchRequested(SearchEvent arg0)
abstract void abstract voidonWindowFocusChanged(boolean arg0)
abstract ActionMode abstract ActionMode From interface android.view.KeyEvent.Callback abstract boolean abstract boolean onKeyLongPress(int arg0,
KeyEventarg1)
abstract boolean onKeyMultiple(int arg0, int arg1,
KeyEventarg2)
abstract boolean From interface android.view.View.OnCreateContextMenuListener From interface android.content.ComponentCallbacks2 abstract voidonTrimMemory(int arg0)
From interface android.view.LayoutInflater.Factory From interface android.content.ComponentCallbacks abstract void abstract voidonLowMemory()
Public Constructors Public Methods public GvrView getGvrView ()Returns the GvrView
associated with this activity.
GvrView
object associated with this activity. Can be null.Invokes the currently configured "close" behavior, in addition to the default Activity.onBackPressed() behavior.
For Cardboard apps, this will be identical to Activity.onBackPressed(). For Daydream apps, this will finish the Activity and restore the 2D launcher.
public void onCardboardTrigger ()Override to detect when the Cardboard trigger was pulled and released.
Provides click-like events when the display is inside a Cardboard viewer.
public void setGvrView (GvrView gvrView)Associates a GVR view with this activity.
This method does not set or change the content view, but associates the activity with a GvrView
and ensures it receives any required activity lifecycle notifications.
This is automatically done if setContentView
is used to directly set a GvrView
object, and should be called if the GvrView
is set in any other way (e.g. from a layout resource).
On Android N+, setting a valid GvrView
will also enable VR mode while the activity is visible. If Google VR Services is not present or enabled, this will prompt the user to install or enable Google VR Services before continuing.
GvrView
to associate with. Can be null. public void setGvrView (GvrView gvrView, boolean enableVrModeFallbacks)
Associates a GVR view with this activity.
This method does not set or change the content view, but associates the activity with a GvrView
and ensures it receives any required activity lifecycle notifications.
This is automatically done if setContentView
is used to directly set a GvrView
object, and should be called if the GvrView
is set in any other way (e.g. from a layout resource).
On Android N+, setting a valid GvrView
will also enable VR mode while the activity is visible. If Google VR Services is not present and enabled, this will prompt the user to install or enable Google VR Services before continuing if enableVrModeFallbacks has been set to true
. If the user continues without Google VR Services present and enabled, the Android OS will not enter VR mode, and some functionality may not be available (e.g. the controller).
GvrView
to associate with. Can be null. enableVrModeFallbacks true
to show the user a prompt to handle the case where Google VR Services is not present and enabled.
All rights reserved. Java is a registered trademark of Oracle and/or its affiliates.
Last updated 2024-10-09 UTC.
[[["Easy to understand","easyToUnderstand","thumb-up"],["Solved my problem","solvedMyProblem","thumb-up"],["Other","otherUp","thumb-up"]],[["Missing the information I need","missingTheInformationINeed","thumb-down"],["Too complicated / too many steps","tooComplicatedTooManySteps","thumb-down"],["Out of date","outOfDate","thumb-down"],["Samples / code issue","samplesCodeIssue","thumb-down"],["Other","otherDown","thumb-down"]],["Last updated 2024-10-09 UTC."],[[["`GvrActivity` simplifies Google VR integration by managing VR rendering and headset interactions within Android applications."],["It provides key features like screen activity management, VR event handling (e.g., Cardboard trigger), and seamless integration with `GvrView` for VR rendering."],["Developers can leverage methods like `onCardboardTrigger()`, `getGvrView()`, and `setGvrView()` to build interactive VR experiences."],["`GvrActivity` extends `android.app.Activity`, inheriting standard Android functionalities and lifecycle methods for broader application control."],["By handling common VR tasks, `GvrActivity` allows developers to focus on creating immersive VR content."]]],["`GvrActivity` simplifies VR development by managing screen behavior in VR headsets. It maintains a screen wake lock during VR use, preventing screen savers unless no movement is detected for 30 seconds. Key actions include obtaining the `GvrView` via `getGvrView()`, handling back button presses with `onBackPressed()`, detecting trigger events with `onCardboardTrigger()`, and setting a GvrView via `setGvrView()`. Many inherited methods relate to views, lifecycle, navigation, intents, input, menus, configuration, media, and permissions.\n"]]
RetroSearch is an open source project built by @garambo | Open a GitHub Issue
Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo
HTML:
3.2
| Encoding:
UTF-8
| Version:
0.7.4