List of usage examples for com.badlogic.gdx.backends.android AndroidApplicationConfiguration AndroidApplicationConfiguration
AndroidApplicationConfiguration
From source file:at.juggle.games.counting.AndroidLauncher.java
License:Apache License
@Override protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); AndroidApplicationConfiguration config = new AndroidApplicationConfiguration(); config.useImmersiveMode = true;//from ww w . j av a2 s.co m tts = new TextToSpeech(this, new TextToSpeech.OnInitListener() { @Override public void onInit(int status) { // TODO Auto-generated method stub if (status == TextToSpeech.SUCCESS) { int result = tts.setLanguage(Locale.GERMAN); if (result == TextToSpeech.LANG_MISSING_DATA || result == TextToSpeech.LANG_NOT_SUPPORTED) { Log.e("error", "This Language is not supported"); } } else Log.e("error", "Initilization Failed!"); } }); initialize(new CountingGame(new SpeechInterface() { @Override public void speakOut(String text) { tts.speak(text, TextToSpeech.QUEUE_FLUSH, null, text + System.currentTimeMillis()); } }), config); }
From source file:at.juggle.games.memory.MemoryGameActivity.java
License:Apache License
@Override public void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); AndroidApplicationConfiguration cfg = new AndroidApplicationConfiguration(); initialize(new MemoryGame(), cfg); }
From source file:at.therefactory.jewelthief.AndroidLauncher.java
License:Open Source License
@Override protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); AndroidApplicationConfiguration config = new AndroidApplicationConfiguration(); config.useAccelerometer = false;/* w w w. ja v a 2 s . c o m*/ config.useCompass = false; config.useGyroscope = false; config.useWakelock = true; config.hideStatusBar = true; config.useImmersiveMode = true; initialize(new JewelThief(this), config); }
From source file:be.ac.ucl.lfsab1509.bouboule.MainActivity.java
License:Open Source License
@Override public void onCreate(final Bundle savedInstanceState) { super.onCreate(savedInstanceState); AndroidApplicationConfiguration cfg = new AndroidApplicationConfiguration(); //cfg.useGL20 = false; cfg.useGL20 = true;/*from ww w. j a va2s .c o m*/ cfg.useAccelerometer = true; cfg.useCompass = false; getWindow().addFlags(LayoutParams.FLAG_KEEP_SCREEN_ON); // to not lock the screen if (bAndroidMenus) GlobalSettings.MENUS = new MyAndroidMenus(this); game = new MyGame(); initialize(game, cfg); if (bAndroidMenus) { game.init(false); GlobalSettings.MENUS.launchInitMenu(); } }
From source file:br.com.raphaelbruno.game.zombieinvaders.vr.ZombieInvadersVR.java
License:Apache License
@Override protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); if (savedInstanceState == null) { AssetRepository.getInstance().dispose(); sharedPreferences = getPreferences(Context.MODE_PRIVATE); config = new AndroidApplicationConfiguration(); config.numSamples = 1;//from ww w. j av a 2 s. c o m gameBase = new GameBase(this); gameBase.highScore = sharedPreferences.getInt(getString(R.string.saved_high_score), 0); vibrator = (Vibrator) getSystemService(Context.VIBRATOR_SERVICE); initialize(gameBase, config); } }
From source file:bunzosteele.heroesemblem.android.AndroidLauncher.java
@Override protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); AndroidApplicationConfiguration config = new AndroidApplicationConfiguration(); this.game = new HeroesEmblem(this, this); View gameView = initializeForView(this.game, config); setupAds();//from w ww .j av a 2 s . c o m RelativeLayout layout = new RelativeLayout(this); layout.addView(gameView, ViewGroup.LayoutParams.MATCH_PARENT, ViewGroup.LayoutParams.MATCH_PARENT); setContentView(layout); GoogleAnalytics googleAnalytics = GoogleAnalytics.getInstance(this); analytics = googleAnalytics.newTracker(PROPERTY_ID); analytics.enableAdvertisingIdCollection(true); apiClient = new GoogleApiClient.Builder(this).addConnectionCallbacks(this) .addOnConnectionFailedListener(this).addApi(Plus.API).addScope(Plus.SCOPE_PLUS_LOGIN) .addApi(Games.API).addScope(Games.SCOPE_GAMES).build(); apiClient.connect(); isResolvingConnectionFailure = false; }
From source file:ca.viaware.game.android.AndroidLauncher.java
License:Open Source License
@Override protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); AndroidApplicationConfiguration config = new AndroidApplicationConfiguration(); initialize(new ProjectSierra(), config); }
From source file:cmnworks.com.angrybee.android.AndroidLauncher.java
License:Open Source License
@Override protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); AndroidApplicationConfiguration config = new AndroidApplicationConfiguration(); AngryBee angryBee = new AngryBee(); initialize(angryBee, config);//from w w w . ja v a2s. co m }
From source file:com.agateau.pixelwheels.android.AndroidLauncher.java
License:Apache License
@Override protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); AndroidApplicationConfiguration config = new AndroidApplicationConfiguration(); config.useImmersiveMode = true;// ww w . j a v a 2s . c o m config.hideStatusBar = true; FileUtils.appName = "tinywheels"; initialize(new PwGame(), config); Gdx.input.setCatchBackKey(true); }
From source file:com.andgate.pokeadot.AndroidLauncher.java
License:Open Source License
@Override public void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); AndroidApplicationConfiguration cfg = new AndroidApplicationConfiguration(); cfg.useAccelerometer = false;//from w w w .j a va2 s. com cfg.useCompass = false; cfg.hideStatusBar = true; cfg.numSamples = 16; // Do the stuff that initialize() would do for you requestWindowFeature(Window.FEATURE_NO_TITLE); getWindow().setFlags(WindowManager.LayoutParams.FLAG_FULLSCREEN, WindowManager.LayoutParams.FLAG_FULLSCREEN); getWindow().clearFlags(WindowManager.LayoutParams.FLAG_FORCE_NOT_FULLSCREEN); RelativeLayout layout = new RelativeLayout(this); RelativeLayout.LayoutParams params = new RelativeLayout.LayoutParams( RelativeLayout.LayoutParams.MATCH_PARENT, RelativeLayout.LayoutParams.MATCH_PARENT); layout.setLayoutParams(params); AdView admobView = createAdView(); layout.addView(admobView); View gameView = createGameView(cfg); layout.addView(gameView); setContentView(layout); if (BuildConfig.FREE) { startAdvertising(admobView); } }