When I open my Android app after 5 or 10 seconds it sets up the sensor listener, during which I see clear stuttering and the FPS drops for a second to 40 instead of 60.
Is there a way to avoid this?
I am working in Android Studio with LibGDX.
When I open my Android app after 5 or 10 seconds it sets up the sensor listener, during which I see clear stuttering and the FPS drops for a second to 40 instead of 60.
Is there a way to avoid this?
I am working in Android Studio with LibGDX.
I am not sure what you mean with Sensor Listener, but In case you mean accelerometer and other mobile phone sensonrs. You can disable them with this code:
AndroidApplicationConfiguration config = new AndroidApplicationConfiguration();
config.useAccelerometer=false;
config.useCompass=false;
initialize(new yourGame(), config);
More information on the LibGDX Wiki