It is very unlikely that you will have a loss of context in the first place. See this post for a more detailed explanation. But even if you have a loss in context (which will only happen on very old Android devices running Android 2.x), libGDX will take care of this and restore resources for you. You do not need to do anything for this.
Most likely, you somehow βthinkβ that you have a loss of context, but in fact you have a different problem. For example, the most common reason people think they have a loss of context is when they use static resources. For instance. using singleton pattern with lazy initialization.
Of course, without seeing any code, this is just a guess.
source share