Unable to Download Canvas Screenshot in APK Runtime

0 favourites
  • 4 posts
From the Asset Store
Pixel Destruction like in "Worms" (Drawing Canvas based)
  • I have two issues:

    1.My game uses a canvas for screenshots, and then employs the browser plugin's "Download" feature to save these screenshots. This works fine in HTML5 runtime, but fails in APK runtime.

    2.After taking a canvas screenshot and saving the image data in a binary array, I attempt to display this image in another game scene using the binary data. This works in HTML5, but in APK runtime, the screenshot displays as a black screen.

    After some investigation, I found that this issue might be related to the lack of storage permissions on the phone. However, Construct 3 does not provide an option for requesting storage permissions. How can I obtain these permissions, or is there another way to achieve the functionality I need?

  • As noted in the manual, downloading is a browser-only feature. When running as an Android app, it's not a real browser, so the download feature is not available. Consider using the 'Share' object instead.

  • Thank you for your reply. I’m a developer from China. Through my tests, I found that neither system screenshots nor canvas plugin screenshots can be successfully shared. Is this because the feature is unsupported, or could it be related to my test device, which is a Huawei phone running the HarmonyOS system?

    Regarding my second question, in the APK runtime, when I try to load an image from binary base64 data stored in an array using the "Load Image from URL" feature of a sprite in another game scene, the result is a black screen. Could this be related to a lack of storage permissions?

    If this issue can’t be resolved, I might need to cut this feature from my game.

    Could these issues be considered as optimization needs?

  • Try Construct 3

    Develop games in your browser. Powerful, performant & highly capable.

    Try Now Construct 3 users don't see these ads
  • 分享问题截图:

    正常运行截图:

    手机运行截图:

Jump to:
Active Users
There are 1 visitors browsing this topic (0 users and 1 guests)