It is very easy with LibGDX to implement a screenshot feature within your game. The idea is to create an array of bytes where each byte represent a pixel color, and them, line per line, fill the array sequentially with pixels color values. Then return as a Pixmap this array and use  PixmapIO.writePNG  to write the file on the file system.

Continue reading