When my MG Android game runs in background on my Nexus 7 device, it still has about 20% cpu consumption and keeps draining the device’s battery life. Is there a fix to this issue?
Test “.IsActive” inside .Update() & .Draw().
Normally you do something like
if(!this.IsActive) return;
Thanks for the suggestion @nkast! I wonder if there is a way to let MonoGame handle the life cycle of the app (so the game hibernates properly in background)? This is currently an Android-only issue so I’d rather not risk it by adding in unnecessary code…
I need to update the openal-soft library we’re using. It doesn’t suspend the audio mixing thread when the app is suspended. iOS, unlike Android, suspends all threads in the process when the app is backgrounded. Android lets threads keep running.