I face a problem on how to maintain the life cycle of a game logic. I define a game logic in a Fragment
. When I switch game fragment to other fragment like setting fragment, the fragment is released and the game logic is also released.
How do I maintain the game logic?