You could try hacking things around to get your game to keep running in background, but even that wouldn’t guarantee players from getting disconnected because the IAP flow may take them further away from the app (for example, taking the user to the screen where they need to add their purchase information, which might invoke the browser) and cause Android to terminate the game if there isn’t enough RAM. It would be better to make changes to your game so it can handle users disconnecting and reconnecting when performing IAPs.