libgdx API

com.badlogic.gdx.backends.android
Class AndroidApplicationConfiguration

java.lang.Object
  extended by com.badlogic.gdx.backends.android.AndroidApplicationConfiguration

public class AndroidApplicationConfiguration
extends java.lang.Object

Class defining the configuration of an AndroidApplication. Allows you to disable the use of the accelerometer to save battery among other things.

Author:
mzechner

Field Summary
 int a
          number of bits per color channel
 int b
          number of bits per color channel
 int depth
          number of bits for depth and stencil buffer
 int g
          number of bits per color channel
 boolean getTouchEventsForLiveWallpaper
          if the app is a livewallpaper, whether it should get full touch events
 boolean hideStatusBar
          hide status bar buttons on Android 4.x and higher (API 14+).
 int maxSimultaneousSounds
          the maximum number of Sound instances that can be played simultaneously, sets the corresponding SoundPool constructor argument.
 int numSamples
          number of samples for CSAA/MSAA, 2 is a good value
 int r
          number of bits per color channel
 ResolutionStrategy resolutionStrategy
          the ResolutionStrategy.
 int stencil
          number of bits for depth and stencil buffer
 int touchSleepTime
          the time in milliseconds to sleep after each event in the touch handler, set this to 16ms to get rid of touch flooding on pre Android 2.0 devices.
 boolean useAccelerometer
          whether to use the accelerometer.
 boolean useCompass
          whether to use the compass.
 boolean useGL20
          whether to use OpenGL ES 2.0 or not.
 boolean useWakelock
          whether to use a WakeLock or not.
 
Constructor Summary
AndroidApplicationConfiguration()
           
 
Method Summary
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

useGL20

public boolean useGL20
whether to use OpenGL ES 2.0 or not. default: false


r

public int r
number of bits per color channel


g

public int g
number of bits per color channel


b

public int b
number of bits per color channel


a

public int a
number of bits per color channel


depth

public int depth
number of bits for depth and stencil buffer


stencil

public int stencil
number of bits for depth and stencil buffer


numSamples

public int numSamples
number of samples for CSAA/MSAA, 2 is a good value


useAccelerometer

public boolean useAccelerometer
whether to use the accelerometer. default: true


useCompass

public boolean useCompass
whether to use the compass. default: true


touchSleepTime

public int touchSleepTime
the time in milliseconds to sleep after each event in the touch handler, set this to 16ms to get rid of touch flooding on pre Android 2.0 devices. default: 0


useWakelock

public boolean useWakelock
whether to use a WakeLock or not. In case this is true you have to add the permission "android.permission.WAKE_LOCK" to your manifest file. default: false


hideStatusBar

public boolean hideStatusBar
hide status bar buttons on Android 4.x and higher (API 14+). Doesn't work if "android:targetSdkVersion" less 11 or if API less 14. default: false


maxSimultaneousSounds

public int maxSimultaneousSounds
the maximum number of Sound instances that can be played simultaneously, sets the corresponding SoundPool constructor argument.


resolutionStrategy

public ResolutionStrategy resolutionStrategy
the ResolutionStrategy. default: FillResolutionStrategy


getTouchEventsForLiveWallpaper

public boolean getTouchEventsForLiveWallpaper
if the app is a livewallpaper, whether it should get full touch events

Constructor Detail

AndroidApplicationConfiguration

public AndroidApplicationConfiguration()

libgdx API

Copyright 2010 Mario Zechner (contact@badlogicgames.com), Nathan Sweet (admin@esotericsoftware.com)