Screenshot in-game for mobile?


Recently, my game (baby idol) made with Gdevelop is gaining high visibility. It’s a character dressing game and the people are starting to ask for the screenshot within the app, there is a way to do this in-game screenshot function for mobile?
If there is any way to do this please let me know. :two_hearts:


Well, not without building manually to add a Cordova plugin and some Javascript at least.


Well, then there is a solution, right?
How i start to do what you said?


There is a way to create an extension for take screenshoot, give me few hours and will coding that it’s simple :slight_smile:
But for saving files on mobile it’s more complicated i don’t know how it’s working.

But i can already create the screenshot. :slight_smile:


I wrote a very complete post some time ago let me find it will take a minute


Here it is: [Solved]Saving values of variables to file


Wow, if you really can do it, it will be really cool! I will be really grateful! @Bouh @arthuro555


Wait I found another solution. Create a Js event with this content:,res){
    alert("there was an error while saving the screenshot. Error code: "+error);

Then export manually. You will need to install Cordova, to do so first install NodeJS then open a command prompt, change the directory to the one where you exported for mobile/cordova, then type

npm install --dev cordova
// and to install the screenshot plugin
cordova plugin add


But there is alredy an action for take and save a screenshot !
I know it !

You have also an example in GD5 !

So no need extension for take a screenshot ^^
If you search the action type in search bar “Take” you should see this

if someone is interesting by screenshot with javascript :

//For see entire base64 string in developper tool

//Get canvas of game
const renderer = runtimeScene.getRenderer();
const canvas = renderer._pixiRenderer.view;
let screenshot = canvas.toDataURL("png");

//open image in new tab
window.location = screenshot;

//Open image in new tab but for download the file., "filename", "png"));

//From stackoverflow
window.b64toFile = function (b64Data, filename, contentType) {
    var sliceSize = 512;
    var byteCharacters = atob(b64Data);
    var byteArrays = [];

    for (var offset = 0; offset < byteCharacters.length; offset += sliceSize) {
        var slice = byteCharacters.slice(offset, offset + sliceSize);
        var byteNumbers = new Array(slice.length);

        for (var i = 0; i < slice.length; i++) {
            byteNumbers[i] = slice.charCodeAt(i);
        var byteArray = new Uint8Array(byteNumbers);
    var file = new File(byteArrays, filename, {type: contentType});
    return file;


But does it work for mobile too? I thought it only worked for the computer


I don’t know about cordova i’ve never really used this.
@arthuro555 have you already test to save the file with your code ?


There is no solution?


I am not sure we have to test. I am not on PC right now so I cannot. I will keep you updated.


Okay, thanks! I’ll wait for good news haha


I actually totally forgot! I will try later but right now it’s 1am and I’m going to sleep now.


so did you get the good news? mobile in game screenshots?