Using Admob internodes in Libgdx for Android, itโ€™s slow when it is rejected

I use Admob internodes with my libgdx game for Android, and my problem is that when I fire it after it has been shown, it will take some time to regain control of my game (about 4-5 seconds, which is not very OK). I do not know why this is so. In addition, when I just leave my game (by clicking the "Home" button) and then return to it, it will also take about the same time. Perhaps this has something to do with opengl context loss.

+1
source share
2 answers

Starting an advertising call in a separate stream of the user interface and displaying add only if and only if the phone has an Internet connection

void callAd(){
    runOnUiThread(new Runnable() {

        @Override
        public void run() {
            //your add call
        }
    });
}
0
source

Thats Context Loss really, Textures reload, so it takes some time to resume.

But how did it happen when I play "Doodle jump" on my phone (with the same Internet connection), when I die, an advertisement appears, but when I reject it, I return to the game without waiting for everything ..

DoodleJump does not use OpenGL, so it does not have this problem. In addition, its graphs are too simple and easy, it wonโ€™t take too long to reboot if it is anyway :)

0
source

All Articles