I hope I can to the right place.
I have produced a pygame app for android, however the p4a recipe does not include certain pygame-sdl methods such as APP_WILLENTERBACKGROUND or APP_DIDENTERFOREGROUND. When the app moves into the background (it continues to run, but the graphics freeze when brought forward). When I want to show ads, the app crashes. I understand how to use on_pause/on_resume methods with kivy, but I am using the pygame recipe. With pygame-sdl, I'd do something like this:
if pygame.APP_WILLENTERBACKGROUND==TRUE:
game_loop=False
elif pygame.APP_DIDENTERFOREGROUND==TRUE:
game_loop=True
However, is there another way I can do this without having to use pyjnius? cheers,
Nick
Looks like you've found the answer on reddit. I'm posting it here too, just in case someone else need it in the future.
It seems you can use the SDL2 constant values to check for them on Android:
Not very elegant, but it works also on Pygame 2 built with buildozer.