public class AndroidDaydream extends android.service.dreams.DreamService implements AndroidApplicationBase
Application interface for Android. Create an Activity that derives from this class. In
the Activity#onCreate(Bundle) method call the initialize(ApplicationListener) method specifying the configuration for
the GLSurfaceView.| Modifier and Type | Field and Description |
|---|---|
protected com.badlogic.gdx.ApplicationLogger |
applicationLogger |
protected AndroidAudio |
audio |
protected AndroidClipboard |
clipboard |
protected com.badlogic.gdx.utils.Array<java.lang.Runnable> |
executedRunnables |
protected AndroidFiles |
files |
protected boolean |
firstResume |
protected AndroidGraphics |
graphics |
protected android.os.Handler |
handler |
protected AndroidInput |
input |
protected com.badlogic.gdx.utils.SnapshotArray<com.badlogic.gdx.LifecycleListener> |
lifecycleListeners |
protected com.badlogic.gdx.ApplicationListener |
listener |
protected int |
logLevel |
protected AndroidNet |
net |
protected com.badlogic.gdx.utils.Array<java.lang.Runnable> |
runnables |
START_CONTINUATION_MASK, START_FLAG_REDELIVERY, START_FLAG_RETRY, START_NOT_STICKY, START_REDELIVER_INTENT, START_STICKY, START_STICKY_COMPATIBILITY, STOP_FOREGROUND_DETACH, STOP_FOREGROUND_REMOVEACCESSIBILITY_SERVICE, ACCOUNT_SERVICE, ACTIVITY_SERVICE, ALARM_SERVICE, APP_OPS_SERVICE, APPWIDGET_SERVICE, AUDIO_SERVICE, BATTERY_SERVICE, BIND_ABOVE_CLIENT, BIND_ADJUST_WITH_ACTIVITY, BIND_ALLOW_OOM_MANAGEMENT, BIND_AUTO_CREATE, BIND_DEBUG_UNBIND, BIND_EXTERNAL_SERVICE, BIND_IMPORTANT, BIND_NOT_FOREGROUND, BIND_WAIVE_PRIORITY, BLUETOOTH_SERVICE, CAMERA_SERVICE, CAPTIONING_SERVICE, CARRIER_CONFIG_SERVICE, CLIPBOARD_SERVICE, COMPANION_DEVICE_SERVICE, CONNECTIVITY_SERVICE, CONSUMER_IR_SERVICE, CONTEXT_IGNORE_SECURITY, CONTEXT_INCLUDE_CODE, CONTEXT_RESTRICTED, CROSS_PROFILE_APPS_SERVICE, DEVICE_POLICY_SERVICE, DISPLAY_SERVICE, DOWNLOAD_SERVICE, DROPBOX_SERVICE, EUICC_SERVICE, FINGERPRINT_SERVICE, HARDWARE_PROPERTIES_SERVICE, INPUT_METHOD_SERVICE, INPUT_SERVICE, IPSEC_SERVICE, JOB_SCHEDULER_SERVICE, KEYGUARD_SERVICE, LAUNCHER_APPS_SERVICE, LAYOUT_INFLATER_SERVICE, LOCATION_SERVICE, MEDIA_PROJECTION_SERVICE, MEDIA_ROUTER_SERVICE, MEDIA_SESSION_SERVICE, MIDI_SERVICE, MODE_APPEND, MODE_ENABLE_WRITE_AHEAD_LOGGING, MODE_MULTI_PROCESS, MODE_NO_LOCALIZED_COLLATORS, MODE_PRIVATE, MODE_WORLD_READABLE, MODE_WORLD_WRITEABLE, NETWORK_STATS_SERVICE, NFC_SERVICE, NOTIFICATION_SERVICE, NSD_SERVICE, POWER_SERVICE, PRINT_SERVICE, RECEIVER_VISIBLE_TO_INSTANT_APPS, RESTRICTIONS_SERVICE, SEARCH_SERVICE, SENSOR_SERVICE, SHORTCUT_SERVICE, STORAGE_SERVICE, STORAGE_STATS_SERVICE, SYSTEM_HEALTH_SERVICE, TELECOM_SERVICE, TELEPHONY_SERVICE, TELEPHONY_SUBSCRIPTION_SERVICE, TEXT_CLASSIFICATION_SERVICE, TEXT_SERVICES_MANAGER_SERVICE, TV_INPUT_SERVICE, UI_MODE_SERVICE, USAGE_STATS_SERVICE, USB_SERVICE, USER_SERVICE, VIBRATOR_SERVICE, WALLPAPER_SERVICE, WIFI_AWARE_SERVICE, WIFI_P2P_SERVICE, WIFI_RTT_RANGING_SERVICE, WIFI_SERVICE, WINDOW_SERVICEMINIMUM_SDK| Constructor and Description |
|---|
AndroidDaydream() |
| Modifier and Type | Method and Description |
|---|---|
void |
addLifecycleListener(com.badlogic.gdx.LifecycleListener listener) |
AndroidAudio |
createAudio(android.content.Context context,
AndroidApplicationConfiguration config)
Returns the AndroidAudio to be used by the application
|
AndroidInput |
createInput(com.badlogic.gdx.Application activity,
android.content.Context context,
java.lang.Object view,
AndroidApplicationConfiguration config)
Returns the AndroidInput to be used by the application
|
protected android.widget.FrameLayout.LayoutParams |
createLayoutParams() |
protected void |
createWakeLock(boolean use) |
void |
debug(java.lang.String tag,
java.lang.String message) |
void |
debug(java.lang.String tag,
java.lang.String message,
java.lang.Throwable exception) |
void |
error(java.lang.String tag,
java.lang.String message) |
void |
error(java.lang.String tag,
java.lang.String message,
java.lang.Throwable exception) |
void |
exit() |
com.badlogic.gdx.ApplicationListener |
getApplicationListener() |
com.badlogic.gdx.ApplicationLogger |
getApplicationLogger() |
android.view.Window |
getApplicationWindow()
Returns the Window associated with the application
|
com.badlogic.gdx.Audio |
getAudio() |
com.badlogic.gdx.utils.Clipboard |
getClipboard() |
android.content.Context |
getContext()
The application or activity context
|
com.badlogic.gdx.utils.Array<java.lang.Runnable> |
getExecutedRunnables()
The currently executed runnables
|
com.badlogic.gdx.Files |
getFiles() |
com.badlogic.gdx.Graphics |
getGraphics() |
android.os.Handler |
getHandler()
Returns the Handler object created by the application
|
AndroidInput |
getInput()
Returns the
AndroidInput object associated with this AndroidApplicationBase |
long |
getJavaHeap() |
com.badlogic.gdx.utils.SnapshotArray<com.badlogic.gdx.LifecycleListener> |
getLifecycleListeners()
Returns the
LifecycleListener array associated with this AndroidApplicationBase |
int |
getLogLevel() |
long |
getNativeHeap() |
com.badlogic.gdx.Net |
getNet() |
com.badlogic.gdx.Preferences |
getPreferences(java.lang.String name) |
com.badlogic.gdx.utils.Array<java.lang.Runnable> |
getRunnables()
A set of usable runnables
|
com.badlogic.gdx.Application.ApplicationType |
getType() |
int |
getVersion() |
protected void |
hideStatusBar(AndroidApplicationConfiguration config) |
void |
initialize(com.badlogic.gdx.ApplicationListener listener)
This method has to be called in the Activity#onCreate(Bundle) method.
|
void |
initialize(com.badlogic.gdx.ApplicationListener listener,
AndroidApplicationConfiguration config)
This method has to be called in the Activity#onCreate(Bundle) method.
|
android.view.View |
initializeForView(com.badlogic.gdx.ApplicationListener listener)
This method has to be called in the Activity#onCreate(Bundle) method.
|
android.view.View |
initializeForView(com.badlogic.gdx.ApplicationListener listener,
AndroidApplicationConfiguration config)
This method has to be called in the Activity#onCreate(Bundle) method.
|
void |
log(java.lang.String tag,
java.lang.String message) |
void |
log(java.lang.String tag,
java.lang.String message,
java.lang.Throwable exception) |
void |
onConfigurationChanged(android.content.res.Configuration config) |
void |
onDetachedFromWindow() |
void |
onDreamingStarted() |
void |
onDreamingStopped() |
void |
postRunnable(java.lang.Runnable runnable) |
void |
removeLifecycleListener(com.badlogic.gdx.LifecycleListener listener) |
void |
runOnUiThread(java.lang.Runnable runnable)
Method signifies an intent of the caller to execute some action on the UI Thread.
|
void |
setApplicationLogger(com.badlogic.gdx.ApplicationLogger applicationLogger) |
void |
setLogLevel(int logLevel) |
void |
useImmersiveMode(boolean b)
Activates Android 4.4 KitKat's 'Immersive Mode' feature.
|
addContentView, dispatchGenericMotionEvent, dispatchKeyEvent, dispatchKeyShortcutEvent, dispatchPopulateAccessibilityEvent, dispatchTouchEvent, dispatchTrackballEvent, dump, findViewById, finish, getWindow, getWindowManager, isFullscreen, isInteractive, isScreenBright, onActionModeFinished, onActionModeStarted, onAttachedToWindow, onBind, onContentChanged, onCreate, onCreatePanelMenu, onCreatePanelView, onDestroy, onMenuItemSelected, onMenuOpened, onPanelClosed, onPreparePanel, onSearchRequested, onSearchRequested, onWakeUp, onWindowAttributesChanged, onWindowFocusChanged, onWindowStartingActionMode, onWindowStartingActionMode, requireViewById, setContentView, setContentView, setContentView, setFullscreen, setInteractive, setScreenBright, wakeUpgetApplication, onLowMemory, onRebind, onStart, onStartCommand, onTaskRemoved, onTrimMemory, onUnbind, startForeground, stopForeground, stopForeground, stopSelf, stopSelf, stopSelfResultattachBaseContext, bindService, checkCallingOrSelfPermission, checkCallingOrSelfUriPermission, checkCallingPermission, checkCallingUriPermission, checkPermission, checkSelfPermission, checkUriPermission, checkUriPermission, clearWallpaper, createConfigurationContext, createContextForSplit, createDeviceProtectedStorageContext, createDisplayContext, createPackageContext, databaseList, deleteDatabase, deleteFile, deleteSharedPreferences, enforceCallingOrSelfPermission, enforceCallingOrSelfUriPermission, enforceCallingPermission, enforceCallingUriPermission, enforcePermission, enforceUriPermission, enforceUriPermission, fileList, getApplicationContext, getApplicationInfo, getAssets, getBaseContext, getCacheDir, getClassLoader, getCodeCacheDir, getContentResolver, getDatabasePath, getDataDir, getDir, getExternalCacheDir, getExternalCacheDirs, getExternalFilesDir, getExternalFilesDirs, getExternalMediaDirs, getFilesDir, getFileStreamPath, getMainExecutor, getMainLooper, getNoBackupFilesDir, getObbDir, getObbDirs, getPackageCodePath, getPackageManager, getPackageName, getPackageResourcePath, getResources, getSharedPreferences, getSystemService, getSystemServiceName, getTheme, getWallpaper, getWallpaperDesiredMinimumHeight, getWallpaperDesiredMinimumWidth, grantUriPermission, isDeviceProtectedStorage, isRestricted, moveDatabaseFrom, moveSharedPreferencesFrom, openFileInput, openFileOutput, openOrCreateDatabase, openOrCreateDatabase, peekWallpaper, registerReceiver, registerReceiver, registerReceiver, registerReceiver, removeStickyBroadcast, removeStickyBroadcastAsUser, revokeUriPermission, revokeUriPermission, sendBroadcast, sendBroadcast, sendBroadcastAsUser, sendBroadcastAsUser, sendOrderedBroadcast, sendOrderedBroadcast, sendOrderedBroadcastAsUser, sendStickyBroadcast, sendStickyBroadcastAsUser, sendStickyOrderedBroadcast, sendStickyOrderedBroadcastAsUser, setTheme, setWallpaper, setWallpaper, startActivities, startActivities, startActivity, startActivity, startForegroundService, startInstrumentation, startIntentSender, startIntentSender, startService, stopService, unbindService, unregisterReceivergetColor, getColorStateList, getDrawable, getString, getString, getSystemService, getText, obtainStyledAttributes, obtainStyledAttributes, obtainStyledAttributes, obtainStyledAttributes, registerComponentCallbacks, unregisterComponentCallbacksclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitgetWindowManager, startActivityprotected AndroidGraphics graphics
protected AndroidInput input
protected AndroidAudio audio
protected AndroidFiles files
protected AndroidNet net
protected AndroidClipboard clipboard
protected com.badlogic.gdx.ApplicationListener listener
protected android.os.Handler handler
protected boolean firstResume
protected final com.badlogic.gdx.utils.Array<java.lang.Runnable> runnables
protected final com.badlogic.gdx.utils.Array<java.lang.Runnable> executedRunnables
protected final com.badlogic.gdx.utils.SnapshotArray<com.badlogic.gdx.LifecycleListener> lifecycleListeners
protected int logLevel
protected com.badlogic.gdx.ApplicationLogger applicationLogger
public void initialize(com.badlogic.gdx.ApplicationListener listener)
AndroidApplicationConfiguration.listener - the ApplicationListener implementing the program logicpublic void initialize(com.badlogic.gdx.ApplicationListener listener,
AndroidApplicationConfiguration config)
AndroidApplicationConfiguration instance.listener - the ApplicationListener implementing the program logicconfig - the AndroidApplicationConfiguration, defining various settings of the application (use accelerometer,
etc.).public android.view.View initializeForView(com.badlogic.gdx.ApplicationListener listener)
AndroidApplicationConfiguration.
Note: you have to add the returned view to your layout!
listener - the ApplicationListener implementing the program logicGLSurfaceView of the applicationpublic android.view.View initializeForView(com.badlogic.gdx.ApplicationListener listener,
AndroidApplicationConfiguration config)
AndroidApplicationConfiguration instance.
Note: you have to add the returned view to your layout!
listener - the ApplicationListener implementing the program logicconfig - the AndroidApplicationConfiguration, defining various settings of the application (use accelerometer,
etc.).GLSurfaceView of the applicationprotected android.widget.FrameLayout.LayoutParams createLayoutParams()
protected void createWakeLock(boolean use)
protected void hideStatusBar(AndroidApplicationConfiguration config)
public void onDreamingStopped()
onDreamingStopped in class android.service.dreams.DreamServicepublic void onDreamingStarted()
onDreamingStarted in class android.service.dreams.DreamServicepublic void onDetachedFromWindow()
onDetachedFromWindow in interface android.view.Window.CallbackonDetachedFromWindow in class android.service.dreams.DreamServicepublic com.badlogic.gdx.ApplicationListener getApplicationListener()
getApplicationListener in interface com.badlogic.gdx.Applicationpublic com.badlogic.gdx.Audio getAudio()
getAudio in interface com.badlogic.gdx.Applicationpublic com.badlogic.gdx.Files getFiles()
getFiles in interface com.badlogic.gdx.Applicationpublic com.badlogic.gdx.Graphics getGraphics()
getGraphics in interface com.badlogic.gdx.Applicationpublic AndroidInput getInput()
AndroidApplicationBaseAndroidInput object associated with this AndroidApplicationBasegetInput in interface com.badlogic.gdx.ApplicationgetInput in interface AndroidApplicationBaseAndroidInput objectpublic com.badlogic.gdx.Net getNet()
getNet in interface com.badlogic.gdx.Applicationpublic com.badlogic.gdx.Application.ApplicationType getType()
getType in interface com.badlogic.gdx.Applicationpublic int getVersion()
getVersion in interface com.badlogic.gdx.Applicationpublic long getJavaHeap()
getJavaHeap in interface com.badlogic.gdx.Applicationpublic long getNativeHeap()
getNativeHeap in interface com.badlogic.gdx.Applicationpublic com.badlogic.gdx.Preferences getPreferences(java.lang.String name)
getPreferences in interface com.badlogic.gdx.Applicationpublic com.badlogic.gdx.utils.Clipboard getClipboard()
getClipboard in interface com.badlogic.gdx.Applicationpublic void postRunnable(java.lang.Runnable runnable)
postRunnable in interface com.badlogic.gdx.Applicationpublic void onConfigurationChanged(android.content.res.Configuration config)
onConfigurationChanged in interface android.content.ComponentCallbacksonConfigurationChanged in class android.app.Servicepublic void exit()
exit in interface com.badlogic.gdx.Applicationpublic void debug(java.lang.String tag,
java.lang.String message)
debug in interface com.badlogic.gdx.Applicationpublic void debug(java.lang.String tag,
java.lang.String message,
java.lang.Throwable exception)
debug in interface com.badlogic.gdx.Applicationpublic void log(java.lang.String tag,
java.lang.String message)
log in interface com.badlogic.gdx.Applicationpublic void log(java.lang.String tag,
java.lang.String message,
java.lang.Throwable exception)
log in interface com.badlogic.gdx.Applicationpublic void error(java.lang.String tag,
java.lang.String message)
error in interface com.badlogic.gdx.Applicationpublic void error(java.lang.String tag,
java.lang.String message,
java.lang.Throwable exception)
error in interface com.badlogic.gdx.Applicationpublic void setLogLevel(int logLevel)
setLogLevel in interface com.badlogic.gdx.Applicationpublic int getLogLevel()
getLogLevel in interface com.badlogic.gdx.Applicationpublic void setApplicationLogger(com.badlogic.gdx.ApplicationLogger applicationLogger)
setApplicationLogger in interface com.badlogic.gdx.Applicationpublic com.badlogic.gdx.ApplicationLogger getApplicationLogger()
getApplicationLogger in interface com.badlogic.gdx.Applicationpublic void addLifecycleListener(com.badlogic.gdx.LifecycleListener listener)
addLifecycleListener in interface com.badlogic.gdx.Applicationpublic void removeLifecycleListener(com.badlogic.gdx.LifecycleListener listener)
removeLifecycleListener in interface com.badlogic.gdx.Applicationpublic android.content.Context getContext()
AndroidApplicationBasegetContext in interface AndroidApplicationBaseContextpublic com.badlogic.gdx.utils.Array<java.lang.Runnable> getRunnables()
AndroidApplicationBasegetRunnables in interface AndroidApplicationBaseRunnable arraypublic com.badlogic.gdx.utils.Array<java.lang.Runnable> getExecutedRunnables()
AndroidApplicationBasegetExecutedRunnables in interface AndroidApplicationBaseRunnable arraypublic com.badlogic.gdx.utils.SnapshotArray<com.badlogic.gdx.LifecycleListener> getLifecycleListeners()
AndroidApplicationBaseLifecycleListener array associated with this AndroidApplicationBasegetLifecycleListeners in interface AndroidApplicationBaseLifecycleListener'spublic android.view.Window getApplicationWindow()
AndroidApplicationBasegetApplicationWindow in interface AndroidApplicationBaseWindow associated with the applicationpublic android.os.Handler getHandler()
AndroidApplicationBasegetHandler in interface AndroidApplicationBaseHandler object created by the applicationpublic AndroidAudio createAudio(android.content.Context context, AndroidApplicationConfiguration config)
AndroidApplicationBasecreateAudio in interface AndroidApplicationBaseAndroidAudiopublic AndroidInput createInput(com.badlogic.gdx.Application activity, android.content.Context context, java.lang.Object view, AndroidApplicationConfiguration config)
AndroidApplicationBasecreateInput in interface AndroidApplicationBaseAndroidInputpublic void runOnUiThread(java.lang.Runnable runnable)
AndroidApplicationBaserunOnUiThread in interface AndroidApplicationBaserunnable - The runnable to be executedpublic void useImmersiveMode(boolean b)
AndroidApplicationBaseuseImmersiveMode in interface AndroidApplicationBaseb - Whether or not to use immersive mode