[ad_1]
Game Development Stack Exchange is a question and answer site for professional and independent game developers. It only takes a minute to sign up.
Anybody can ask a question
Anybody can answer
The best answers are voted up and rise to the top
Asked
Viewed
559 times
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.
\$\endgroup\$
2
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
\$\endgroup\$
1
You must log in to answer this question.
Not the answer you’re looking for? Browse other questions tagged .
lang-java
[ad_2]