Java 类com.badlogic.gdx.backends.android.AndroidApplicationConfiguration 实例源码

项目:feup-lpoo-armadillo    文件:AndroidLauncher.java   
/**
 * {@inheritDoc}
 */
@Override
protected void onCreate(Bundle savedInstanceState) {
    super.onCreate(savedInstanceState);

    gameHelper = new GameHelper(this, GameHelper.CLIENT_GAMES);

    AndroidApplicationConfiguration config = new AndroidApplicationConfiguration();
    config.hideStatusBar = true;
    config.useAccelerometer = true;

    gameHelper.setup(this);

    playServices = new PlayServices(this, gameHelper);

    initialize(new Armadillo(playServices), config);
}
项目:penguins-in-space    文件:AndroidLauncher.java   
@Override
protected void onCreate(Bundle savedInstanceState) {
    super.onCreate(savedInstanceState);
    if (LeakCanary.isInAnalyzerProcess(this)) {
        // This process is dedicated to LeakCanary for heap analysis.
        // You should not init your app in this process.
        return;
    }
    LeakCanary.install(this.getApplication());
    playService = new AndroidNetworkService(this);
    no.ntnu.tdt4240.asteroids.service.ISettingsService settingsService = new AndroidSettingsService(this.getApplicationContext());
    AndroidApplicationConfiguration config = new AndroidApplicationConfiguration();
    config.useCompass = false;
    config.useAccelerometer = false;
    config.useImmersiveMode = true;
    config.useWakelock = true;
    initialize(new Asteroids(playService, settingsService), config);
    playService.setup();
}
项目:fluffybalance    文件:AndroidLauncher.java   
@Override
public void onCreate(Bundle savedInstanceState) {
    super.onCreate(savedInstanceState);

    // Initialize the Mobile Ads SDK.
    MobileAds.initialize(this, APP_ID);

    AndroidApplicationConfiguration cfg = new AndroidApplicationConfiguration();
    cfg.useGyroscope = false;
    cfg.useCompass = true;
    cfg.useAccelerometer = true;

    // 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);
    startAdvertising(admobView);
}
项目:Les-Chroniques-de-Norwand    文件:AndroidLauncher.java   
@Override
protected void onCreate (Bundle savedInstanceState) {
    super.onCreate(savedInstanceState);
       /*requestWindowFeature(Window.FEATURE_NO_TITLE);
       getWindow().setFlags(WindowManager.LayoutParams.FLAG_FULLSCREEN, WindowManager.LayoutParams.FLAG_FULLSCREEN);*/

    AndroidApplicationConfiguration config = new AndroidApplicationConfiguration();

       if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.LOLLIPOP) {
           Bitmap bm = BitmapFactory.decodeResource(getResources(), R.drawable.ic_launcher);
           ActivityManager.TaskDescription td = new ActivityManager.TaskDescription("Les Chroniques De Norwand", bm, Color.parseColor("#30346D"));

           setTaskDescription(td);
           bm.recycle();
       }

       config.useImmersiveMode = true;

    initialize(new MainGame(""), config);
}
项目:ZombieInvadersVR    文件:ZombieInvadersVR.java   
@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;

     gameBase = new GameBase(this);
     gameBase.highScore = sharedPreferences.getInt(getString(R.string.saved_high_score), 0);
     vibrator = (Vibrator) getSystemService(Context.VIBRATOR_SERVICE);

     initialize(gameBase, config);
    }
}
项目:libgdx-get-image    文件:AndroidLauncher.java   
@Override
    protected void onCreate (Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        int res = ContextCompat.checkSelfPermission(this.getContext(), Manifest.permission.WRITE_EXTERNAL_STORAGE);
        if(res != PackageManager.PERMISSION_GRANTED) {
            ActivityCompat.requestPermissions(
                    this,
                    new String[] { Manifest.permission.WRITE_EXTERNAL_STORAGE },
                    0);
        }
        AndroidApplicationConfiguration config = new AndroidApplicationConfiguration();
        config.disableAudio = true;
        config.useWakelock = true;
        config.useCompass = false;
        config.useAccelerometer = false;
        config.useImmersiveMode = true;
//      config.hideStatusBar = true;
        config.useGL30 = true;
        Main main = new Main();
        main.fragmentShaderPath = Environment.getExternalStorageDirectory().getAbsolutePath() + "/shader.frag";
        initialize(main, config);
    }
项目:thunderboard-android    文件:DemoMotionActivity.java   
@Override
public void initControls() {
    gdxAdapter.setOnSceneLoadedListener(new DemoMotionGdxAdapter.OnSceneLoadedListener() {
        @Override
        public void onSceneLoaded() {
            sceneLoaded = true;
            runOnUiThread(new Runnable() {
                @Override
                public void run() {
                    presenter.setViewListener(DemoMotionActivity.this, deviceAddress);
                }
            });
        }
    });

    AndroidApplicationConfiguration config = new AndroidApplicationConfiguration();
    config.disableAudio = true;
    config.hideStatusBar = false;
    config.useAccelerometer = false;
    config.useCompass = false;
    config.useImmersiveMode = false;
    config.useWakelock = false;

    gdx3dView = initializeForView(gdxAdapter, config);
    carAnimationHolder.addView(gdx3dView);
}
项目:VuforiaLibGDX    文件:ArActivity.java   
@Override
protected void onCreate(Bundle savedInstanceState) {
    super.onCreate(savedInstanceState);
    setContentView(R.layout.activity_ar);
    Log.d(LOGTAG, "onCreate");

    session = new AppSession(this);
    session.initAR(this, ActivityInfo.SCREEN_ORIENTATION_PORTRAIT);

    mRenderer = new VuforiaRenderer(session);

    FrameLayout container = (FrameLayout) findViewById(R.id.ar_container);

    AndroidApplicationConfiguration config = new AndroidApplicationConfiguration();
    config.useAccelerometer = false;
    config.useCompass = false;
    //config.useGL20 = true;

    mEngine = new Engine(mRenderer);
    View glView = initializeForView(mEngine, config);

    container.addView(glView);

}
项目:GdxVR-Sample-1    文件:AndroidLauncher.java   
/** Инициализация приложения */
@Override
protected void onCreate (Bundle savedInstanceState) {
    super.onCreate(savedInstanceState);
    AndroidApplicationConfiguration config = new AndroidApplicationConfiguration();

    // Запрет на отключение экрана и использование датчиков имплементацией libgdx
    config.useWakelock = true;
    config.useAccelerometer = false;
    config.useGyroscope = false;
    config.useCompass = false;
    config.numSamples = 2;

    // Создание своего листенера данных с датчиков (поэтому useAccelerometer и т.п. не нужны)
    vrSensorManagerAndroid = new VRSensorManagerAndroid(this.getContext());
    initialize(new GdxVR(vrSensorManagerAndroid), config);
}
项目:cachebox3.0    文件:AndroidLauncherfragment.java   
@Override
public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) {
    super.onCreate(savedInstanceState);

    this.setLogLevel(100);

    //initialize platform bitmap factory
    org.oscim.android.canvas.AndroidGraphics.init();

    GdxAssets.init("");
    GLAdapter.init(new AndroidGL());

    AndroidApplicationConfiguration config = new AndroidApplicationConfiguration();
    config.stencil = 8;
    config.numSamples = 2;
    new SharedLibraryLoader().load("vtm-jni");

    View view = initializeForView(new CacheboxMain(), config);

    //initialize platform connector
    PlatformConnector.init(new AndroidPlatformConnector(this));

    return view;
}
项目:dice-heroes    文件:MainActivity.java   
/**
 * Called when the activity is first created.
 */
@Override
public void onCreate(Bundle savedInstanceState) {
    super.onCreate(savedInstanceState);

    mainHandler = new Handler(getMainLooper());

    DisplayMetrics metrics = new DisplayMetrics();
    getWindowManager().getDefaultDisplay().getMetrics(metrics);

    AndroidApplicationConfiguration config = new AndroidApplicationConfiguration();
    config.hideStatusBar = true;
    config.useAccelerometer = false;
    config.useCompass = false;

    final AndroidMobileApi api = new AndroidMobileApi(this);
    initialize(new DiceHeroes(api), config);
    gameServicesHelper = new GameServicesHelper(this);
    purchaseHelper = new PurchaseHelper(this, api);
}
项目:Fruit-Destroyer    文件:AndroidLauncher.java   
@Override
protected void onCreate (Bundle savedInstanceState)
{
    super.onCreate(savedInstanceState);
    AndroidApplicationConfiguration config = new AndroidApplicationConfiguration();
    config.useImmersiveMode = true;
    gameHelper = new GameHelper(this, GameHelper.CLIENT_GAMES);
    gameHelper.enableDebugLog(false);

    GameHelper.GameHelperListener gameHelperListener = new GameHelper.GameHelperListener()
    {
        @Override
        public void onSignInFailed(){ }

        @Override
        public void onSignInSucceeded(){ }
    };

    gameHelper.setup(gameHelperListener);
    AdBuddiz.setPublisherKey("9bfbf1bb-a9e2-4ce5-8dfd-f25455ceb714");
    AdBuddiz.cacheAds(this);
    initialize(new Application(this, this, this, Application.Platform.ANDROID), config);
    setupAds();
}
项目:ggvm    文件:AndroidLauncher.java   
@Override
protected void onCreate (Bundle savedInstanceState) {
    super.onCreate(savedInstanceState);
    AndroidApplicationConfiguration config = new AndroidApplicationConfiguration();
    config.useAccelerometer = false;
    config.useCompass = false;
    config.useGyroscope = false;
    config.useWakelock = false;
    initialize(new GGVmApplication(GameModuleProvider.provideGameModule(), MobileMenu.class, TouchInputProcessor.class), config);
}
项目:NoRiskNoFun    文件:AndroidLauncher.java   
@Override
protected void onCreate (Bundle savedInstanceState) {
    super.onCreate(savedInstanceState);


    AndroidApplicationConfiguration config = new AndroidApplicationConfiguration();
    Log.d("ANDROID_Launcher","initialize");
    initialize(new NoRiskNoFun(getIpAddress()), config);
}
项目:FlappyChapa    文件:AndroidLauncher.java   
@Override
protected void onCreate (Bundle savedInstanceState) {
    super.onCreate(savedInstanceState);
    AndroidApplicationConfiguration config = new AndroidApplicationConfiguration();
       //config.addIcon("chapaicon.png", Files.FileType.Internal);
    initialize(new FlappyChapa(), config);
}
项目:drc-sim-client    文件:AndroidLauncher.java   
@Override
protected void onCreate (Bundle savedInstanceState) {
    super.onCreate(savedInstanceState);
    AndroidApplicationConfiguration config = new AndroidApplicationConfiguration();
    config.useImmersiveMode = true;
    config.useWakelock = true;
    Control[] controls = new Control[] {new ControlTouch(), new ControlController()};
    ArgumentParser args = new ArgumentParser(new String[]{"-f"});
    initialize(new Client(controls, new Audio(), args), config);
}
项目:Flappy-Baranus    文件:AndroidLauncher.java   
@Override
protected void onCreate (Bundle savedInstanceState) {
    super.onCreate(savedInstanceState);
    AndroidApplicationConfiguration config = new AndroidApplicationConfiguration();
    config.useAccelerometer = false;
    config.useCompass = false;
    initialize(new FlappyBaran(), config);
}
项目:GDX-Engine    文件:CopyOfMainActivity.java   
@Override
public void onCreate(Bundle savedInstanceState) {
    super.onCreate(savedInstanceState);

    AndroidApplicationConfiguration cfg = new AndroidApplicationConfiguration();
    cfg.useGL20 = false;
    initialize(new TowerDefenseGame(), cfg);
}
项目:GDX-Engine    文件:MainActivity.java   
@Override
public void onCreate(Bundle savedInstanceState) {
    super.onCreate(savedInstanceState);

    AndroidApplicationConfiguration cfg = new AndroidApplicationConfiguration();
    cfg.useGL20 = true;
    initialize(new AngryBirds(), cfg);
}
项目:projecttd    文件:AndroidLauncher.java   
@Override
protected void onCreate(Bundle savedInstanceState) {
    super.onCreate(savedInstanceState);
    AndroidApplicationConfiguration config = new AndroidApplicationConfiguration();
    initialize(new ProjectTD(), config);
    System.out.println("test654321");
}
项目:Cubes_2    文件:AndroidCompatibility.java   
@Override
protected void run(ApplicationListener applicationListener) {
    AndroidApplicationConfiguration config = new AndroidApplicationConfiguration();
    config.useAccelerometer = false;
    config.useCompass = false;
    config.useWakelock = true;
    config.useImmersiveMode = true;
    androidLauncher.initialize(applicationListener, config);
}
项目:Klooni1010    文件:AndroidLauncher.java   
@Override
protected void onCreate (Bundle savedInstanceState) {
    super.onCreate(savedInstanceState);
    final AndroidApplicationConfiguration config = new AndroidApplicationConfiguration();
    final AndroidShareChallenge shareChallenge = new AndroidShareChallenge(this);
    initialize(new Klooni(shareChallenge), config);
}
项目:TreasureHunting    文件:AndroidLauncher.java   
@Override
protected void onCreate (Bundle savedInstanceState) {
    super.onCreate(savedInstanceState);
    AndroidApplicationConfiguration config = new AndroidApplicationConfiguration();
    config.useImmersiveMode = true;
    MazeGame.setMyGameCallback(this);
    initialize(new MazeGame(), config);

}
项目:FlappySpinner    文件:AndroidLauncher.java   
private void createGameView(AndroidApplicationConfiguration cfg) {
    gameView = initializeForView(new FlappySpinner(this), cfg);
    RelativeLayout.LayoutParams params = new RelativeLayout.LayoutParams(RelativeLayout.LayoutParams.MATCH_PARENT, RelativeLayout.LayoutParams.WRAP_CONTENT);
    params.addRule(RelativeLayout.ALIGN_PARENT_BOTTOM, RelativeLayout.TRUE);
    params.addRule(RelativeLayout.CENTER_HORIZONTAL, RelativeLayout.TRUE);
    params.addRule(RelativeLayout.BELOW, adView.getId());
    gameView.setLayoutParams(params);
}
项目:Cubes    文件:AndroidCompatibility.java   
@Override
protected void run(ApplicationListener applicationListener) {
  AndroidApplicationConfiguration config = new AndroidApplicationConfiguration();
  config.useAccelerometer = false;
  config.useCompass = false;
  config.useWakelock = true;
  config.useImmersiveMode = true;
  androidLauncher.initialize(applicationListener, config);
}
项目:Hexpert    文件:AndroidLauncher.java   
@Override
protected void onCreate (Bundle savedInstanceState) {
    super.onCreate(savedInstanceState);

    String pKey = "MIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEAk7CvCwFg6zjMPmczjAxaLlUjiriAudAOS1a+AFAC5KsA1ZeK7dW8g2spFW7ukmLaSAKQWqGgaKwrs+hntgbMsp2cPWe1x77z8gISdXUNZB2XuzjZqUTzRaGU3zoO9kjBAqQmSaZIo7hLb2hn70Yzeoo31fV4m1koHsNtzpMUksYpFwuD/HVJifHeO9E1bvea6ljidGtYz10hdoF/t+Lp77Exv/17pD9IbE8dKO/j0p/MFIAz0LF1+vyhg/bhpZs2X8Y3dWVv3fkthScj4Wemu8yDksTpCH6baDwjeZ5qe7eAoA3KnQsR7kssiUNXWWtUTUOON1GlOqcHVu9BJW52GwIDAQAB";
    gameHelper = new GameHelper(this, GameHelper.CLIENT_GAMES);
    gameHelper.enableDebugLog(false);

    bp = new BillingProcessor(this, pKey, this);

    GameHelper.GameHelperListener gameHelperListener = new GameHelper.GameHelperListener() {
        @Override
        public void onSignInFailed() {

        }

        @Override
        public void onSignInSucceeded() {

        }
    };

    gameHelper.setup(gameHelperListener);

    AndroidApplicationConfiguration config = new AndroidApplicationConfiguration();
    initialize(new Hexpert(this, this, this), config);
}
项目:guitar-finger-trainer    文件:AndroidLauncher.java   
@Override
protected void onCreate (Bundle savedInstanceState) {
    super.onCreate(savedInstanceState);
    AndroidApplicationConfiguration config = new AndroidApplicationConfiguration();
    config.useAccelerometer = false;
    config.useCompass = false;
    config.useWakelock = true;
    config.useImmersiveMode = true;
    initialize(new GftGame(), config);
}
项目:trascendentAR    文件:ARLauncher.java   
@Override
public void initialize(ApplicationListener listener, AndroidApplicationConfiguration config){
    //Las siguientes dos lines son necesaria para poder añadir markers de la manera que ARToolKit lo maneja
    AssetHelper assetHelper = new AssetHelper(getAssets());
    assetHelper.cacheAssetFolder(this, "Data");

    mainLayout = new FrameLayout(this);
    config.r = 8;
    config.g = 8;
    config.b = 8;
    config.a = 8;

    //Configuraciones basicas
    requestWindowFeature(Window.FEATURE_NO_TITLE);
    getWindow().addFlags(WindowManager.LayoutParams.FLAG_FULLSCREEN);
    getWindow().setFormat(PixelFormat.TRANSLUCENT);
    getWindow().addFlags(WindowManager.LayoutParams.FLAG_KEEP_SCREEN_ON);
    setRequestedOrientation(ActivityInfo.SCREEN_ORIENTATION_LANDSCAPE);

    gameView = initializeForView(listener, config);

    if(graphics.getView() instanceof SurfaceView){
        SurfaceView glView = (SurfaceView)graphics.getView();
        glView.getHolder().setFormat(PixelFormat.TRANSLUCENT);
    }

    setContentView(mainLayout);
}
项目:retro-reversi    文件:AndroidLauncher.java   
@Override
protected void onCreate (Bundle savedInstanceState) {
    super.onCreate(savedInstanceState);
    gameHelper = new GameHelper(this, GameHelper.CLIENT_GAMES);
    AndroidApplicationConfiguration config = new AndroidApplicationConfiguration();

    reversi = new Reversi(this);
    initialize(reversi, config);
    gameHelper.setup(this);
}
项目:DarkDay    文件:AndroidLauncher.java   
@Override
protected void onCreate (Bundle savedInstanceState) {
    super.onCreate(savedInstanceState);
    AndroidApplicationConfiguration config = new AndroidApplicationConfiguration();
    config.numSamples = 2;
    initialize(new DarkDay(), config);
}
项目:blueirisviewer    文件:MainActivity.java   
@Override
public void onCreate(Bundle savedInstanceState)
{
    super.onCreate(savedInstanceState);

    AndroidApplicationConfiguration cfg = new AndroidApplicationConfiguration();

    initialize(new BlueIrisViewer(null), cfg);
}
项目:fluffybalance    文件:AndroidLauncher.java   
private View createGameView(AndroidApplicationConfiguration cfg) {
    mGameView = initializeForView(new BalanceBallSec(), cfg);
    RelativeLayout.LayoutParams params = new RelativeLayout.LayoutParams(
            ViewGroup.LayoutParams.MATCH_PARENT, ViewGroup.LayoutParams.WRAP_CONTENT);
    params.addRule(RelativeLayout.CENTER_HORIZONTAL, RelativeLayout.TRUE);
    params.addRule(RelativeLayout.ABOVE, mAdView.getId());
    mGameView.setLayoutParams(params);
    return mGameView;
}
项目:nomoore    文件:AndroidLauncher.java   
@Override
protected void onCreate(Bundle savedInstanceState) {
    super.onCreate(savedInstanceState);
    AndroidApplicationConfiguration config = new AndroidApplicationConfiguration();
    config.useAccelerometer = false;
    config.useCompass = false;
    config.useGyroscope = false;
    config.useWakelock = true;
    config.hideStatusBar = true;
    config.useImmersiveMode = true;
    initialize(new MyGdxGame(this), config);
}
项目:jewelthief    文件:AndroidLauncher.java   
@Override
protected void onCreate(Bundle savedInstanceState) {
    super.onCreate(savedInstanceState);
    AndroidApplicationConfiguration config = new AndroidApplicationConfiguration();
    config.useAccelerometer = false;
    config.useCompass = false;
    config.useGyroscope = false;
    config.useWakelock = true;
    config.hideStatusBar = true;
    config.useImmersiveMode = true;
    initialize(new JewelThief(this), config);
}
项目:GNES_JAVA    文件:AndroidLauncher.java   
@Override
protected void onCreate (Bundle savedInstanceState) {
    super.onCreate(savedInstanceState);
    AndroidApplicationConfiguration config = new AndroidApplicationConfiguration();
    config.useImmersiveMode = true;
    initialize(new GNES_JAVA(), config);
}
项目:le-pendu    文件:AndroidLauncher.java   
@Override
protected void onCreate (Bundle savedInstanceState) {
    super.onCreate(savedInstanceState);
    AndroidApplicationConfiguration config = new AndroidApplicationConfiguration();
    config.useImmersiveMode = true;
    initialize(new LePendu(), config);
}
项目:drc-sim-client    文件:AndroidLauncher.java   
@Override
protected void onCreate (Bundle savedInstanceState) {
    super.onCreate(savedInstanceState);
    AndroidApplicationConfiguration config = new AndroidApplicationConfiguration();
    config.useImmersiveMode = true;
    config.useWakelock = true;
    Control[] controls = new Control[] {new ControlTouch(), new ControlController()};
    ArgumentParser args = new ArgumentParser(new String[]{"-f"});
    initialize(new Client(controls, new Audio(), args), config);
}
项目:cgc-game    文件:AndroidLauncher.java   
public void onCreate(Bundle savedInstanceState) 
{
    super.onCreate(savedInstanceState);

    AndroidApplicationConfiguration cfg = new AndroidApplicationConfiguration();
    //OpenGL ES version set in AndroidManifest.xml

    initialize(new ChaseApp(Platform.OUYA), cfg);
}
项目:Taxin    文件:AndroidLauncher.java   
@Override
protected void onCreate(Bundle savedInstanceState) {
    super.onCreate(savedInstanceState);
    AndroidApplicationConfiguration config = new AndroidApplicationConfiguration();
    config.useImmersiveMode = true;
    initialize(new TaxinGame(), config);
}
项目:Carbonizr    文件:ObjectViewer.java   
@Override
protected void onCreate (Bundle savedInstanceState) {
    super.onCreate(savedInstanceState);

    File object = (File) getIntent().getExtras().get(EXTRA_MODEL_FILE);

    AndroidApplicationConfiguration config = new AndroidApplicationConfiguration();
    initialize(new ModelViewer(object), config);
}